Replacing sendmail with PostFix
The following are the steps used to replace sendmail with postfix for outbound mail. Many people find postfix easier to configure especially if you have to do smtp authentication.
The following commands will remove sendmail and install postfix:
rpm -e --nodeps sendmail yum install postfix
Next you want to edit the main configuration file by using the following command:
nano /etc/postfix/main.cf
When all of your edits are done reload postfix with:
service postfix reload
To enable SMTP authentication, add the following lines to the main.cf file:
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd broken_sasl_auth_clients = yes smtpd_sasl_auth_enable = no smtp_always_send_ehlo = yes smtp_sasl_auth_enable = yes smtp_sasl_security_options =
Next edit the password file with the following command:
nano /etc/postfix/saslpasswd
The format of this file is: mailserver login:password
For example:
my.mailserver.com mylogin:mypassword
You then need to create the password database file with the following command:
postmap hash:/etc/postfix/saslpasswd

