Plesk 17.x courier-imaps: Maximum connection limit reached for IP

Imagine you got 5 people in the office and IMAP randomly fails for some people, you are unable to receive or send emails and Apple Mail gives you a vague error “Verify that the username and password are correct”.

Chances are you are hitting the PERIP limit.
Take a look at /var/log/maillog, look for these errors:

Jan 1 12:41:34 109 courier-imapd: Maximum connection limit reached for ::ffff:XXX.XXX.XXX.XXX
Jan 1 12:41:34 109 courier-imapd: Maximum connection limit reached for ::ffff:XXX.XXX.XXX.XXX

Edit these 2 files
/etc/courier-imap/imapd
/etc/courier-imap/imapd-ssl

Edit both of them, you need to change these 2 lines in the first one, and add to the -ssl version:

MAXDAEMONS = 160
MAXPERIP = 120

You can make the same changes in /etc/courier-imap/pop3d and pop3d-ssl

You need to restart imap service for these settings to take affect, on regular centos you run

~# systemctl restart courier-imap

but if you are running Plesk, the service won’t even exist, instead you need to do

~# /usr/local/psa/admin/sbin/mailmng --restart-service

Write a Comment

Comment