Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just deployed postfix, saslauthd, courier to a starter VPS box running Ubuntu 8.04 with with 512MB of memory. Most of the memory is now being eaten up by these processes.

I do plan to upgrade to a plan with more RAM and eventually switch dedicated hardware. But in the meantime can anybody point me to some resources to help me tune the configuration.

share|improve this question

closed as too broad by womble, kasperd, masegaloeh, Ward, Cristian Ciupitu Aug 25 '15 at 16:30

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

There aren't really many tunables in courier - you can tune the underlying machine, not the software itself.

That being said, there are some things you can do to improve performance:

  1. More RAM. I know you're planning to do that and I know it's not what you want to hear, but it's the single best bet on improving performance - both by allowing courier to keep more connections open (IMAP takes 512K up to 2M per connected client), and by allowing a bigger file system cache. Go 64-bit if possible and throw 8 or 16 GB at the mail server. RAM is cheap. Time is not.

  2. Make sure you've mounted the file system hosting your maildirs with the noatime option. That supposedly interferes with the mutt mail client but in my experience has never, ever caused any problem. If you really must and run a newer kernel, you can use relatime - but noatime improves performance a lot.

  3. Pick a good file system. ext3 will sooner rather than later show its limitations (abysmal performance with many files in the same directory, constant stalling due to fsync, etc.) I've used XFS for years (can't get people to archive their mails in subfolders and I've found XFS to be the only file system that's both able to easily handle tens of thousands of files in a directory and not prone to horrific slowdown over time (yes, ReiserFS, I'm looking at you.)

  4. If you're using IMAP, limit the number of cached connection in your IMAP client configuration (in Thunderbird, you'll find that under Account Settings -> desired account -> Server Settings -> click on the Advanced button on the right -> set Maximum number of server connections to cache to 1 or 2, or at least something saner than the default 5.

  5. If you're using IMAP through some webmail system or the other, please consider installing an IMAP proxy, otherwise you'll cause constant re-logins due to the nature of web applications. A package compatible with Courier is up-imapproxy.

share|improve this answer
Thanks for the detailed response. More RAM is definitely a route I will be taking. I was looking for other options because my provider's sales department is closed for a the bank holiday weekend in Ireland. – bmatthews68 May 3 '09 at 13:31
Sorry, no magic bullets :( – Mihai Limbăşan May 3 '09 at 15:54

The following will get you started on tuning Postfix, unfortunately, I wasn't able to find any real good documentation on SaslAuthD or Courier.

Postfix Performance Tuning:

share|improve this answer

I haven't run courier for a long time but it might be worth looking at dovecot, which I find to be quite lightweight for a POP3 & IMAP server.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.