Following script may be used for configuring complete and secure email server on fresh install of Debian 9. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.
- Install Postfix and configure it with TLS support.
- Install Dovecot and configure it's transport on Postfix.
- Download, extract and correct permissions for Postfixadmin.
- Download, extract and correct permissions for Roundcube.