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