SendMail How to set up a third-party server to send mail
Yum Install SendMail
2. Modify the configuration file to add 5 rows of set related content
Vim/etc/mail.rc# outgoing messages is sent in iso-8859-1 if all their characters are# representable in it, otherwise in Utf-8.set sendcharsets=iso-8859-1,utf-8set [email protected]set smtp=smtp://smtp.126.com:25set [email protected]set Smtp-auth-password=xxxxxxxx
3. Testing
echo Test | Mail-s AAA [email protected]
For specific use of mail, refer to help
4. About SendMail slow start-up problem
Modify your own hostname to client.example.com such a format,
At the same time/etc/hosts also to add. Note that this can only be used in this format.
of my own:
[[email protected] ~]# hostnameclient1.example.com[[email protected] ~]# cat/etc/hosts127.0.0.1 localhost localhost.lo Caldomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 127.0.0.1 client1.example.com
This article from the "[email protected]" blog, reproduced please contact the author!
CentOS 6x about SendMail e-mail issues