In this first tutorial, I'll explain how I've configured my mail server using the following :
- A server running Linux Debian (jessie) ;
- Postfix ;
- Postfix-policyd-spf-python ;
- Dovecot ;
- Spamassassin ;
- OpenDKIM ;
- OpenDMARC ;
- Monit ;
- Rainloop.
I'm assuming you have some basic knowledge of Linux and DNS configuration.
You can host this server at home, but you might have issues with your ISP not allowing outbound traffic on TCP port 25, and your emails might be considered to be spam by other providers if your IP is dynamic and/or you can't configure a reverse DNS record on it.
The cheapest VMs from DigitalOcean or Vultr are powerful enough to have this configuration running smoothly.
We'll also need a SSL certificate for this configuration. You can create an auto-signed one or get a free valid one from StartSSL. For the purpose of this tutorial, I'll consider you've chosen the latter.
You'll also need a domain name. I've chosen Namecheap as a registrar. I won't go into details on how to configure it, but you'll need at the very least a A record on your server's IP as well as a MX record pointing to it.
I use the captainark.net domain as an example throughout this tutorial. You'll have to use your actual domain for your configuration to work !
Note: links in this section are sponsored.