Postfix implements simple configuration of mail sending 1 install postfix. Use rpm-qa postfix to check whether postfix is installed. If no, use yum install postfix. 2 Configure/etc/postfix/main. cf [root @ reage ~] # Vim/etc/postfix/main. cf highlight: edit the Postfix configuration file # myhostname = host. domain. tld hosts finds this line and changes the part after the equal sign to the host name ↓ myhostname = smtp.rhttp.cn then to this status. Set the Host Name of the system # mydomain = domain. tld locate this line and change the part after the equal sign to the domain name registrant mydomain = rhttp.com into this status, set the domain name (we will set it here as part of the e-mail address "@") # myorigin = $ mydomain locate this line, change the # At the beginning of the line to the desired myorigin = $ mydomain succeeded state. Set the part after the mail address "@" to the domain name (non-system Host Name) inet_interfaces = localhost succeeded to find this line, change "localhost" to "all" ↓ inet_interface S = all Hosts changed to this status, accepting requests from all networks mydestination = $ myhostname, localhost. $ mydomain, localhost locate this line, and add "$ mydomain" into mydestination = $ myhostname, localhost. $ mydomain, localhost, $ mydomain expired is changed to this status. Specify the domain name sent to the local email # relay_domains = $ mydestination found to find this line, remove repeated relay_domains = $ mydestination domains from the beginning of the line and change them to this status. Define the domain name that allows forwarding # mynetworks = 168.100.189.0/28,127.0 .0.0/8 bytes to find this line, modify ingress mynetworks = 168.100.189.0/28,127.0 .0.0/8 ingress according to your intranet conditions. Change to this status, specify the Intranet and local IP address range # home_mailbox = Maildir/inbox find this line, remove the line # begin home_mailbox = Maildir/mailbox to this status, specify the user's email directory # smtpd_banner = $ myhostname ESMTP $ mail_name ($ mail_version) locate this line and add the following line to this line: smtpd_banner = $ myhostname ESMTP unknow rows add this line. The SMTP server information is not displayed at the end of the configuration file. Add the following lines: smtpd_sasl_auth_enable = yes. The server uses SMTP authentication smtpd_sasl_local_domain = $ myhostname authentication to specify the local domain name (host name) sm for SMTP authentication. Authorization = noanonymous authentication does not allow anonymous authentication. Authorization = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination message_size_limit = 15728640 authorization specifies the maximum email size is 15 MB 3 configure SMTP authentication options to improve security, instead of using the password of the System user as the password for SMTP authentication, a dedicated password for SMTP authentication will be created later. /Etc/sasl2/smtpd. conf [root @ reage ~] # Vim/usr/sasl2/smtpd. conf configure edit SMTP authentication configuration file pwcheck_method: saslauthd then find this line and change "saslauthd" to "auxprop" then pwcheck_method: auxprop keystore does not use the System user password as the user's SMTP authentication password [root @ reage ~] # Vim/etc/sysconfig/saslauthd MECH = shadow watermark find this line, and add # register # MECH = shadow watermark in front to find this line without using the shadow mechanism FLAGS = shadow, add "sasldb" secret FLAGS = sasldb certificate after the equal sign to define the authentication method as sasldb2 4. Set the password saslpasswd2-u myhostname-cuserid to replace the centralized myhostname with the main. the value of myhostname in cf. Userid is the user you want to set the password for. For example, I set the reage password [root @ reage ~] Saslpasswd2-usmtp. rhttp. ch-c reage Password: Again (for verification): [root @ reage ~]