Perfect E-Mail Setup

This article serves as a review of the best practices for achieving a perfect email setup.

Server side

  1. The hostname must not match any domain that is being used on the system. We recommend using server.domain.com or web1.domain.com instead. (Taking server1.domain.com as example.)

  2. The hostname must be in the /etc/virtual/domains file.

  3. The hostname must not be in the /etc/virtual/domainowners file.

  4. The directory /etc/virtual/hostname must exist (eg: /etc/virtual/server1.domain.com). It must not contain any files.

  5. Ensure your hostname does not contain any upper case letters.

  6. The hostname must resolve. If not, add the required A records to the dns zone so that it does. Command to check:

dig +short server1.domain.com
  1. Make sure that your main server IP has a reverse lookup on it. Command to check:
dig -x 12.34.56.78 +short

Domain side

Configure the following authentication records for each domain on your system:

  1. An SPF record

  2. A DKIM record

  3. A DMARC record

Then, send a test email to https://www.mail-tester.com/open in new window and check your score.

Last Updated: