用戶在server端使用sendmail命令無法發送mail給外網的郵箱。
查看了smtp服務,一切正常。
bash-3.00# svcs -a |grep smtp
online
bash-3.00#
試著給自己的內外網郵箱發郵件,只有內網是ok的
bash-3.00# sendmail hama8311@tom.com
test from ecnshux3118
.
bash-3.00# sendmail markwz@sina.com
test from ecnshux3118
.
bash-3.00# sendmail mark.z.wang@ericsson.com
test from ecnshux3118
.
bash-3.00#
問了同事,發現原因。
我們的server如果給外網發郵件,會先發送給中轉的服務器,再由中轉服務器發送給制定的郵箱。
我們查看一下sendmail配置中,是否設置了中轉服務器。
#cat /etc/mail/sendmail.cf |grep DS
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
# host/domain names ending with a token in class P are canonical
CP.
# "Smart" relay host (may be null)
DS
# operators that cannot be in local usernames (i.e., network indicators)
CO @ % !
# a class with just dot (for identifying canonical names)
C..
DS為空,說明relay host(中轉服務器)沒有配置。
Vi, 添加中轉服務器信息,并重啟smtp服務。
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
# host/domain names ending with a token in class P are canonical
CP.
# "Smart" relay host (may be null)
DSse-smtp.ericsson.se
# operators that cannot be in local usernames (i.e., network indicators)
CO @ % !
# a class with just dot (for identifying canonical names)
C..
bash-3.00# svcadm restart svc:/network/smtp:sendmail
bash-3.00#
問題解決。
Hi Mark,
Please continue to configure those machines, then test if it works.
When you met the issue, you need to change the sendmail.cfg in
# load average at which we refuse connections
#O RefuseLA=12
Change it to O RefuseLA=50 then restart the sendmail service.
Dec 27 18:16:26 ecnshux3123 sendmail[17196]: [ID 702911 mail.info] starting daemon (8.14.4+Sun): queueing@00:15:00
Dec 27 18:16:26 ecnshux3123 sendmail[17196]: [ID 702911 mail.info] runqueue: Skipping queue run -- load average too high
Dec 27 18:16:34 ecnshux3123 sendmail[17257]: [ID 702911 mail.info] starting daemon (8.14.4+Sun): SMTP+queueing@00:15:00
Dec 27 18:16:34 ecnshux3123 sendmail[17257]: [ID 702911 mail.info] runqueue: Skipping queue run -- load average too high
Dec 27 18:16:34 ecnshux3123 sendmail[17257]: [ID 702911 mail.notice] rejecting connections on daemon MTA: load average: 49
Dec 27 18:16:34 ecnshux3123 sendmail[17257]: [ID 702911 mail.notice] rejecting connections on daemon MSA: load average: 49
Dec 27 18:16:49 ecnshux3123 sendmail[17257]: [ID 702911 mail.notice] rejecting connections on daemon MTA: load average: 44
Dec 27 18:16:49 ecnshux3123 sendmail[17257]: [ID 702911 mail.notice] rejecting connections on daemon MSA: load average: 44