HF PanelDocsv1.0.0

Fix email going to spam

Get your mail into the inbox: check SPF, DKIM and DMARC, set the reverse DNS, clear blocklists and stop a hacked site sending spam.

When your messages land in the recipient's spam folder, the cause is almost always one of a few things: a missing or wrong DNS record, a server without reverse DNS, an IP address on a blocklist, or a website or mailbox that has been sending spam. This tutorial checks each in turn.

Steps 1–3 are for anyone with a Control Panel. Steps 4–6 are for administrators.

1. Check the domain

  1. Open Control Panel › Email › Deliverability and click the domain.
  2. Look at the Score for example.com and each check:
Check shows ✗ or ! Fix
MX (where mail is delivered) add the MX record shown, or use the server's nameservers
SPF (who may send for the domain) one TXT record only, including this server, for example v=spf1 a mx ip4:<server IP> ~all. Merge two SPF records into one.
DKIM (signature) publish the key from Email accounts › Domains › DNS records (Copy DKIM) as TXT at hf._domainkey
DMARC (policy) add TXT at _dmarc: v=DMARC1; p=quarantine; adkim=r; aspf=r

When the domain uses the server's nameservers these records are already there. If its DNS is elsewhere, add them there. DNS changes can take up to an hour to show. See Deliverability.

Important: if you also send through another service (a newsletter tool, an online shop), its servers must be in the same single SPF record, and it should sign with DKIM for your domain.

2. Read what the other server said

  1. Open Email › Mail delivery log.
  2. Search for the recipient's address and click Bounced, Deferred or Rejected.
  3. Read What the mail server said. It often names the reason: an SPF failure, a blocklist, or a rate limit.

3. Send clean mail

  • Send from a real mailbox on the domain, not from a free address, and with a matching From name.
  • Website forms should send from an address on the site's own domain and put the visitor's address in Reply-To.
  • Don't send bulk newsletters from a normal mailbox; use Mailing lists.

4. Set the reverse DNS (administrators)

At your server provider (not your DNS provider), set the reverse DNS (PTR) of the server's IP to the mail server name, usually mail.yourdomain.com. Large mail providers often put mail from a server without matching reverse DNS in spam. See DNS setup.

5. Check the server's reputation (administrators)

  1. Open Server Admin › Email › Mail health.
  2. In Reputation of IP address, fix every red ✗: Reverse DNS (PTR), DKIM signing (OpenDKIM), DKIM keys, Mail server name and the SPF, DKIM and DMARC of the panel's own domain.
  3. If a Blocklist row says the IP is listed, find and stop the cause first (step 6), then ask that list to remove the IP on its website.

6. Stop a hacked site or mailbox sending spam (administrators)

  1. On Mail health, look at Sending this hour and the Mail queue. One account sending far more than usual, or one sender with hundreds of waiting messages, usually means a hacked website or a stolen mailbox password.
  2. Click Pause sending for that account. Receiving keeps working.
  3. In the queue, use Delete all from this sender to remove the spam still waiting.
  4. Clean the account (see Restore a hacked WordPress site) and change the mailbox password, then click Allow sending again.
  5. To catch it next time, tick Pause accounts that suddenly send far more than usual under the spam guard, set Default recipients per hour, per account under Hourly sending limit, and click Save.