• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Courier-IMAP looses SSL connection after some hours

  • Thread starter Deleted member 121791
  • Start date
D

Deleted member 121791

Guest
I'm using psa-Courier-IMAP (3.0.8) Plesk 10.3.1 (Debian 6 x64) on a server with several clients.

After a while (occurs after 0.5 hr up to hours) imap one or more clients loosing SSL connection to Courier-IMAP.
/etc/var/log says:
Code:
/var/log/mail.log:Nov  7 09:21:09 server2 imapd: Unexpected SSL connection shutdown.
/var/log/mail.log:Nov  7 09:21:09 server2 imapd: 1320654069.442085 DISCONNECTED, user=test@******.de, ip=[::ffff:87.140.***.***], headers=0, body=0, rcvd=78, sent=648, maildir=/var/qmail/mailnames/********.de/test/Maildir

IDLE is activated as you can see:
Code:
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=PLAIN IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.
00001 LOGIN "test@mein_server12345.de" "12345678901234567890"
00001 OK LOGIN Ok.
00002 IDLE
00002 + entering idle mode

IMAP connections to server already increased (in /etc/courier-imap/imap):
MAXDAEMONS=40
MAXPERIP=10

How can i fix these connection breaks in the IMAP server to achieve stable IMAP connection?
 
Last edited by a moderator:
I'm using psa-Courier-IMAP (3.0.8) Plesk 10.3.1 (Debian 6 x64) on a server with several clients.

After a while (occurs after 0.5 hr up to hours) imap one or more clients loosing SSL connection to Courier-IMAP.
/etc/var/log says:
Code:
/var/log/mail.log:Nov  7 09:21:09 server2 imapd: Unexpected SSL connection shutdown.
/var/log/mail.log:Nov  7 09:21:09 server2 imapd: 1320654069.442085 DISCONNECTED, user=test@******.de, ip=[::ffff:87.140.***.***], headers=0, body=0, rcvd=78, sent=648, maildir=/var/qmail/mailnames/********.de/test/Maildir
IDLE is activated as you can see:
Code:
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=PLAIN IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.
00001 LOGIN "test@mein_server12345.de" "12345678901234567890"
00001 OK LOGIN Ok.
00002 IDLE
00002 + entering idle mode
IMAP connections to server already increased (in /etc/courier-imap/imap):
MAXDAEMONS=40
MAXPERIP=10

How can i fix these connection breaks in the IMAP server to achieve stable IMAP connection?

My IMAP settings:

MAXDAEMONS=512
MAXPERIP=256

Hopefully will it works
 
I second Edward. I use:

MAXDAEMONS=512
MAXPERIP=100

MAXPERIP defines con-current connections to the server from behind the same IP address.
 
Thanks for your information on your systems.

Hmm. I thought not enough connections per IP could not be the problem because the connection breaks occur with only 1 Mailclient too!
MAXDAEMONS=512
MAXPERIP=100
MAXDAEMONS with 512 is very high. This could lead in exhausting resources in case of attacks.

But i'll try it by increasing the values and test it.
 
We have around ~6000 email accounts on one of our production servers with 16 GB of RAM. Around 3000 accounts are accessed from behind the same IP. We've been running this configuration stably for the last 3-4 months.
 
I second Edward. I use:

MAXDAEMONS=512
MAXPERIP=100

MAXPERIP defines con-current connections to the server from behind the same IP address.


Standard settings are too low by a fresh install of Plesk.
 
MAXDAEMONS=512
MAXPERIP=100
Sad, to say, but increasing the values does not solve my problem.
Seems to be a stability problem running psa-courier with SSL on Debian 6.
 
Back
Top