Mail server on a VPS with ISPmanager

For messages from a VPS to be delivered and not marked as spam, you need five things.

  1. Mail server: Software configuration → mail server.
  2. A mail domain with DKIM: Mail domain.
  3. SPF, DKIM and DMARC records in the domain DNS. If DNS is on the VPS, the panel adds them itself. If DNS is elsewhere, copy the records manually.
  4. A PTR record of the VPS IP address (reverse zone) — the server name, for example mail.example.com. PTR is changed by the IP owner. Contact support with the IP address and the name.
  5. The server name ("Navigation board" → "System settings" → server name) matches the PTR and has an A record.
Mail server installed
Mail server installed
Server name
Server name

SSL for email

The mail domain certificate is enabled in the mail domain settings — Mail domain. Then mail clients connect to mail.example.com without a certificate error.

Checking

Send a message to an external mailbox. Its headers must contain spf=pass and dkim=pass. Mail log over SSH as root: /var/log/exim4/mainlog.

Some providers block outgoing port 25 by default. If messages are not sent at all, contact support.

Questions and answers
SPF, DKIM and DMARC records in the domain DNS and the PTR record of the VPS IP. We change PTR — contact support.
Check /var/log/exim4/mainlog (on CentOS /var/log/exim/main.log). If outgoing port 25 is closed, contact support.