主题: 邮件收发延迟

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:0.8.7
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):openldap
- 使用的 Linux/BSD 发行版名称及版本号:centos 6.4
- 与您的问题相关的日志信息:
张老师,你好:
  这个是我新装的一个,我们是用的是阿里云的云主机,用的时候特别不稳定,用126和qq,还有自己建的邮件服务器发,一会接送的快,这个是接收特别慢的日志:



Aug 20 18:10:59 mail postfix/anvil[19888]: statistics: max connection rate 2/60s for (smtp:219.142.31.134) at Aug 20 18:06:02
Aug 20 18:10:59 mail postfix/anvil[19888]: statistics: max connection count 1 for (smtp:219.142.31.134) at Aug 20 18:06:02
Aug 20 18:10:59 mail postfix/anvil[19888]: statistics: max cache size 1 at Aug 20 18:06:02
Aug 20 18:12:22 mail postfix/smtpd[20232]: connect from m50-110.126.com[123.125.50.110]
Aug 20 18:12:22 mail cbpolicyd[16350]: module=Greylisting, action=defer, host=123.125.50.110, helo=m50-110.126.com, from=wam7099@126.com, to=wangaimin@aixb.cn, reason=greylisted
Aug 20 18:12:22 mail postfix/smtpd[20232]: NOQUEUE: reject: RCPT from m50-110.126.com[123.125.50.110]: 451 4.7.1 <wangaimin@aixb.cn>: Recipient address rejected: Greylisting in effect, please come back later; from=<wam7099@126.com> to=<wangaimin@aixb.cn> proto=ESMTP helo=<m50-110.126.com>
Aug 20 18:12:22 mail postfix/smtpd[20232]: disconnect from m50-110.126.com[123.125.50.110]
Aug 20 18:15:42 mail postfix/anvil[20234]: statistics: max connection rate 1/60s for (smtp:123.125.50.110) at Aug 20 18:12:22
Aug 20 18:15:42 mail postfix/anvil[20234]: statistics: max connection count 1 for (smtp:123.125.50.110) at Aug 20 18:12:22
Aug 20 18:15:42 mail postfix/anvil[20234]: statistics: max cache size 1 at Aug 20 18:12:22
Aug 20 18:18:06 mail postfix/smtpd[20533]: connect from m50-110.126.com[123.125.50.110]
Aug 20 18:18:06 mail cbpolicyd[16350]: module=Greylisting, action=pass, host=123.125.50.110, helo=m50-110.126.com, from=wam7099@126.com, to=tyan@aixb.cn, reason=authenticated
Aug 20 18:18:06 mail postfix/smtpd[20533]: A00611222A6: client=m50-110.126.com[123.125.50.110]
Aug 20 18:18:06 mail postfix/cleanup[20538]: A00611222A6: message-id=<201408201745315504940@126.com>
Aug 20 18:18:06 mail postfix/qmgr[1346]: A00611222A6: from=<wam7099@126.com>, size=2289, nrcpt=1 (queue active)
Aug 20 18:18:06 mail postfix/smtpd[20533]: disconnect from m50-110.126.com[123.125.50.110]
Aug 20 18:18:06 mail amavis[19436]: (19436-05) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/spool/amavisd/tmp/amavis-20140820T070101-19436/parts: lstat() failed: Permission denied. ERROR\n"
Aug 20 18:18:06 mail amavis[19436]: (19436-05) (!)ClamAV-clamd av-scanner FAILED: CODE(0x28cf068) unexpected , output="/var/spool/amavisd/tmp/amavis-20140820T070101-19436/parts: lstat() failed: Permission denied. ERROR\n" at (eval 103) line 596.
Aug 20 18:18:06 mail amavis[19436]: (19436-05) (!!)WARN: all primary virus scanners failed, considering backups
Aug 20 18:18:15 mail postfix/smtpd[20553]: connect from mail.aixb.cn[127.0.0.1]
Aug 20 18:18:15 mail postfix/smtpd[20553]: 80362122364: client=mail.aixb.cn[127.0.0.1]
Aug 20 18:18:15 mail postfix/cleanup[20538]: 80362122364: message-id=<201408201745315504940@126.com>
Aug 20 18:18:15 mail postfix/qmgr[1346]: 80362122364: from=<wam7099@126.com>, size=2785, nrcpt=1 (queue active)
Aug 20 18:18:15 mail postfix/smtpd[20553]: disconnect from mail.aixb.cn[127.0.0.1]
Aug 20 18:18:15 mail amavis[19436]: (19436-05) Passed CLEAN, MYUSERS LOCAL [123.125.50.110] [219.142.31.134] <wam7099@126.com> -> <tyan@aixb.cn>, Message-ID: <201408201745315504940@126.com>, mail_id: bAVtAHh13KDC, Hits: 1.934, size: 2289, queued_as: 80362122364, dkim_id=@126.com, 8818 ms
Aug 20 18:18:15 mail postfix/smtp[20539]: A00611222A6: to=<tyan@aixb.cn>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.9, delays=0.11/0.01/0/8.8, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 80362122364)
Aug 20 18:18:15 mail postfix/qmgr[1346]: A00611222A6: removed
Aug 20 18:18:15 mail postfix/pipe[20554]: 80362122364: to=<tyan@aixb.cn>, relay=dovecot, delay=0.08, delays=0.01/0.01/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 20 18:18:15 mail postfix/qmgr[1346]: 80362122364: removed

然后下面这个是特别快的


Aug 20 18:21:04 mail postfix/smtpd[20711]: connect from m50-110.126.com[123.125.50.110]
Aug 20 18:21:04 mail cbpolicyd[1247]: module=Greylisting, action=pass, host=123.125.50.110, helo=m50-110.126.com, from=wam7099@126.com, to=wangaimin@aixb.cn, reason=authenticated
Aug 20 18:21:04 mail postfix/smtpd[20711]: 21C231222A6: client=m50-110.126.com[123.125.50.110]
Aug 20 18:21:04 mail postfix/cleanup[20715]: 21C231222A6: message-id=<201408201819457561797@126.com>
Aug 20 18:21:04 mail postfix/qmgr[1346]: 21C231222A6: from=<wam7099@126.com>, size=2305, nrcpt=1 (queue active)
Aug 20 18:21:04 mail postfix/smtpd[20711]: disconnect from m50-110.126.com[123.125.50.110]
Aug 20 18:21:04 mail amavis[19434]: (19434-04) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/spool/amavisd/tmp/amavis-20140820T090101-19434/parts: lstat() failed: Permission denied. ERROR\n"
Aug 20 18:21:04 mail amavis[19434]: (19434-04) (!)ClamAV-clamd av-scanner FAILED: CODE(0x28cf068) unexpected , output="/var/spool/amavisd/tmp/amavis-20140820T090101-19434/parts: lstat() failed: Permission denied. ERROR\n" at (eval 103) line 596.
Aug 20 18:21:04 mail amavis[19434]: (19434-04) (!!)WARN: all primary virus scanners failed, considering backups
Aug 20 18:21:13 mail postfix/smtpd[20730]: connect from mail.aixb.cn[127.0.0.1]
Aug 20 18:21:13 mail postfix/smtpd[20730]: AE7F9122364: client=mail.aixb.cn[127.0.0.1]
Aug 20 18:21:13 mail postfix/cleanup[20715]: AE7F9122364: message-id=<201408201819457561797@126.com>
Aug 20 18:21:13 mail postfix/qmgr[1346]: AE7F9122364: from=<wam7099@126.com>, size=2844, nrcpt=1 (queue active)
Aug 20 18:21:13 mail postfix/smtpd[20730]: disconnect from mail.aixb.cn[127.0.0.1]
Aug 20 18:21:13 mail amavis[19434]: (19434-04) Passed CLEAN, MYUSERS LOCAL [123.125.50.110] [219.142.31.134] <wam7099@126.com> -> <wangaimin@aixb.cn>, Message-ID: <201408201819457561797@126.com>, mail_id: IeQkKya97UGO, Hits: -6.011, size: 2305, queued_as: AE7F9122364, dkim_id=@126.com, 9520 ms
Aug 20 18:21:13 mail postfix/smtp[20716]: 21C231222A6: to=<wangaimin@aixb.cn>, relay=127.0.0.1[127.0.0.1]:10024, delay=9.7, delays=0.17/0.01/0/9.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as AE7F9122364)

上面特别慢的那个比特别快的先发,但是特别快的先接收到,特别慢的还没有

====

回复: 邮件收发延迟

*) 收件慢是因为灰名单的缘故。
*) 似乎你的 ClamAV 的 daemon user/group 没有权限读取 amavisd 拆分的邮件内容。贴一下命令 "id clam" 的输出看看。

回复: 邮件收发延迟

我先用id clamav

usermod clamav -G amavis

重启 amavisd 和 clamd 服务后应该就ok了

谢谢张工的解决办法