Postfix is currently the mainstream Linux mail server, which is the MTA, mainly used to implement the SMTP protocol, it can be compatible with SendMail, and postfix is to improve the sendmail and production produced.
Generally speaking, the advantages of postfix than SendMail are: ① speed is faster, the usual argument is 3 times times faster. ② more stable and robust. ③ configuration is more flexible and simple. ④ most postfix run under lower privileges and are more secure. ⑤ can be compatible with SendMail.
And in the CentOS6 series, Postfix is installed by default and booted, it is located in/etc/postfix, and the address of the master configuration file is/etc/postfix/main.cf.
Of course we can start it with the service postfix start, or it can be set to boot by chkconfig postfix on, or by Chkconfig--list | grep postfix to plug in his case.
Send e-mail we use mail-s "theme" name and then the way the text content, you can use @ and then the form of host name, if it is this machine, you can not write, the location of the message is saved is the/var/spool/mail/user name, we check the mail also use the Mail command.
We use the postconf command to modify the configuration file, avoid manual modification caused by the hand error, we can use postconf-d to display the default configuration of Postfix, and D is the first letter of default, we use Postconf-n to display the current configuration of Postfix , n is the first letter of now we use the form of postconf-d Key=value to define the value of the attribute, and E is the first letter of the edit.
For configuration items, mydomain=xin.com is the domain name, myhostname=mail.xin.com is the hostname, and inet_interface=all is listening on all interfaces, and mydestination= $myhostname, localhost, $mydomain is an acceptable message, while MYNETWORK=127.0.0.0/8 is a network user without authentication, and myorigin= $mydomain to disguise.
usually the postfix default is to listen to the local loopback interface, that is, the native service, so that it listens to all interfaces to provide services externally, that is, the use of Postconf-e "Inet_interface=all" to set up. We can disguise "username @ hostname" as "username @ domain Name" and we use POSTCONF-E "myorigin= $mydomain" to set it up.
We can use Postqueue-p to view the current message sending queue, and Vaughn can use Postqueue-f to refresh the current message sending queue we can use Tail-f/var/log/maillog to view the log file.
Sinsing analysis of Postfix in Linux