sendmail 启动慢 发送邮件慢的解决办法 彻底解决

时间:13-06-21 栏目:技术 作者:liva 评论:0 点击: 5,903 次

这个问题关键就是hosts里面对于本机host的设置有问题,搜索遍网上大部分教程,都是指定hostname,真的有用吗?没用,关键的地方并没有指出来,你可以看下/var/log/mail.log

image

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

My unqualified host name (aliyun) unknown; sleeping for retry

我的hostname是aliyun,我在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 aliyun aliyun.

解决问题,重启sendmail

service sendmail restart

然后测试下,速度快很多了。

声明: 本文由( liva )原创编译,转载请保留链接: sendmail 启动慢 发送邮件慢的解决办法 彻底解决

sendmail 启动慢 发送邮件慢的解决办法 彻底解决:等您坐沙发呢!

发表评论


购物推荐

赞助商

© 2013 enjoydiy.com. Design by zijiao. 57 queries in 0.318 seconds, using 21.01MB memory