I built a mail server on my own server to write the shell script for alarm monitoring. When an unexpected server occurs, you can send the mail server to the mailbox in a timely manner.
Read two tutorials, follow two tutorials to build, thanks to the original.
Linux under build postfix mail server detailed:
1, first close the SendMail service
Service SendMail Stop
2, Chkconfig sendmail off (off boot)
3, modify the DNS positive solution file, so that DNS can resolve the mailbox service
Add the following two lines
Mail.zhubf.com. In A 172.17.17.2
Zhubf.com. In MX ten mail.zhubf.com.
Restart the DNS service
Service named restart
Chkconfig named on
echo "" >/etc/resolv.conf
Test DNS settings correctly
Host Mail.zhubf.com
Mail.zhubf.com has address 172.17.17.2
4 Installing the Postfix package (if you install yum, configure the Yum source)
Yum install-y postfix
Modifying the Postfix configuration file
Vim/etc/postfix/main.cf
The main contents are as follows
5, configure the SASLAUTHD, this software is installed by default
Modifying the SASLAUTHD configuration file
Vi/etc/sysconfig/saslauthd
Set Mech=shadow
Service SASLAUTHD Restart
Chkconfig SASLAUTHD on
Create a mailbox user
Useradd ZHUBF
passwd ZHUBF
echo ZHUBF |passwd--stdin ZHUBF
Perform a password verification test
Testsaslauthd-u zhubf-p ' ZHUBF '
0:ok "Success."
If not, it could be a firewall or SELinux setup issue.
In Postfix's master profile/etc/postfix/main.cf add the following permission settings
Smtpd_sasl_auth_enable = yes
Smtpd_sasl_local_domain = ' '
Smtpd_recipient_restrictions =
Permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
Broken_sasl_auth_clients = yes
Smtpd_client_restrictions = permit_sasl_authenticated
Smtpd_sasl_security_options = noanonymous
Restart Postfix Service
Service Postfix Restart
Chkconfig Postfix on
Another supplementary tutorial is: http://www.cnblogs.com/dudu/archive/2012/12/12/linux-postfix-mailserver.html
It's very well written.
"Go" Linux build postfix mail server detailed: