Courier is one of the most known mail delivery agent. It only supports Maildir mailboxes and can be integrated with external databases (LDAP, MySQL, etc.). You will find a complete description on how to setup a virtual Postfix + Courier mail system on PostfixCompleteVirtualMailSystemHowto. A simpler setup is described at PostfixAmavisNewClamAVSpamAssassin. To setup email in a generic way, look at the Ubuntu manual, for example at the the ubuntu servierguide/email (6.06). In this howto, a basic Courier installation will be described: it will deliver mail to local existing users, mailbox will be situated in home directory. User accounts can be on an NFS file system (this is on of the advantage of Courier).
For installing courier, install the following packages:
courier-imap courier-imap-ssl (see InstallingSoftware)
If you want pop3 support, also install
The configuration options are all located in
/etc/courier/imapd for imap daemon and in
/etc/courier/imapd-ssl for imap-ssl daemon. For a first installation, the default options perfectly match most of the needs. So no modification will be done.
Courier authenticates using PAM out of the box.
Basically, Maildir folders are located in the user home directory. That's a good idea to create Maildir for future users:
maildirmake /etc/skel/Maildir maildirmake /etc/skel/Maildir/.Drafts maildirmake /etc/skel/Maildir/.Sent maildirmake /etc/skel/Maildir/.Trash maildirmake /etc/skel/Maildir/.Templates
Then, for an existing user:
cp -r /etc/skel/Maildir /home/myuser/ chown -R myuser:usergroup /home/myuser/Maildir chmod -R 700 /home/myuser/Maildir
You can easily test that your recent installation is working:
telnet localhost imap Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc. See COPYING for distribution information. imap login user password imap OK LOGIN Ok.
Where user and password are local accounts with a Maildir directory. If it does not work you will get an error message, and do not forget to check
Administration & Maintainance
Administering a Courier IMAP/POP mail server does not really require some specific administration tasks. For each user connecting correspond a process of the system (in fact a process per Maildir directory open). For backup, only backing up user accounts (as usual ;-)) is necessary.