我继承了一个长期工作的 postfix,它带有 courier imap 盒,运行普通的 smtp。它似乎使用 fail2ban 进行某种防火墙保护(从未使用过 fail2ban),根据 /var/log/messages,我们的盒子上收到大量尝试,这可能是正常的。
邮件机器上的 htop 看起来不错,除了内存使用量可能为 2.53(总内存使用量为 6 左右)。似乎有点高。无论从客户端单击电子邮件上的发送,电子邮件都需要几分钟才能最终“发送”。许多用户也退出了他们的客户端(我在 Android 上的 Outlook 应用程序上退出了)。我完全从手机上删除了该帐户并尝试添加它,但它无法连接到外发邮件服务器,尽管我知道密码是正确的。
(我可以在 /var/log/maillog 中看到这样的条目)
2020-06-22 09:45:45.459 xmail postfix/smtpd[2592]: 从 c-98-230-220-31.hsd1.nm.comcast.net[98.230.224.38] 连接
2020-06-22 09:48:39.527 xmail imapd:连接,ip=[::ffff:98.230.224.38]
2020-06-22 09:48:40.006 xmail imapd:登录,[电子邮件保护],IP=[::ffff:98.230.224.38],端口=[50411],协议=IMAP
2020-06-22 09:48:55.932 xmail postfix/smtpd[2592]:从 c-98-230-220-31.hsd1.nm.comcast.net[98.230.224.38] 验证后丢失连接
...是我尝试连接手机时看到的。(在移动端,它只是失败并显示超时)
我不知道从哪里开始寻找速度变慢的原因,以及某些客户端无法连接或断开连接且无法重新连接的原因。
对我来说,这一切感觉像是某个地方(在服务器或客户端上)的认证问题,但不确定在哪里查找或如何检查该理论。我们确实有一个 cronjob,每周执行一次 cert-bot 自动更新,然后将目录更改为 /etc/letsencrypt/live/xmail.... 并将一些 privkey.pem、cert.pem 和 fullchain.pem 全部复制到 courrier.pem 中。然后它说 courier-imap-ssl restart 和 pop3d-ssl restart
我查看了日志,它没有告诉我任何错误,但邮件日志中确实说了很多类似的上述内容(关于连接被拒绝或断开等)
使用 Squirrel Mail 时,连接或发送邮件没有任何问题,运行非常顺畅。
所有这些问题似乎都是在大约一周到一个半星期前出现的,而且看来事情多年来一直进展顺利。
centos box courier imap postfix/smtp
当我尝试从我的客户发送电子邮件时,我的收件箱中也收到了一条新消息:
您的邮件未能送达部分或全部预期收件人。
Subject: postfix issue
Sent: 6/22/2020 1:31 PM
无法联系到以下收件人:
'[email protected]' on 6/22/2020 1:35 PM
Server error: '451 4.3.0 <[email protected]>: Temporary lookup failure'
这可能是我们的 DNS 服务器的 DNS 问题吗?
Shane ps 我刚刚从我的 WSL 安装的 Ubuntu 或 Mutt 中进行了简单的设置。配置它我思考正确,现在点击发送总是说:
无法连接到 mysmtp.blah.com(资源暂时不可用)。
所以也许可以解释为什么像 thunderbird 等客户端需要很长时间才能发送电子邮件?但不知道是什么会突然导致这种缓慢(重新启动了 VM imap/postfix 运行几次)
/var/log/maillog 中的一些日志条目 | grep 错误
2020-06-23 06:47:26.253 xmail amavis[7427]: (07427-01-7) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:47:41.895 xmail amavis[7111]: (07111-02-3) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:47:57.085 xmail amavis[7427]: (07427-01-8) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:48:11.329 xmail amavis[7111]: (07111-02-4) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:48:27.362 xmail amavis[7427]: (07427-01-9) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:48:48.961 xmail amavis[7111]: (07111-02-5) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:48:56.723 xmail amavis[7427]: (07427-01-10) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:49:21.196 xmail amavis[7111]: (07111-02-6) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:49:29.393 xmail amavis[7427]: (07427-02) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:49:51.207 xmail amavis[7111]: (07111-02-7) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:50:00.136 xmail amavis[7427]: (07427-02-2) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:50:29.001 xmail amavis[7111]: (07111-02-8) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:50:31.521 xmail amavis[7427]: (07427-02-3) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
2020-06-23 06:51:05.472 xmail amavis[7111]: (07111-02-9) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 132) line 659.\n
还有 /var/log/maillog 的尾部(Squirrel Mail 现在也需要一段时间才能发出消息。
2020-06-23 07:04:35.879 xmail imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1]
2020-06-23 07:04:36.690 xmail imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1]
2020-06-23 07:04:36.977 xmail imapd: Disconnected, ip=[::ffff:127.0.0.1], time=7
2020-06-23 07:04:36.988 xmail postfix/smtpd[5865]: warning: unknown[46.38.148.2]: SASL LOGIN authentication failed: authentication failure
2020-06-23 07:04:36.989 xmail postfix/smtpd[5865]: disconnect from unknown[46.38.148.2]
2020-06-23 07:04:36.990 xmail postfix/smtpd[5865]: connect from unknown[46.38.148.10]
2020-06-23 07:04:36.990 xmail postfix/smtpd[5865]: disconnect from unknown[46.38.148.10]
2020-06-23 07:04:36.990 xmail postfix/smtpd[5865]: connect from unknown[46.38.145.6]
2020-06-23 07:04:36.995 xmail imapd: Connection, ip=[::ffff:127.0.0.1]
顺便说一下,这个 @nmsu.edu 我们已经看到了很多尝试,这几乎就像有人拿一本名字字典并连接 @nmsu.edu 并看看哪些会成功?我们在这个服务器上以某种方式运行了 fail2ban(我通过这个不断了解更多有关它的信息)