【问题标题】:Postfix smtpd - constant connect and disconnect in /var/log/mail.logPostfix smtpd - 在 /var/log/mail.log 中不断连接和断开连接
【发布时间】:2019-03-03 07:26:17
【问题描述】:

我正在使用 postfix v3.3.0 设置新服务器 (Ubuntu 18.04.1 LTS)。

我遵循 postfix 到仅发送设置的标准部署。

http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client

1 /etc/postfix/main.cf:
2     myhostname = hostname.example.com
3     myorigin = $mydomain
4     relayhost = $mydomain
5     inet_interfaces = loopback-only
6     mydestination =

我可以将电子邮件从服务器发送到电子邮件,并且可以正常工作。

但是,当我列出所有端口 25 侦听器时,我看到以下内容:

lsof -Pi | grep :25
master    13753            root   13u  IPv4 274638      0t0  TCP localhost:25 (LISTEN)
master    13753            root   14u  IPv6 274639      0t0  TCP localhost:25 (LISTEN)
smtpd     13770         postfix    6u  IPv4 274638      0t0  TCP localhost:25 (LISTEN)
smtpd     13770         postfix    7u  IPv6 274639      0t0  TCP localhost:25 (LISTEN)

根据谷歌的挖掘,我发现 smtpd 用于接收传入的电子邮件,但是我不想接收电子邮件而只是发送。

同样在 /var/log/mail.log 中,我反复看到以下几行。如何停止与 localhost 的持续连接和断开连接?

Sep 27 07:15:52 mymachine postfix/smtpd[13780]: connect from localhost[::1]
Sep 27 07:15:52 mymachine postfix/smtpd[13780]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
Sep 27 07:17:52 mymachine postfix/smtpd[13787]: connect from localhost[::1]
Sep 27 07:17:53 mymachine postfix/smtpd[13787]: disconnect from localhost[::1] helo=1 quit=1 commands=2
Sep 27 07:17:53 mymachine postfix/smtpd[13787]: connect from localhost[::1]
Sep 27 07:17:53 mymachine postfix/smtpd[13787]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
Sep 27 07:19:53 mymachine postfix/smtpd[13790]: connect from localhost[::1]
Sep 27 07:19:53 mymachine postfix/smtpd[13790]: disconnect from localhost[::1] helo=1 quit=1 commands=2
Sep 27 07:19:53 mymachine postfix/smtpd[13790]: connect from localhost[::1]
Sep 27 07:19:53 mymachine postfix/smtpd[13790]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2

任何想法可能是什么问题?

谢谢。

【问题讨论】:

    标签: postfix-mta


    【解决方案1】:

    这是由 monit 进行的正确健康检查(参见 linux 手册页 monit)。要手动更改 ping 速率,请打开文件 monitrc (nano /etc/monit/monitrc) 并更改行

    set daemon 120 # check services at 10-minute intervals

    到你想要的任何 ping 速率。

    【讨论】:

      【解决方案2】:

      好的 - 在我的环境中进行了几次挖掘之后,我发现每 2 分钟就会有一次 monit ping 来检查端口#25 上 postfix 的状态。因为它是仅发送设置,其中 SMTPD 守护程序被禁用以侦听端口#25。

      我知道它现在看起来很琐碎,但只是想提一下这篇文章,这样当有人遇到它时会省去很多挫败感。

      【讨论】:

      • 嘿!你能详细说明一下吗?我正在尝试找出如何更改此超时的持续时间,但到目前为止还没有运气
      猜你喜欢
      • 2014-07-17
      • 1970-01-01
      • 2017-07-17
      • 2021-10-17
      • 2015-12-03
      • 2018-10-04
      • 1970-01-01
      • 1970-01-01
      • 2016-08-21
      相关资源
      最近更新 更多