Own Email Server
Appearance
Checklist for running your own outgoing mail server on a broadband line
If you run your own mail server on your line with us, these steps help stop other providers from rejecting your mail or marking it as spam.
Hostname and reverse DNS
- rDNS (PTR record) for the sending IP set to a proper hostname such as
mail.example.com. Contact support for help in setting up. Do this for both IPv4 and IPv6. - Forward DNS matches (FCrDNS).
mail.example.commust have an A/AAAA record pointing back to the same IP. - The hostname doesn't look generic. Avoid names with the IP's digits in them or words like
dsl,dynamicorpool. - The HELO/EHLO name the server announces is that same hostname.
- An MX record exists for each domain you send from. Some receivers check that the sending domain can accept replies.
Authentication: SPF, DKIM, DMARC
- SPF. For example
v=spf1 ip4:x.x.x.x ip6:xxxx::/64 mx -all. Include every place that sends as your domain, such as web forms and newsletter services. Keep it under 10 DNS lookups. - SPF for the HELO name too. Give
mail.example.comits own SPF record (v=spf1 a -all), because bounce messages are checked against it. - DKIM. Use a 2048-bit key and sign all outgoing mail, including mail from scripts and apps. Publish it at
selector._domainkey.example.com. - DMARC. Start with
v=DMARC1; p=none; rua=mailto:dmarc@example.com. Read the reports, then tighten top=quarantineand laterp=reject. - Alignment. The From: domain must match the domain SPF or DKIM passes for, or DMARC fails even when SPF and DKIM pass.
- If you forward mail on to other servers, use SRS (and ARC if you can). Otherwise forwarded mail fails SPF.
TLS
- A valid certificate for the mail hostname, for example from Let's Encrypt, with STARTTLS offered on port 25.
- Optional: MTA-STS and TLS-RPT records, or DANE if your domain uses DNSSEC.
Don't become a spam source
- Not an open relay. Test it with an external relay checker.
- Users send through authenticated submission on port 587 or 465, never unauthenticated port 25.
- fail2ban or similar against password-guessing, plus rate limits on outgoing mail per user.
Reputation and housekeeping
- Check blocklists regularly: Spamhaus (SBL/XBL/CSS), Barracuda and SpamCop. Use multirbl.valli or MXToolbox to check many at once.
- Sign up for the big providers' feedback tools:
- Google Postmaster Tools
- Microsoft SNDS and JMRP. Microsoft is the most likely to block a new IP; delist via their sender support form.
- Warm up gradually. A new IP has no reputation, so start with low volumes.
- Working
postmaster@andabuse@addresses, and someone reading them. - For bulk or list mail: one-click unsubscribe headers and a spam-complaint rate under 0.3%, as Gmail and Yahoo require, or don't send bulk email, and do not send spam or UCE.
Test it
- mail-tester.com. Send to the address it gives you and aim for 10/10.
- Send to a Gmail address and use "Show original" to confirm SPF, DKIM and DMARC all show PASS.
- Send to an Outlook.com address too. It's the one most likely to put you in junk.
- learndmarc.com for a step-by-step view of how a message is checked.