New in 1.0: partner licences with Stable and LTS updates, webmail and Files, and alerts on WhatsApp.Changelog
Guides

Set up email that reaches the inbox

The DNS records, reverse DNS and sending habits that keep email out of the spam folder: MX, SPF, DKIM and DMARC explained, and what to do when mail bounces.

Published

Large mail providers decide in a moment whether a message goes to the inbox or to spam. They check who may send for the domain, whether the message was signed, whether the server's name matches its address, and what that address has sent before. Get these right once and most deliverability problems never start.

The four DNS records

Record What it says
MX Which server receives the domain's email.
SPF Which servers may send email for the domain. One TXT record only, listing every server and service that sends for it.
DKIM The public key that checks the signature on each message the server sends.
DMARC What a receiving server should do with a message that fails SPF and DKIM, for example p=reject.

When a domain uses your server's nameservers, the panel makes all four for it. When its DNS is somewhere else, copy them there. The Deliverability screen gives each domain a score and shows which record is missing or wrong.

See Set up email for a domain and Deliverability.

Two SPF records are one too many

A domain that also sends through a newsletter tool or an online shop needs those services in the same single SPF record, and they should sign with DKIM for the domain. Two SPF records make both fail.

Set the reverse DNS

The reverse DNS (PTR record) of the server's IP address should be the mail server's name, usually mail.yourdomain.com. It is set at your server provider, not your DNS provider. Mail from a server without matching reverse DNS often goes to spam.

See DNS setup.

Send clean mail

  • Send from a real mailbox on the domain, with a matching From name.
  • Let website forms send from an address on the site's own domain, with the visitor's address as Reply-To.
  • Send newsletters from a mailing list, not from a normal mailbox.

When mail bounces or goes to spam

Open the mail delivery log and read what the other server said: it usually names the reason, such as an SPF failure, a blocklist or a rate limit. Administrators can see the server's reputation in one place: reverse DNS, DKIM signing and whether the IP address is on a blocklist.

See Fix email going to spam and Mail health.

Stop a hacked site from sending spam

One hacked website or stolen mailbox password can put the server's address on a blocklist. Watch how much each account sends, pause an account that suddenly sends far more than usual, and set an hourly sending limit per account. Receiving keeps working while sending is paused.

Try it on your own server

Install Hfog Panel and try every feature free for 30 days.