Apple Mail – Plesk IMAP

The problem — at least in my experience — is using a Apple Mail program to access IMAP accounts served by PLESK.

The root of the problem is the number of simultaneous IMAP streams originating from a single IP address — a problem if you have multiple IMAP account on one Mac or have a number of email users behind a router (sharing the same external IP address).

This problem is exasperated if an office buys iPhones for their staff — as this double the number of IMAP streams in an office all hitting the PLESK served IMAP service.
Here’s the fix:

1) Login to the Plesk server as root.

2) Change directory:
cd /usr/lib/courier-imap/etc/

3) Edit the imapd file (I use the emacs editor for this)
emacs imapd

4) Find the line that begins with set MAXPERIP=

5) Change that line to read set MAXPERIP=40 or set MAXPERIP=60 (or higher if needed). Mine is at 80 currently.

6) Stop and Start IMAP services:
/sbin/service courier-imap stop
/sbin/service courier-imap start
This fixed this issue for me. This fix works on PLESK 7.x.x.
NOTE: I’m in the middle of migrating to PLESK 8.2.1 — and this fix can’t be applied as written because the MAXPERIP parameter is set via a variable in 8.2.1: -maxperip=$MAXPERIP

If anyone knows where to set the $MAXPERIP variable onder PLESK 8.2.1 please let me know.

part two –

Here’s the fix for PLESK 8.2.1:

Same as above — but the file to edit is located here:

cd /etc/courier-imap/
emacs imapd

Set MAXDAEMONS to 80
Set MAXPERIP to 40

By default PLESK is setup to allow only 4 IMAP streams per IP. 40 — I’ve read — is the max.


Leave a Reply