我有一个与 dovecot 2.2.36 和 postfix 3.3.1 交互的 Java Web 应用程序,并且我看到应用程序日志中的错误如下:
Java 应用程序日志:
04-06-2023 10:18:40 ERROR http-nio-8080-exec-58 comun.Correos:198 - javax.mail.AuthenticationFailedException: [UNAVAILABLE] Maximum number of connections from user+IP exceeded (mail_max_userip_connections=10)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:717)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
04-06-2023 10:18:43 ERROR http-nio-8080-exec-66 comun.Correos:198 - javax.mail.AuthenticationFailedException: [UNAVAILABLE] Maximum number of connections from user+IP exceeded (mail_max_userip_connections=10)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:717)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
04-06-2023 10:25:21 ERROR http-nio-8080-exec-59 comun.Correos:198 - javax.mail.AuthenticationFailedException: [UNAVAILABLE] Maximum number of connections from user+IP exceeded (mail_max_userip_connections=10)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:717)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
在 /var/log/maillog 中也会发生这种情况:
Apr 5 16:11:01 java-app dovecot[24959]: imap-login: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=10): user=<[email protected]>, method=PLAIN, rip=192.168.1.10, lip=192.168.1.10, TLS, session=<fdhslshkjdsd>
尽管如此,我检查了 /etc/dovecot/conf.d/20-imap.conf 的内容,它显示以下配置:
protocol imap {
mail_max_userip_connections = 1000
}
Dovecot 已重新启动,但仍然出现相同的错误。可能是 20-imap.conf 文件无法识别。
如果设置了 mail_max_userip_connections = 1000,为什么日志会报告 mail_max_userip_connections=10?