秀米云香港服务器

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

序列号 CPU RAM HDD 带宽 售价(美元) 免费试用
香港服务器1 E5-2620 32G 1T HDD 50M/无限流量 $196.00 立即申请
香港服务器2 E5-2650 32G 1T HDD 50M/无限流量 $256.00 立即申请
香港服务器3 E5-2680 32G 1T HDD 50M/无限流量 $316.00 立即申请
香港服务器4 E5-2690 32G 1T HDD 50M/无限流量 $336.00 立即申请
香港服务器5 E5-2697 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器6 E5-2620*2 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器7 E5-2650*2 32G 1T HDD 50M/无限流量 $436.00 立即申请
香港服务器8 E5-2680*2 32G 1T HDD 50M/无限流量 $476.00 立即申请
香港服务器9 E5-2690*2 32G 1T HDD 50M/无限流量 $556.00 立即申请
香港服务器10 E5-2697*2 32G 1T HDD 50M/无限流量 $596.00 立即申请
香港服务器11 E5-2680v4*2 32G 1T HDD 50M/无限流量 $696.00 立即申请
香港服务器12 E5-2698v4*2 32G 1T HDD 50M/无限流量 $796.00 立即申请

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

bash-3.00# svcs -a |grep smtp

online17: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

标题:sendmail命令无法给外网邮箱发送邮件

地址: https://www.yunhk.xyz/25354.html