Postfix mail system installation and configuration: Postfix,cyrus-imap,cyrus-sasl,dovecot and SPF
http://www.freehao123.com/postfix-cyrus/
Install postfix under centos Send mail tutorial
http://www.wpmee.com/lnmp1-0-centos-postfix/
CentOS install postfix replace sendmail send mail
Http://www.linuxidc.com/Linux/2014-10/107947.htm
Today there are netizens reminded that blog comments reply No email notification, the previous period of time just in the CentOS server configuration is good sendmail, should not AH! Check the server settings, SendMail settings have no problem, this period of time has not changed anything, just recently saw Postfix, then think can try. Then uninstalled the SendMail, began to install the postfix, do a step record.
1, if installed SendMail, first uninstall.
Yum Remove SendMail
2, install Postfix
Yum install Postfix
3, change the default MTA to Postfix:
/usr/sbin/alternatives--set Mta/usr/sbin/sendmail.postfix
4, Finish, check again to see if the MTA has changed to Postfix:
Alternatives--display MTA
5, configure Postfix,vi edit MAIN.CF
Vi/etc/postfix/main.cf
After opening, find the following items, and then remove the previous # and do the configuration:
Myhostname = mail.gongzi.org
MyDomain = gongzi.org
Myorigin = $mydomain
Inet_interfaces = All
mydestination = $myhostname, localhost. $mydomain, localhost, $mydomain
Mynetworks = 192.168.100.10/24, 127.0.0.0/8
Relay_domains =
Home_mailbox = maildir/
The above several settings are not in the same location, need to look for, and make changes, where the corresponding domain name please change to their own address, mynetworks I did not make changes, automatic. I was just beginning to configure the error caused the installation to fail, later at @ Zhu Maohai's blog to find the answer, the above several meaning explanation also from the site, thanks to the author to provide.
Configuration file Explanation:
MyDomain
MyDomain parameter refers to the domain name of the email server, please ensure that it is a formal domain name (such as CENTOS.BZ)
Myhostname:
The Myhostname parameter refers to the host name of the system (for example, my server hostname is MAIL.CENTOS.BZ)
Myorigin:
The Myorigin parameter specifies the source and delivery of the domain name that is displayed in the local send message. In our case, MyDomain is centos.bz and my domain name.
For the following line, our email address is [email protected] instead of [email protected].
Myorigin = $mydomain
Mynetworks:
The Mynetworks parameter specifies a list of trusted SMTP, specifically, trusted SMTP clients that allow messages to be delivered through postfix.
Mydestination:
The mydestination parameter specifies which mail addresses allow messages to be sent locally. This is a set of trusted IP addresses that allow messages to be sent or delivered through the server. A user tries to send a message to the originating server by sending an IP address that is not listed here will be rejected.
Inet_interfaces:
The inet_interfaces parameter sets the network interface so that postfix can receive messages.
Relay_domains:
This parameter is the list of destination domain names for the system delivery message. If left blank, we guarantee that our mail server is not open to untrusted networks.
Home_mailbox:
This parameter sets the mailbox path to the user directory, or you can specify the mailbox style to use.
6, Detect and start postfix
service Postfix status//detection, if started will list its PID, as follows:
Master (PID 25579) is running ...
If it does not start, execute the following command:
Service Postfix start
7, set boot start
Chkconfig Postfix on
My own installation ends here, because all I need is the mail function, not the mail server. The test message is sent at this time, OK.
The following is a personal add-on, custom mail source, by default may show [email protected] and so on, because I have previously configured php.ini, so it shows that I configured. Related configurations Perhaps this article can help:
SendMail unable to send mail and sent a slow resolution http://www.linuxidc.com/Linux/2014-10/107946.htm
Finish.
CentOS 6.4 postfix Mail Service installation and basic configuration http://www.linuxidc.com/Linux/2013-08/88977.htm
CentOS 5.5 under Mail server postfix installation http://www.linuxidc.com/Linux/2012-05/60010.htm
Build a red Hat Enterprise Linux 5.4 postfix mail server http://www.linuxidc.com/Linux/2012-12/77167.htm
Linux postfix (authentication) for the secure mail server under architecture http://www.linuxidc.com/Linux/2012-09/70527.htm
Postfix Details: Please click here
Postfix: please click here.
For more information on CentOS, see the CentOS feature page http://www.linuxidc.com/topicnews.aspx?tid=14
This article permanently updates the link address: http://www.linuxidc.com/Linux/2014-10/107947.htm
Add: If you haven't configured the SendMail component before, you probably haven't modified the php.ini email routing, so you might not be able to send the message.
So you need to configure php.ini, fill in the absolute path of SendMail:
To open an edit php.ini using a command
Vi/usr/local/php/etc/php.ini
Enter Sendmail_path find location (or manually jump to find Sendmail_path), you will find the default is the following code
; Sendmail_path =
Press I to enter the edit, change this line to
Sendmail_path =/usr/sbin/sendmail-t-I.
Press ESC to exit edit, enter: Wq Save exit
5. Restart the PHP-FPM process
/ETC/INIT.D/PHP-FPM restart
Management restart of mail server postfix php-fpm