I have a Java web application which interacts with dovecot 2.2.36 and postfix 3.3.1 and I see errors from application log as keeps:
Java application Log:
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)
Also happens in /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>
Even though, I check the content of /etc/dovecot/conf.d/20-imap.conf and it says the following configuration:
protocol imap {
mail_max_userip_connections = 1000
}
Dovecot has been restarted but it keeps with the same errors. Maybe 20-imap.conf file is not recognized.
Why the log reports mail_max_userip_connections=10 if set for mail_max_userip_connections = 1000?