Postfix Install

From INIwiki
Jump to: navigation, search

Digg this!



Need to have a base install of Fedora, I am using FC3. These steps have also been verified on CentOS 4.4 and 5.2


Domain =
Server Name = dmz1
User Name = mailadmin
User mailadmin password 123456


Install all needed packages:

apt-get may be used as well
yum install postfix dovecot spamassassin system-switch-mail cyrus-sasl-plain

Set Postfix as the default mail client

You can also try the alternatives command:

To display which MTA alternative is in use:
 alternatives --display mta
To choose from the available MTA alternatives from the command line :
 alternatives --config mta
To setup Postfix as the default mail system:
 alternatives --set mta

See if send mail is installed

rpm -qa sendmail

if you get a reply [like... sendmail-8.13.1-2] you need to remove sendmail with...

rpm -e sendmail

And if needed

rpm -e sendmail-cf

Start or Restart Services

service postfix restart
service saslauthd start
service dovecot start

If there are not errors then, set services to auto start at boot time

chkconfig postfix on
chkconfig saslauthd on
chkconfig dovecot on

Add users -- this is based on the assumptions above

useradd mailadmin -c "Mail Admin"
passwd mailadmin  [123456]


vi /etc/postfix/

edit the following lines
Modify the following lines to match what is below
mail_owner = postfix
myhostname =
mydomain =
myorigin = $mydomain
#inet_interfaces = localhost -- comment this line
inet_interfaces = all
#mydestination = $myhostname, localhost.$mydomain, localhost -- Comment this out
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

add the following lines at the bottom of /etc/postfix/

###used for SMTP authentication###
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname  ##Leave NULL in FC1##
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_relay_domains
smtpd_sasl_security_options = noanonymous

Allow smtp password protection


echo "mech_lich: login plain" >> /usr/lib/sasl2/smtpd.conf

6.x (if needed)

echo "mech_lich: login plain" >> /etc/sasl2/smtpd.conf

Restart all services

service postfix restart
service saslauthd restart
service dovecot restart

Congratulations you are done. All you need to do is configure you favorite mail client to connect.

Might I suggest pine

Other Links

Here is another resource that is untested but seems to be well documented

See Postfix ssl for SSL integration.

Digg this!

Personal tools