CentOS Installation SendMail Service

Source: Internet
Author: User

SendMail is an excellent mail system under Linux. Today, a website needs to have e-mail requirements, and the server installation does not install this, then start.

 1. Installation:#yum install-y SendMail#yum install-y SENDMAIL-CFinstall and start the SASLAUTHD service if SMTP authentication is required:# yum Install-y saslauthd# service SASLAUTHD start 2. Configuration

(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

CentOS Installation SendMail service

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.