DNS and email deliverability for a self-hosted mail server
Self-hosted mail reaches the inbox when the big mailbox providers can verify it's really from you. This guide covers the DNS records that matter (MX, SPF, DKIM, DMARC and reverse DNS), how to set them up with SmarterMail, and what Gmail, Yahoo and Outlook.com require today.
The DNS records for email
Examples use example.com and the documentation address 203.0.113.10. Replace them with your own domain, host name and IP address.
| Record | What it does | Example |
|---|---|---|
| A | Points your mail host name to the server's IP address | mail.example.com. A 203.0.113.10 |
| MX | Tells other servers where to deliver mail for your domain | example.com. MX 10 mail.example.com. |
| PTR (reverse DNS) | Maps the sending IP back to your mail host name; set by the IP owner | 10.113.0.203.in-addr.arpa. PTR mail.example.com. |
| SPF (TXT) | Lists the servers allowed to send for your domain | example.com. TXT "v=spf1 mx -all" |
| DKIM (TXT) | Publishes the public key that verifies your outgoing mail's signature | selector._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=…" (copy the exact name and value from SmarterMail) |
| DMARC (TXT) | Tells receivers what to do when SPF and DKIM fail, and where to send reports | _dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com" |
| Autodiscover (CNAME or SRV) | Lets Outlook and phones find your server automatically | autodiscover.example.com. CNAME mail.example.com. |
| MTA-STS (optional) | Tells other servers they must use TLS when delivering mail to you; pairs with a policy file on https://mta-sts.example.com | _mta-sts.example.com. TXT "v=STSv1; id=20261014" |
| BIMI (optional) | Shows your brand logo next to your messages in supporting inboxes; requires DMARC at quarantine or reject | default._bimi.example.com. TXT "v=BIMI1; l=https://example.com/logo.svg" |
SmarterMail supports BIMI, and supports MTA-STS for mail it receives. Some inboxes, including Gmail, show BIMI logos only with a verified mark certificate (VMC or CMC). If other services send mail as your domain, such as a newsletter platform or help desk, add them to SPF (for example with include:) and set up DKIM with them too. A domain can have only one SPF record.
How to set up DNS for a self-hosted mail server
- Get a static IP that can send on port 25. Use a dedicated static IP address and confirm your provider allows outbound connections on port 25. Many residential and cloud providers block it by default.
- Set reverse DNS (PTR). Ask the provider that owns the IP address to set a PTR record that matches your mail server's host name, and make sure that host name resolves back to the same IP.
- Publish A and MX records. Create an A record for the mail host name and an MX record for each domain that points to it.
- Publish SPF. Publish one SPF TXT record per domain listing every server and service allowed to send for it.
- Turn on DKIM signing. In SmarterMail, sign in as a domain administrator, open Domain Settings > General and click Enable on the Email Signing card. Save, publish the TXT record name and value SmarterMail shows, then save the page.
- Publish DMARC. Start with a
p=nonepolicy and a reporting address, review reports, then move toquarantineorrejectonce all legitimate mail passes. - Secure connections with TLS. Install certificates for your mail host names so other servers and clients connect over TLS. SmarterMail can issue Let's Encrypt certificates per domain and host name.
- Test. Send to Gmail, Yahoo and Outlook.com test accounts and check the message headers for SPF, DKIM and DMARC passes.
What Gmail, Yahoo and Outlook.com require
Requirements as published by each provider, checked October 2026. Bulk or high-volume means roughly 5,000 or more messages a day to that provider's personal accounts.
| Requirement | Gmail, all senders | Gmail and Yahoo, bulk senders | Outlook.com, high-volume senders |
|---|---|---|---|
| SPF and DKIM | SPF or DKIM | Both | Both, passing |
| DMARC | Recommended | Required, at least p=none, aligned with the From domain | Required, at least p=none, aligned with the From domain |
| Forward and reverse DNS | Required | Required | Recommended |
| TLS | Required | Required | Recommended |
| Spam complaint rate | Below 0.3% | Below 0.3%; aim for under 0.1% | Keep low |
| One-click unsubscribe | — | For marketing mail | Recommended for marketing mail |
Gmail began rejecting more non-compliant mail in November 2025. Outlook.com rejects non-compliant high-volume mail with error 550 5.7.515. Check each provider's sender guidelines for current details.
Troubleshooting common rejections
| What you see | Likely cause | Fix |
|---|---|---|
| Rejection mentioning a missing PTR or reverse DNS | The sending IP has no PTR record, or it doesn't match | Ask the IP owner to set a PTR that matches your mail host name |
| Rejection saying the message isn't authenticated (for example Gmail 5.7.26) | SPF and DKIM fail or don't align with the From domain | Check SPF includes this server, DKIM is enabled and published, and the From domain matches |
| Outlook.com 550 5.7.515 | A high-volume sender doesn't meet Microsoft's authentication requirements | Publish passing, aligned SPF, DKIM and DMARC |
| Rejection mentioning a blocklist | The sending IP is listed on a DNS blocklist | Find and fix the cause (for example a compromised account), then request delisting |
| Mail accepted but lands in spam | Low IP or domain reputation, or content and complaint signals | Send only wanted mail, warm up new IPs gradually, and monitor Google Postmaster Tools and Microsoft SNDS |
Keep your reputation healthy
Stop abuse early
Two-factor authentication, password rules and intrusion detection help keep compromised accounts from sending spam through your server.
Check what comes in
SmarterMail checks SPF, DKIM and DMARC on inbound mail, supports ARC and BIMI, supports MTA-STS for incoming mail, and filters spam and viruses before they reach users.
Security features
See the antispam, antivirus and authentication features built into SmarterMail.
Email securityRelated guides
Frequently asked questions
Will self-hosted email reach Gmail and Outlook.com inboxes?
Yes, when the sending IP has a good reputation and your DNS is set up correctly: matching forward and reverse DNS, SPF, DKIM, DMARC and TLS. Authentication gets your mail accepted; sending wanted mail and keeping complaint rates low keeps it in the inbox.
Do I need SPF, DKIM and DMARC, or just one?
Set up all three. Gmail requires SPF or DKIM from every sender and all three from bulk senders, and Outlook.com and Yahoo have similar rules for high-volume senders. DMARC also stops other people from sending mail that pretends to be from your domain.
How do I set up DKIM in SmarterMail?
Sign in as a domain administrator, open Domain Settings, then General, and click Enable on the Email Signing card. Save, publish the TXT record name and value SmarterMail shows in your DNS, and save the page.
Which DMARC policy should I start with?
Start with p=none and a reporting address (rua) so you can see which servers send as your domain without affecting delivery. Once every legitimate source passes, move to p=quarantine and then p=reject.
Why is my mail being rejected for a missing PTR record?
Many receiving servers, including Gmail, check that the sending IP has a reverse DNS (PTR) record that matches a host name resolving back to the same IP. PTR records are set by whoever owns the IP address, usually your hosting or internet provider.
Does SmarterMail support BIMI and MTA-STS?
SmarterMail supports BIMI. It supports MTA-STS for mail it receives, so you can publish a policy that requires other servers to use TLS when delivering to you.
Can I send mail from a home or cloud server?
Often not directly. Many residential and cloud providers block outbound port 25 or have IP ranges with poor reputation. Check with your provider, or relay outbound mail through a reputable smart host.
Run your own mail server, with confidence
Every new perpetual license includes free expert installation and configuration.