Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: To increase the number of Courier-IMAP connections for my Parallels Plesk Panel  (Read 3179 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest
Mail users see this error in an email client (like Thunderbird or Outlook or Horde) when accessing their mailboxes:

Code: [Select]
ERROR:
Unable to connect to your IMAP server.
You may have exceeded the maximum number of connections to this server.

or this one:

Code: [Select]
Error reading from network: cause: connection closed by foreign host
or the following error in Horde:

Code: [Select]
Error when communicating with the server
The following can be found in the server maillog (example):

Code: [Select]
courier-pop3d: Maximum connection limit reached for ::ffff:10.0.0.1
By default, Parallels Plesk Panel (Plesk) and a Courier email server limit the number of inbound connections to prevent users from opening up too many concurrent sessions. Unfortunately, this restriction can impact legitimate users who have multiple computers connecting to a Courier-IMAP/Courier-POP3 server from behind a firewall or a single computer running a mail client that takes advantage of mailbox-caching.


To remove this restriction and increase the permitted number of inbound connections, you can modify your IMAP/POP3 configuration file. The IMAP configuration is located at /etc/courier-imap/imapd, while POP3 configuration is located at /etc/courier-imap/pop3d.

Make a backup before changing any data:

Code: [Select]
cp -a /etc/courier-imap/imapd{,.backup}
cp -a /etc/courier-imap/pop3d{,.backup}

Replace the following settings for IMAP:

Code: [Select]
sed -i 's/^MAXDAEMONS=40/MAXDAEMONS=80/g' /etc/courier-imap/imapd
sed -i 's/^MAXPERIP=4/MAXPERIP=40/g' /etc/courier-imap/imapd

Replace the following settings for POP3:

Code: [Select]
sed -i 's/^MAXDAEMONS=40/MAXDAEMONS=80/g' /etc/courier-imap/pop3d
sed -i 's/^MAXPERIP=4/MAXPERIP=40/g' /etc/courier-imap/pop3d

To apply the changes, restart the Courier-IMAP/Courier-POP3 service:

Code: [Select]
/etc/init.d/courier-imapd restart
/etc/init.d/courier-pop3d restart

Thank you,