Score:0

Why the /var/log/maillog reports mail_max_userip_connections=10 if set for mail_max_userip_connections = 1000 in dovecot?

ve flag

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?

anx avatar
fr flag
anx
Compare against the *effective* configuration (which you can dump using the `doveconf` program) that would rule out editing a file that is not parsed / has no effect due to conflicting settings elsewhere.
anx avatar
fr flag
anx
Whatever you are doing, there is probably a better place to resolve this. Few sane setups should run into the 10 connection limit. Possibly you are seriously lacking privilege separation (sharing users/sessions/credentials between many users that should have differing access restrictions) or software quality (running into the limit because the application fails to properly reuse or close connections).
user3637971 avatar
ve flag
I executed doveconf -a | grep "mail_max_userip_connections" and the value was showing 10. So what I did is adding the instruction !include conf.d/*.conf in dovecot.conf file and finally I restarted dovecot service. The property mail_max_userip_connections started to be considered.
anx avatar
fr flag
anx
Sounds like you got a solution. Please use the *answer* section below to share with future readers on how you figured and what eventually did the trick.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.