(1) Configuring SMTP authentication for Senmail # VI/ETC/MAIL/SENDMAIL.MC DNL Trust_auth_mech (' EXTERNAL digest-md5 cram-md5 LOGIN PLAIN ') dnl DNL define (' confauth_mechanisms ', ' EXTERNAL GSSAPI digest-md5 cram-md5 LOGIN PLAIN ') dnl Remove the DNL from the above two lines. In the SendMail file, DNL indicates that the behavior comment line is invalid, so you can open the corresponding setting line by removing the DNL string at the beginning of the row. (2) Set the network access permissions for the SendMail service (because I am directly calling this machine so I did not operate this step) # VI/ETC/MAIL/SENDMAIL.MC Daemon_options (`Port=Smtp,Addr=127.0.0.1, Name=MTA' ) DNL Change 127.0.0.1 to 0.0.0.0, meaning that any host can access the SendMail service. If only one segment is allowed to access the SendMail service, change 127.0.0.1 to a specific segment address that is shaped like 192.168.1.0/24. 3. Generate Configuration file The SendMail configuration file is generated by M4 and the M4 tool is in the SENDMAIL-CF package. If the system does not recognize the M4 command, it indicates that the SENDMAIL-CF package is not installed. #m4/ETC/MAIL/SENDMAIL.MC > /etc/mail/sendmail.cf 4. Start the service #service SendMail Start Check whether the service is joined to the self-starter #chkconfig--list |grep SendMail |