標籤:自動發郵件 sendmail 郵件伺服器
sendmail如何設定第三方伺服器發郵件
yum install sendmail
2.修改設定檔,添加5行 set 有關內容
vim /etc/mail.rc# Outgoing messages are 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. 測試
echo test | mail -s aaa [email protected]
mail 具體用法,參考help
4.關於sendmail啟動慢的問題
修改自己hostname為 client.example.com 這樣的格式,
同時 /etc/hosts 也要添加。注意只能用這樣的格式。
我自己的:
[[email protected] ~]# hostnameclient1.example.com[[email protected] ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6127.0.0.1 client1.example.com
本文出自 “[email protected]” 部落格,轉載請與作者聯絡!
CentOS 6x 關於sendmail發郵件問題