Linux Configuration SendMail

Source: Internet
Author: User


sendmail Configuration process:

1 . Install sendmail -related packages on the server.

Yum Install SendMail SendMail

after installation, the SendMail configuration file is located in the /etc/mail directory.

2, modify the sendmail.mc file, will

Daemon_options (' port=smtp,addr=127.0.0.1, Name=mta ') dnl

Switch

Daemon_options (' port=smtp,addr=0.0.0.0, Name=mta ') dnl

This enables the SendMail to be sent out to the outside.

And at the end of the document, add

MAILER (local) DNL

This statement tells SendMail that a local user's message is not used for SMTP and is delivered directly within the host.

3. Use the command:

M4 SENDMAIL.MC > SENDMAIL.CF

Regenerate the configuration file.

4. In the local-host-names file, write to the domain name that receives the message, such as Linux. com or host name.

If you want to receive mail with an IP address, you need to write "[IP]" in the file, such as [192.168.0.1], one row for each statement.

4. In the access file, fill in the IP address, network segment or domain name and the corresponding behavior, that is, to allow or prohibit the forwarding of mail, etc. such as 202.204.118 RELAY. The makemap hash access.db<access command is then used to generate the sendmail recognized file.

5, at this time basically completed the sendmail configuration, start the sendmail service.

Service SendMail Start

/etc/init.d/sendmail restart

6. You can now use the Mail command to send a letter.

Linux Configuration SendMail

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.