2014-07-13 20:10:24
来 源
中存储网
邮件服务器
用户在server端使用sendmail命令无法发送mail给外网的邮箱。查看了smtp服务,一切正常。bash-3.00# svcs -a |grep smtponline17:03:34 svc:/network/smtp:sendmailbash-3.0

用户在server端使用sendmail命令无法发送mail给外网的邮箱。

 

查看了smtp服务,一切正常。

 

bash-3.00# svcs -a |grep smtp

online         17:03:34 svc:/network/smtp:sendmail

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

声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。