Postfix i Dovecot – perfect duo for mail server

Own mail server? Would be awesome! If you just ask ‘why’ this tutorial is not for you 😉

Goals:

  • own postfix and dovecot server
  • support for virtual accounts
  • disable system accounts support
  • use database as account backend

 

1. Instalation

General type of mail configuration: Internet Site

System mail name: domian.name

2. Mysql/MariaDB backend

First prepare backend:

 

Most important postfix config file main.cf

Next let us create configuration files for virtual account support:

Restart postfix:

 

This will test if postfix ‘see’ virtual account from database:

 

Next we need to edit other postfix config file master.cf

This looked scary but to be sure I included full config file, because there could be changes made in newest version to default config files.

Just reset postfix because we finish configure him 🙂

 

3. Dovecot

First we make backup of files that we will edit:

Edit dovecot.conf

Let us comment and uncomment lines according with this code:

We need to create vmail account

Restart dovecot

4. Adding more account to backend

 

5. SPAM

If you are interested, there are some post about way to fight with spam:

Fight against spam part 1 – Postfix SPF

Fight against spam part 2 – Postfix DKIM

Fight against spam part 3 – Postfix DMARC

Fight against spam part 4 – Postfix SpamAssassin

Fight against spam part 5 – Dovecot Sieve

 

Facebooktwittergoogle_plusreddit

Leave a Reply

Your email address will not be published. Required fields are marked *

*