The Courier IMAP Server

”General”

Copyright 1999-2008, Double Precision, Inc. This software is distributed under the terms of the GNU General Public License. See COPYING for additional information. The Courier IMAP server is a fast, scalable, enterprise IMAP server that uses Maildirs. Many E-mail service providers use the Courier IMAP server to easy handle hundreds of thousands of mail accounts. With its built-in IMAP and POP3 aggregation proxy, the Courier IMAP server has practically infinite horizontal scalability. In a proxy configuration, a pool of Courier servers service initial IMAP and POP3 connections from clients. They wait to receive the client’s log in request, look up the server that actually holds this mail account’s mailbox, and establish a proxy connection to the server, all in a single, seamless process. Mail accounts can be moved between different servers, to achieve optimum resource usage.

The only practical limitation on the Courier IMAP server is available network and I/O bandwidth. If you are new to the Courier IMAP server, this may sound a bit intimidating. But you do not need to tackle everything at once. Start by taking small, easy steps. Your first step will be to set up a small the Courier IMAP server server, using it like any other traditional IMAP service, on a single server. After you gain experience and become comfortable with Courier, you can then begin exploring its advanced features.

This is the same IMAP server that’s included in the Courier mail server, but configured as a standalone IMAP server that can be used with other mail servers – such as Qmail, Exim, or Postfix – that deliver to maildirs. If you already have Courier installed, you do not need to download this version. If you install this version, you must remove it if you later install the entire Courier server.

The following pages provide additional background and supporting documentation. You can jump anytime to the download page using the top menu bar.

”Features”

  • Extremely small footprint. On x86, the Courier IMAP server’s main daemon is a fraction of the size of the UW-IMAP server, and has a greatly reduced memory footprint.
  • Uses the Courier Authentication Library for authenticating mail accounts.
  • Ability to restrict the maximum number of IMAP logins, and the maximum number of logins from the same IP address. This will prevent denial-of-service attacks where the attacker attempts to overload the server with multiple login connections.
  • Shared folders. With additional server-side setup, folders can be shared between groups of accounts.
  • IMAP over SSL. If OpenSSL or GnuTLS is installed, the Courier IMAP server will, optionally, accept IMAP connections over SSL. The IMAP STARTTLS extension is also implemented.
  • Authentication using SSL certificates.
  • IPv6 support, if available.
  • IMAP extensions that implement server-side sorting. This can be optionally disabled in environments that have limited resources.
  • The Courier IMAP server implements many popular IMAP protocol extensions that provide value-added functionality with most popular IMAP clients.
  • Sorting and searching in non-English character sets. Download the source code to obtain a list of currently supported character sets.
  • A compatible POP3 server is also included in the Courier IMAP server package, that uses the same authentication modules. The POP3 server can only access the INBOX, and cannot access any folders.
  • An experimental mail access protocol, SMAP.
  • IMAP/POP3 proxying. It is possible to distribute all mailboxes between multiple servers. A separate server (or a pool of servers) accepts all IMAP/POP3 connections, then connects to the right server based on the mailbox the connecting client is logging into.

”Download”

Before downloading the Courier IMAP server, you MUST download and install the Courier Authentication Library. This library is standalone module that maps login IDs and passwords to their mailboxes. Use the tools in the courier-authlib package to check if the authentication library is working, recognizes the login passwords, and displays the correct mailbox location. Until you get the authentication library working first, you will not be able to use the Courier IMAP server.

Download the Courier IMAP server from: http://www.courier-mta.org/download.html#imap, then read its INSTALL file for more instructions.

Source Code Repository

See http://www.courier-mta.org/status.html for more information.

Building RPMs

It is possible to create binary RPM packages directly from the source code tarball. Follow the instructions in the Courier FAQ for building the RPM packages as a non-root user.

Note

The binary RPM will not install if you have another IMAP or a POP3 server installed. The binary RPM installs its own /etc/pam.d/imap and /etc/pam.d/pop3 configuration files, which are likely to conflict with the PAM configuration file from another IMAP or POP3 server. If you previously installed another IMAP or a POP3 server without using RPM, the Courier IMAP server will successfully install and immediately overwrite your existing /etc/pam.d/imap and /etc/pam.d/pop3 files.

”Documentation”

”Links”

Subscribe to the courier-imap mailing list from its page, or send a message to <courier-imap-request@lists.sourceforge.net> and put “subscribe” in the subject line.

This mailing list does not accept mail from non-subscribers. You must subscribe to the list before sending any messages.

Linux manual pages

Using Postfix with Courier-IMAP

The book Postfix talks about configuring the Postfix mail server to deliver to Maildirs, for the Courier IMAP server.

Step-by-step instructions w/ screenshots for getting Mozilla 1.2.1, Outlook 2000, and Outlook Express 6 to work with the Courier IMAP server.

Courier-IMAP + Maildrop + QMail with Virtual Domains HOWTO – self explanatory.

Install and Test Qmail with POP, IMAP and WebMail – a step by step tutorial on setting up a turn-key mail server.

http://www.gallowglass.org – how to setup your own private CA and then generate signed SSL certs for POP and IMAP over SSL.

Qmail FreeBSD toaster – another step by step tutorial, this one is based on FreeBSD.

Qmail VMailMgr and Courier-IMAP HOWTO – extensive documentation on integrating the Courier IMAP server with the Qmail mail server and the VMailMgr virtual domain manager.

A patch to use DRAC with the Courier IMAP server is available at http://aelyn.hell-city.org/courier-imap-popd-drac.patch.

SecurityFocus’s article titled “Clear Text Communication: Slaying the Beast Part II” talks about general issues concerning E-mail and security. the Courier IMAP server is briefly mentioned in this article.

A patch that logs additional accounting information to syslog: ftp://ftp.aerasec.de/pub/linux/courier-imap/.

Copyright © 2012