If you maintain various virtual domains on a Debian Lenny box you can use Apple’s mail.app to access each virtual domain so you can send/receive e-mail as different users on those virtual domains. I use mail.app to access many virtual domains, on a daily basis and it works pretty well. This short article, describes how to set up the server correctly.

Install Courier with IMAP and IMAP SSL. If you want to be somewhat secure, only install the courier-imap-ssl. When you are prompted if you want to set up the web configuration directories, select NO.

apt-get install courier-imap courier-imap-ssl

If you are running mailx, you’ll need to install the mailbox conversion program

apt-get install  mb2md

Create the Courier mail directory, using maildirmake

su - myuser
cd /home/myuser
maildirmake Maildir

Convert the contents of the current mbox to the Maildir

su - myuser
mb2md -s /home/myuser/mbox -d /home/myuser/Maildir

For future incoming e-mail, let the email go into mbox, but put a copy into Maildir, create a .procmailrc with the following:

MAILDIR=$HOME/Maildir
:0c 
$MAILDIR/

Leave a Reply