Now we've configured the base Slice details and added the vmail user, we are ready to install Postfix and MySQL.
Remember, we will be using MySQL to control the domains and user details for our mail server.
As well has installing postfix and the relevant MySQL packages, we'll also install telnet and mailx. These two packages will allow us to test the installation at different stages of the mail server setup.
let's go ahead and do that:
sudo aptitude install postfix postfix-mysql mysql-server postfix-tls libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl telnet mailx
As the base Slices are minimal Linux images, quite a few packages will be installed.
You will be asked some questions during the installation.
Firstly, you will need to set the root password for MySQL:
Once done, you will be asked to repeat the password.
Next is the postfix installation.
The first screen is informative and you can simply press Enter/Return on the keyboard.
Next select 'Internet Site' and press Enter/Return:
The next screen asks for the system mail name:
Enter the same name as set in the previous article. In this case, I entered 'mail.demoslice.com'.
The base Postfix and MySQL installation is now complete.
You can test the Postfix installation by sending a quick email from the Slice to a working email address.
From the terminal:
Note you will need to replace the 'firstname.lastname@example.org' with a working email address - your usual email address will suffice.
You will need to enter the subject and body of the email. Once done press Enter/Return and enter a single period (.) - this lets the mail command know the message has finished.
You will need to press Enter/Return a couple more times to send the mail. Once done you will be placed back at the command prompt.
This is what my terminal looked like during the test:
mail email@example.com Subject: test email from demoslice.com test body of email . Cc:
A few seconds later I had a new and shiny email from my Slice. Note that at this stage the 'from' field was shown to be:
The next articles will show how to set the correct domain in the 'from' field.
The base Postfix and MySQL installation is very simple and the Slice is already set to send emails.
The next article will look at creating the mail database in MySQL for multiple domains and users.