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

  • 相关阅读:
    STM32时钟树
    js jQuery函数 $.ajax()
    jQuery 语法
    jQuery介绍
    python笔记2 生成器 文件读写
    python笔记1,语法,函数,类和实例,异常
    Scrapy爬虫入门系列4抓取豆瓣Top250电影数据
    Scrapy爬虫入门系列3 将抓取到的数据存入数据库与验证数据有效性
    opus 规范 与参数解析
    开源播放器ijkplayer源码结构
  • 原文地址:https://www.cnblogs.com/chrdai/p/7727311.html
Copyright © 2011-2022 走看看