sendmail命令无法给外网邮箱发送邮件
思韵闪耀
2013-03-19
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


【版权声明】
本站部分内容来源于互联网,本站不拥有所有权,不承担相关法律责任。如果发现本站有侵权的内容,欢迎发送邮件至masing@13sy.com 举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

相关内容

将IIS设置克隆到新服务器...
将IIS设置克隆到新服务器的最佳方法是使用IIS配置文件。以下是详...
2025-06-06
搭建Git服务器及本机克隆...
Git是什么?Git是目前世界上最先进的分布式版本控制系统。SVN...
2025-03-17
ubuntu环境下搭建gi...
操作环境:服务器:Ubuntu 24.04.2 LTS+git 2...
2025-03-17
docker-compos...
1.Compose介绍 DockerCompose是一个用来定义和...
2024-04-26
firewall-cmd ...
firewalld的简要说明:firewalld 、firewal...
2024-03-15
Windows使用vlmc...
lmcsd就是一个仿真KMS管理工具,可以部署在内网或者公网可以运...
2023-12-02

热门资讯

Discus X论坛配置sen... Discuz x2.5 后台邮件设置方法其实和X2/x1.5基本一样,但很多同学都不注意一些细节,比...
redhat Linux系统配... 1 .检查Send Mail 的安装包 [root@sql root]# rpm -qa | gre...
使用Sendmail的反垃圾邮... 在最近几年,无处不在的垃圾邮件已使得所有邮件箱不堪重负,不断地需要工具以抗击这一无穷尽的垃圾邮件流。...