我/var/log/mail.log
经常被 Dovecot 连接/断开连接消息淹没,如下所示:
Mar 29 18:15:48 summit dovecot: IMAP(foo@bar.baz): Disconnected: Logged out bytes=63/2126
Mar 29 18:15:50 summit dovecot: imap-login: Login: user=<baz@bar.foo>, method=PLAIN, rip=4.3.2.1, lip=1.2.3.4, TLS
Run Code Online (Sandbox Code Playgroud)
这些是无限重复的(每天 11MB 的日志),并且它们掩盖了更重要的身份验证失败和 Postfix 交付/接收。我已经检查了Dovecot 的 wiki 页面以进行记录,但没有选项可以阻止这些消息。我可以在其中设置任何配置变量dovecot.conf
来阻止将这些消息发送到mail.log
吗?
澄清:我仍然希望 Dovecot 登录mail.log
;我只是不希望它记录这些无聊的连接/断开消息。
在通过我的邮件服务器发送的每封电子邮件之后,postfix/anvil
附加如下内容:
Nov 9 15:09:11 keutenberg postfix/anvil[30006]: statistics: max connection rate 1/60s for (smtp:103.28.42.75) at Nov 9 15:02:42
Nov 9 15:09:11 keutenberg postfix/anvil[30006]: statistics: max connection count 1 for (smtp:103.28.42.75) at Nov 9 15:02:42
Nov 9 15:09:11 keutenberg postfix/anvil[30006]: statistics: max message rate 1/60s for (smtp:103.28.42.75) at Nov 9 15:02:43
Nov 9 15:09:11 keutenberg postfix/anvil[30006]: statistics: max cache size 1 at Nov 9 15:02:42
Run Code Online (Sandbox Code Playgroud)
我明白为什么要记录这些消息(我设置了限制),但我找不到任何方法来更改anvil
的日志级别(即,禁止来自 的这些信息性消息mail.log
)。是否有我可以使用的设置main.cf
来禁用这些统计消息?我宁愿在源头阻止它们,也不愿通过系统日志设置来抑制它们。