Courier IMAP and daemontools
Courier IMAP is a stable, fully-featured IMAP daemon. It supports shared folders, the IDLE extension, SSL and TLS. It uses maildir storage so it plays nicely with qmail and other MTAs. It can authenticate against LDAP, PAM, a MySQL database or even a hacked up script. It's reliable and fast.
The Courier team appear to suffer from a severe case of Not Invented Here syndrome. They seek to reinvent multiple wheels, including:
Startup scripts: /etc/rc.d isn't good enough, apparently.
Service management: Daemontools? svcadm? Red Hat? launchd? Or our own, perhaps.
Configuration files: Why read in a file when you can source a shell script?
Connection management: inetd too old? ucspi-tcp too new?
The net result is that a very good piece of software ends up appearing to be way harder to set up nicely than it actually is.