Inert Ramblings

Everything worth saying has already been said…

Inert Ramblings
September 22, 2006 by Sciri

Add more Courier-IMAP connections under Plesk

By default, UNIX-based servers running Plesk and the Courier-IMAP e-mail server drastically limit the number of inbound connections to prevent users from opening up too many concurrent sessions. Unfortunately, this artificially-low restriction can impact legitimate users who have multiple computers connecting to the Courier-IMAP server from behind a firewall or a single computer that runs an IMAP client that takes advantage of mailbox caching.

Plesk comes configured with a limit of 4 connections per IP address and a limit of 40 connections total. Modern IMAP clients such as Mozilla Thunderbird use mailbox caching to open up multiple connections to increase performance. In the case of Thunderbird, it opens up 5 connections by default which is already 1 connection more than Courier-IMAP’s default restriction. Add another few family or corporate computers behind a firewall and those additional users won’t be able to connect at all since a single Thunderbird client is already utilizing all 4 connections.

To increase this restriction, modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS and MAXPERIP to a more sane number. In the case of my configuration, I changed MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.

But even those numbers may be too low for a corporate colocated server that services an entire company. Tweak those numbers based on your employee base; if 50 employees are connecting to the e-mail server from behind the same firewall then MAXPERIP could need to go as high as 250 (50 employees times 5 cached mailbox connections). Add e-mail clients of people working from home and MAXDAEMONS could go as high as 300 or 400.

Obviously, the connection limits are to prevent the Courier-IMAP server from using too many memory and CPU resources on the machine. Tweak the numbers based on the memory footprint of each daemon process and how much memory you have.

Posted in Gnus, IDTENT. RSS 2.0 feed.
« Careful with that FedEx account number
naymz allows you to control your online identity »

37 Responses to Add more Courier-IMAP connections under Plesk

  1. Joel says:
    October 11, 2006 at 10:36 AM

    I was not aware of Plesk’s oddly low default settings. I mean until I started getting errors in Thunderbird about connection caching and then googled this post ;) Thanks for the great post!

    -Joel

  2. Pingback: Joel Mama’s Blog » Plesk Courier-IMAP connections/I love the internet

  3. Pingback: Interversal Blog » Blog Archive » Useful commands on plesk

  4. Oscar says:
    January 9, 2007 at 7:25 AM

    Thanks a lot for the tip! Apple Mail.app has severe problems with just 4 connections, so this saved my day!

  5. Central-B says:
    January 11, 2007 at 4:05 PM

    It also makes sense to check the authdaemonrc options. Too few daemons can be another bottleneck–but of course, when configuring settings, tweak and balance for the particular system’s resources and other services.

  6. VC says:
    May 16, 2007 at 4:32 PM

    Thanks a ton for the info! I found it pretty strange that the settings weren’t working for me at work, since relatively few people are using IMAP here. Things make a lot more sense after looking at the configuration file that’s set so low.

  7. Pingback: Imap - mail server - webhostingtalk.nl

  8. Ben Vallack says:
    September 15, 2007 at 5:34 AM

    What a great post – thanks. I just got a (dv) hosting account from Media Temple and was wondering why Apple Mail was throwing lots of errors. I think for this to work though I had to restart the courier server with:
    /etc/init.d/courier-imap restart

    Thanks
    Ben

  9. Pingback: stefanpausch.com » Blog Archive » Tutorkial: Plesk + Imap + Thunderbird = “Maximale Verbindungen erreicht”

  10. Pingback: IMAP und Outlook - Server Support Forum

  11. houserocker says:
    January 25, 2008 at 7:28 AM

    Thanks for the infos… hope this will help me too… Got the problem now since a long time and it’s making me sick!!

  12. Nick says:
    March 14, 2008 at 10:45 PM

    You just stopped me from pulling all my hair out. Thanks!

  13. Max says:
    April 13, 2008 at 11:20 PM

    Very useful post. Thanks!

  14. Joe says:
    April 27, 2008 at 1:57 AM

    Thank you so much for figuring this out. I want to love Plesk, but I keep bumping into these kind of stupid issues with their software.

  15. Boris says:
    June 19, 2008 at 11:22 AM

    This saved my day, too – Apple Mail was driving me insane. ;-)

  16. mark brown says:
    June 30, 2008 at 2:02 PM

    great tip. Works. God knows why tech support at theplanet did not tell me this. They said to add a gig of ram, which surprise surprise did not work, but costs $20 a month extra.

  17. online shopping says:
    July 24, 2008 at 5:22 AM

    Also wasn’t aware of the low default settings. The above poster shows how little calldesks ever know. They tend to just dish out advice from sucking their thumb, but they never do their research. If they (at least) Googled the problem they probably would have found this post or details about the default settings. Rather, they just opted for the easy option. Quite typical of calldesks.

  18. imapper says:
    October 2, 2008 at 2:04 PM

    Eggggscelent

  19. Chris Lawrence says:
    October 6, 2008 at 5:47 PM

    You sir are a genius!

    This problem was absolutely killing me!

  20. Damien says:
    October 29, 2008 at 6:29 PM

    Thank you very much for this tip. I was getting nervous while Mail.app was hanging.

    Thanks so much

  21. fine art says:
    November 11, 2008 at 7:27 AM

    What more can I say? Everybody else had said what I wanted you guys to know. Very simple post, but very effective. Keep it up!!!

  22. Pingback: Rubén Ortiz » Plesk - Añadir conexiones IMAP

  23. Pingback: agregar conexiones imap en plesk | Blog of SysAdmins

  24. Pingback: QMail + Plesk - Imap Verbindung trennt sich ständig - Server Support Forum

  25. Matthias says:
    February 5, 2009 at 7:03 AM

    Thanks, this note helped a lot!

  26. Shannon says:
    March 6, 2009 at 2:51 PM

    Hope this does the trick. Errors from my Plesk IMAP account have been annoying me forever. Thanks!

  27. Lu Vencl says:
    May 16, 2009 at 10:49 PM

    WOW!! That is all I can say.
    I have been troubleshooting IMAP problems for days and wondered why this only happened on a client that had two IPHONES, two laptops and three accounts.. Do the math and you can see what this has been hell after migrating from CPANEL to Plesk. Thanks!!!

  28. Johan van Wilsum says:
    September 20, 2009 at 2:35 AM

    Yeah a solution!!! Thanks dude!

  29. Jon says:
    December 30, 2009 at 6:22 AM

    That’s saved me a right headache! Cheers for this!

  30. Sven says:
    January 23, 2010 at 7:32 PM

    Thanks a lot for this very helpful informations!

  31. Pingback: Plesk & Mailserver : Maximale IP Verbindungen hochsetzen | Stefan Pausch

  32. Claudio says:
    March 15, 2010 at 4:49 PM

    I have the same problem with my ISP that using Plesk, I ask him to set more connections, now he said that he can’t set more than this but I have some problem already.
    Can I limit the connections from my IMAP client, that is Mail on Mac OS X 10.6?

  33. PokerMundo - Directorio de Poker Español says:
    March 30, 2010 at 6:06 AM

    Our Gambling server has only 2 GB of memory. We have around 100 websites and every website has her own email… and some webs have many email so I changed it to 200 but i am worried about the increase of resources. I experience many problems with thunderbird, i changed each account to 1 cached connection but the problem continued.

    Thanks for the post, I will test and review here in some days… when tested the new config.

  34. Pingback: IMAP connections limit fix | tim tucker dot org

  35. TK says:
    November 8, 2010 at 11:45 AM

    I’ve just solved a similar issue, only with regards to POP mail.

    I have a dedicated server running Plesk 9.5 and when I upgraded to iLife 11 and Snow Leopard this error appeared. I could quickly click “get mail” and I’d get all my mail, but only 3-4 of my 9 mail accounts would connect. Theo others would have the error:

    “The server error encountered was: The attempt to read data from the server…”

    I found solutions for those using IMAP mail here in this thread:

    modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.

    I’d made this change on my server but it didn’t seem to have any effect. It dawned on me that I’m using POP, not IMAP. So I found in /etc/courier-imap/pop3d the same settings. I changed the MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40 and voila, all my connections concurrently worked.

    This has taken me more than two days to fix and I hope posting this helps someone else with the same issue.

  36. ffab says:
    January 17, 2011 at 10:48 AM

    great article ! saved me a lot of headache ;)

  37. Kai says:
    September 17, 2011 at 4:07 PM

    Thank you thank you thank you! I had the very same problem with courier and Plesk and you saved my day / night.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories

Archives

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Pages

  • About Inert Ramblings

All content © 2012 by Inert Ramblings. WordPress Themes by Graph Paper Press