linux sendmail 发送缓慢的问题

这个问题关键就是hosts里面对于本机host的设置有问题,你可以看下/var/log/mail.log

retry 和 sleeping,再加上其他时间,用sendmail发送邮件等这么久,太累了吧,说说上面的错误:

My unqualified host name (justswitch-64) unknown; sleeping for retry

我的hostname是justswitch-64,我在hosts里面已经制定了本机的ip地址,为什么还是不行,还是找不到,继续

执行sendmail –v

提示:

WARNING: local host name (testdb) is not qualified; see cf/README: WHO AM I?
Recipient names must be specified

vim /usr/share/doc/sendmail/README.cf
+-----------+
| WHO AM I? |
+-----------+
Normally, the $j macro is automatically defined to be your fully
qualified domain name (FQDN).  Sendmail does this by getting your
host name using gethostname and then calling gethostbyname on the
result.  For example, in some environments gethostname returns
only the root of the host name (such as "foo"); gethostbyname is
supposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
cases, gethostbyname may fail to return the FQDN.  In this case
you MUST define confDOMAIN_NAME to be your fully qualified domain
name.  This is usually done using:
Dmbar.com
define(`confDOMAIN_NAME', `$w.$m')dnl

 

都是一个点惹的祸,在hosts里面添加

127.0.0.1 justswitch-64 justswitch-64

解决问题,重启sendmail

service sendmail restart

然后测试下,速度快很多了。而且还把重启 sendmail 的速度也提升了,基本上是秒启。

 

看过该博主的帖子解决了该问题,感谢!

连接:http://www.enjoydiy.com/1472.html

转载于:https://www.cnblogs.com/chrdai/p/7727311.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值