This tutorial will teach you how to set up your own robust email server. We are focusing on a small personal server with up to a few email accounts. After following this guide, you will have a fully functional mail server and you can connect with your favourite client to access, read and send emails. The Anti-Spam configuration will drop unwanted messages.
This tutorial will use yourdomain.com as domain name and mail.yourdomain.com as hostname for our mail server. The desired email address will be
. We assume that our server has the IP address 18.104.22.168.
Software and technologies used
- Postfix v2.9.6 as SMTP server
- Dovecot v2.0.19 as IMAP server
- We will use Unix user accounts and tunnel the SASL authentication through TLS
- Postgrey v1.34 – to reject spam from the beginning
(more about postgrey)
- SPF (Sender Policy Framework) validating to reduce spam
- SPF DNS entry to prevent spoofing
- DKIM (Domain Keys Identified Mail) to sign our email messages