This mail platform does use a fair amount of memory, the memory usage is ClamAV and Solr, the latter being used for IMAP SEARCH. I personally use 2 GB.
I’ll warn you all now, this is a long article.
SSL
sudo openssl genrsa -out /etc/ssl/private/mail.key 4096
sudo openssl req -new -key /etc/ssl/private/mail.key -out /tmp/mail.csr
sudo openssl x509 -req -days 365 -in /tmp/mail.csr -signkey /etc/ssl/private/mail.key -out /etc/ssl/certs/mail.crt
MySQL
sudo apt-get install mysql-server
You’ll be prompted several times for a password for MySQL during the installation, just come up with something nice and secure.
The first thing to set-up will be the MySQL database and schema.
mysql -u root -p
Next up, create the database.
CREATE DATABASE mailserver CHARACTER SET utf8 COLLATE utf8_general_ci;
And grant some privileges, you’ll need …