Courier IMAPS Server - Maildir

From Wiki

Jump to: navigation, search

1. Install Courier (done using this page:

apt-get install courier-imap-ssl
This will pull down all relevant packages
Chose defaults when installing

2. Main Config is naturly enough in /etc/courier

Nothing is chanced in Courier Configs

3. To get postfix handing off to Courier:

Config Postfix (done using this page:
Comment out #mailbox_command = /user/bin/ procaine's-Y -a $DOMAIN 
Include or uncomment home_mailbox = Maildir/

4. Step 3 should automatically make a Maildir in /home/user when mail is recieved

If you want to make the maildir manually, because a maildir is required for IMAP Login:
Done using this website:
maildirmake Maildir
This can be done for defauly users in the skeleton account /etc/skel/

5. IMAP login and recieving emails should work ok using thunderbird

6. Fix for courier.

So thunderbird gave me the error: "Alert from account: Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library).
apt-get install gamin

7. Now there does seem to be a load in PROCMAIL that I'm not using.

Rules can be made as to what folder to sort incoming email.
(Some basics are at:
Actually I am mixing up procmail with maildir!!
POSTFIX -> PROCMAIL (not even sure!) -> MAILDIR -> COURIER

Install and Config for Procmail

apt-get install procmail
vi /etc/postfix/
//add the line:
mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir

restart postfix and test.

Quick config for procmail

vi /home/$USER/.procmailrc
#Start of Procmailrc script.

:0 c

This above procmail reciepie creates a procmail log for the user. It also forwards a copy of all email to More procmail rules at

Update Cert

Even though I'm sure its not the best practice, I copy the newly updated apache.pem cert and use it for courier-ssl.

cp /etc/apache2/ssl/apache2.pem /etc/courier/imapd.pem
/etc/init.d/courier-imap-ssl restart
Personal tools