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

  • 相关阅读:
    href 和src 的区别
    一道返回不重复数组的测试题
    使用Node.js+Socket.IO搭建WebSocket实时应用
    WebSocket 是什么原理?为什么可以实现持久连接?
    图片异步加载
    30分钟新手git教程
    通过ajax异步调用返回值
    [JS] 让人犯晕的JavaScript变量赋值
    javaScript字符串操作
    (String),toString(),String.valueOf()
  • 原文地址:https://www.cnblogs.com/chrdai/p/7727311.html
Copyright © 2011-2022 走看看