Installing Courier-IMAP with SSL on RedHat 9 is quick once you know the steps involved. This is the way I do it:
First, get Courier-IMAP. Version 1.7.3 runs great everywhere and I have been unable to compile 2.0 up to this point (I have tried in different machines and I always get a different compilation error)
tar -vjxf courier-imap-1.7.3.tar.bz2
./configure --disable-root-check --with-ssl --without-authdaemon
cp maildirmake /usr/bin (maildirmake creates the Maildir directory structure where your email will be stored)
By default, it will try to use LDAP for authentication. In my case, I just want to use plain authentication.
And set the authdaemon to plain:
And also disable mysql and ldap authentication modules (if you are not going to use them) by removing authmysql and authldap from the imapd configuration file:
AUTHMODULES="authcustom authcram authuserdb authpam"
AUTHMODULES_ORIG="authcustom authcram authuserdb authpam"
You can now start the daemon with:
/usr/lib/courier-imap/libexec/imapd-ssl.rc start (for the SSL daemon)
(You might want to add these lines to your /etc/rc.local so that it starts automatically next time you reboot)
Make sure that it is running with telnet localhost 143. If you get the IMAP server prompt you are good to go.
You will not be able to log in until you get your Maildir structure created on your home folder. Open a console as your regular user, go to your home directory and type maildirmake Maildir
You can now log in with your favorite IMAP client.
Last but not least, if you want your email delivered on your Maildir directory, you have to tell procmail that you will use Maildir instead of mbox and the location of the users destination mailboxes (assuming you are using procmail on a default RedHat installation)
Just vi /etc/procmailrc and replace the "default" setting with DEFAULT=$HOME/Maildir/