Few hours of work: sudo apt-get/yum install postfix dovecot openldap roundcube.)
OpenLDAP schemes and ssl certs are the bulk of it.
Hint: never put postfix's spool and dovecot's storage on the same physical device and I/O controller. /var/log must live on the separate device too.