I have tried multiple times to setup a mail server that uses a mysql backend on ubuntu 14.04 LTS, I have used this guide: https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassassin (and a few others previously that I cannot remember).

I keep getting bugs, not being able to login, smtp failing and all those things, so my question is: where can I find an easy to follow guide as the only mail server I have ever got working is this one: https://samhobbs.co.uk/raspberry-pi-email-server only that server does not use virtual users/.

Here is my complete log (from the first step to me just copying all the guides configs because it didn't work: hastebin com/kekezivezo.xml as I just copied all commands and only changed the domain name I dont care if there are any passwords/usernames/ect in there)


Installed the server using this guide recently on Ubuntu 16.04 LTS. There are a few mistakes in the guide:

  1. You don't need some packs, some you should rename (This is an Ubuntu 16.04 only problem).

  2. nano /etc/dovecot/conf.d/10-master.conf

    service imap-login {
      inet_listener imap {
        port = 0

    You need to add here the address = your ip, or dovecot won't open a socket.

  3. There is a mistake in dovecot-mysqlconfig in the guide. They recommending to uncomment disable_plaintext_auth = yes. But doing this is what doesn't allow you to login via mail clients through IMAP.

  4. Also an Ubuntu 16.04 LTS only trouble is, that while installing MySQL I have installed a password validation plugin. Thus, it wont allow you to create a 'usermail' user with a weak password from the guide. You should create user like 'dovepost' and with a strong password and change it in those 3 mysql config files for postfix and dovecot that you create in the beginning of the guide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.