Email Deliverability: SPF, DKIM and DMARC Print

  • 0

If your legitimate email lands in the recipient's spam folder, the fix is almost always a missing or incorrect DNS record. Three records control this: SPF, DKIM and DMARC. This article explains what each does and how to set them up for a domain hosted with us.

SPF

SPF tells receiving mail servers which servers are allowed to send email for your domain. In DirectAdmin, open Account Manager > DNS Management and make sure a TXT record exists that starts with v=spf1. For accounts where both the website and the mailbox live with us, this is the usual value:

v=spf1 a mx ~all

If you also send email through a third-party service such as a newsletter tool, add that service's include statement to the same record.

DKIM

DKIM adds a cryptographic signature to your outgoing email so receivers can verify it was really sent by you and was not modified on the way. Recent DirectAdmin versions include a DKIM option in the email section of the control panel: enabling it generates a signing key and publishes it to your DNS zone automatically. If you do not see the option for your domain, open a support ticket and we will enable it for you.

DMARC

DMARC tells receivers what to do when SPF or DKIM checks fail, and where to send you reports. Add a TXT record named _dmarc in DNS Management:

v=DMARC1; p=none; rua=mailto:you@example.com

Start with p=none to collect reports without rejecting anything. Once the reports show that all your legitimate mail passes, tighten the policy to p=quarantine and later p=reject.

Sending from scripts and plugins

PHP scripts and WordPress plugins should send through an authenticated mailbox (SMTP with a real username and password) rather than the raw mail() function. Authenticated mail is signed and aligned with your SPF and DKIM, which dramatically improves delivery. For WordPress, any SMTP mail plugin works; create the mailbox in DirectAdmin first.

Testing

Send a message to a mail testing service such as MXToolbox or mail-tester.com and follow the listed recommendations. If everything above is in place and mail still lands in spam, open a ticket with the test result and we will investigate.


Was this answer helpful?

« Back