Sign Up
Friendoozle is the newest place for finding friends and family to connect and share.

Linux CentOS 6 install sendmail remove postfix

Install Sendmail and Configure as a Smarthost in CentOS 6.2

CentOS 6 and up comes with postfix as the default mail server. If you need a mail server since you are running a webserver that only needs to send mail from the web script to Gmail or through your ISP’s mailserver then Sendmail configured as a ‘smart host’ will work perfectly.

To remove postfix and install sendmail:
1. yum remove postfix
(postfix is the mail server installed by default with CentOS 6.2)

2. yum install sendmail
yum install sendmail-cf

3. cd /etc/mail

4. nano /etc/mail/
define(`SMART_HOST', `'Wink

5. Then convert the file into a sendmail compiled format with this command and restart sendmail.
m4 /etc/mail/ > /etc/mail/

/etc/init.d/sendmail restart

6. SElinux usually blocks Apache from sending email so you have to check to see.

Check: getsebool httpd_can_sendmail [if answer = httpd_can_sendmail --> off] then apply fix
Fix: setsebool -P httpd_can_sendmail=1 [takes a while for SElinux to process so be patient]
Check again to make sure it took: getsebool httpd_can_sendmail [answer should be "on" now]

restart Apache: /etc/init.d/httpd restart

7. Now test if Apache can send email [remember to open port 25 on Firewall]
create a file called message.txt nano /etc/mail/message.txt
type the following into the file and save:

subject: Testing sendmail from CentOS
Testing from sendmail on CentOS
Apache is able to send email
your mail signature

To send message from command line:
[root@/etc/mail]sendmail -vt -G < message.txt

8. Check and see if the email went through ok.

Searching the internet for information that has been abridged or obscured can be frustrating at times. Blame whomever you want, however, search engine optimization and the desire to drive traffic to helpful information latent with advertising seems to out weigh sites that strive to provide a public service.

It is this frustration that prompted the development of this website. We strive to provide a balanceof service and advertising to off set the cost of maintaining this website.

All times are GMT -8. The time now is 12:57 pm.