imap

Disabling IDLE in courier-imap

Apple and BlackBerry email clients has a configurable setting to use the IMAP IDLE functionality to stay logged in, periodically checking email. This causes imapd to run out of daemons and stop responding. One solution is to raise MAXDAEMONS in /etc/courier-imap/imapd, but will eventually cause high loads on the server.

The better solution is to disable IDLE entirely in /etc/courier-imap/imapd by removing "IDLE" option from "IMAP_CAPABILITY".

Change:

IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"

To:

IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA"

Upon courier-imap restart, this should prevent connections from persisting.

Telnet to imap port 143 to verify that the IDLE option is not present anymore in CAPABILITY response from the server.

Plesk imap connections limit

By default Plesk IMAP maximum connections per IP is set to 4. If you are using an email client that checks multiple mailboxes, this limit is easily reached.

To increase the limit, edit "/etc/courier-imap/imapd":

MAXDAEMONS=80
MAXPERIP=40

uw-imap custom mail folder configuration

To allow custom mailbox folder for individual user:

Add/Edit "/etc/c-client.cf":

set allow-user-config 1

Add/Edit "~/.imaprc" for corresponding user:

set mail-subdirectory mail

All corresponding email files will now reside in the ~/mail folder for the corresponding user.

Comment