Added on May 18th, 2012 and marked as dovecot install postfix mail

Install the required packages for Postfix, Dovecot, SASLauthd, MySQL and OpenSSL:

apt-get install postfix postfix-mysql postfix-doc
apt-get install dovecot-common dovecot-imapd dovecot-pop3d dovecot-mysql
apt-get install libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql libpam-smbpass
apt-get install mysql-client mysql-server
apt-get install openssl

The following packages are optional (replace apache2 with nginx if needed):

apt-get install phpmyadmin
apt-get install apache2 libapache2-mod-php5
apt-get install php5 php5-mysql

Background information