Citadel is a turnkey open-source solution for email and collaboration.

It contains both the server and a text-mode client. You can build an entire
working system with this, or you can just build the client and connect to
some other existing system. It also provides connectivity through:

 * SMTP (Port 25 by default)
 * POP3 (Port 110 by default; SSL Enabled on port 995)
 * IMAP (Port 143 by default; SSL Enabled on port 993)
 * Citadel (Port 504; used by dedicated Citadel clients)
 * SMTP-MSA (Port 587; requires SMTP authentication)
 * ManageSieve (Port 2020; edit your mail filtering scripts with 
   your favorite GUI client)
 * Postfix TCP dictionary (if you have an upstream mail hub running 
   Postfix, it can use this service to verify valid email addresses 
   on your Citadel)
 * lmtp.socket (Local mail transport, for use with an external MTA 
   if for some reason you do not wish to use Citadel's built in SMTP 
   service)
 * lmtp-unfiltered.socket (same as above, but without spam filtering)
 * citadel.socket (Citadel protocol)

After installation, run /opt/citadel/setup to configure Citadel.

Dependencies: libsieve libcitadel
Both available from slackbuilds.org