A mail server setup consists of several software components that work together but must be installed and configured individually. This page is just an overview of the general process that contains references to other pages which document the individual components.
You will need (at least) the following DNS records.
smtp.yourdomain.com imap.yourdomain.com pop3.yourdomain.com (if you want to use pop3. You probably don't) webmail.yourdomain.com (if you want to use a webmailer)
A reverse DNS record for
An MX record for every domain that you want to accept mail for.
The subdomain names are arbitrary, you can pick whatever you like. You could also just use a single domain for everything, but it makes sense to split them up to be prepared for the event that you ever want to split services onto several servers. In that case you don't have to reconfigure your mail clients.
Setup letsencrypt. I removed the article in this wiki since it was hopelessly outdated.
To integrate spam protection you'll be referencing SPAM assassin in the configuration of Postfix and Dovecot, so it makes sense to already install it upfront. See Spamassassin
Mail Transfer Agent / SMTP Server
Mail Delivery Agent / IMAP Server
To add a new user, do the following:
- Add an entry to the dovecot passwd database (see Dovecot)
- Create a virtual mail account in postfix: (see Postfix)
Optional: Mail signing (DKIM)