zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    c语言I博客作业02
    第六次作业
    第五次作业
    第四次作业
    第三次作业
    第二周作业
    第一周作业
    《面向学科竞赛的实验室信息管理体系构建》文献阅读随笔
    《高校学科竞赛管理系统研发与应用》文献阅读随笔
    《网络竞赛系统框架设计与功能模块实现》文献阅读随笔
  • 原文地址:https://www.cnblogs.com/chrdai/p/7727311.html
Copyright © 2011-2022 走看看