Running your own Postfix (or any MTA) is not hard. Getting Gmail and Outlook to trust it is the part that eats weekends. This is the checklist we go through when a server's mail keeps landing in spam. Work top to bottom: the early items are the ones that most often cause trouble.

1. Reverse DNS (PTR) matches your HELO name

Receivers look up the PTR record of your sending IP. It should resolve to a hostname, that hostname should resolve back to the same IP, and your MTA should announce that same name in HELO/EHLO.

dig -x 203.0.113.25 +short # -> mail.example.com. dig mail.example.com +short # -> 203.0.113.25 postconf myhostname # -> mail.example.com 

The PTR is set by whoever owns the IP (your VPS or hosting provider), not in your own DNS zone.

2. SPF lists every sender, and only once

One TXT record per domain, starting with v=spf1. Two SPF records is an automatic fail.

example.com. TXT "v=spf1 ip4:203.0.113.25 include:_spf.google.com -all" 

Watch the 10 DNS lookup limit: every include: counts, and nested includes count too.

3. DKIM signs every outgoing message

With OpenDKIM or rspamd, generate a 2048 bit key, publish the public half, and confirm signatures are actually being added:

sel1._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBg..." 

Send a message to a Gmail account, open "Show original" and look for DKIM: PASS with domain example.com. If it says the domain of your hosting provider instead, you are signing with the wrong key.

4. DMARC, starting in monitor mode

_dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com; fo=1" 

Read the aggregate reports for a couple of weeks, fix every legitimate source that fails, then move to p=quarantine and later p=reject. Large mailbox providers now expect DMARC for bulk senders.

5. TLS on port 25, and MTA-STS if you can

Make sure your server offers STARTTLS with a valid certificate. Optionally publish MTA-STS and TLS-RPT so other servers insist on encrypted delivery to you.

6. Check the blocklists

Your new IP may have a history. Check it on the major DNS blocklists before you blame your configuration. If it is listed and the listing predates you, ask your provider for a clean IP; delisting a dirty one can take a long time.

7. Warm up, do not blast

A fresh IP that suddenly sends thousands of messages looks exactly like a spammer. Start with low daily volumes to engaged recipients and increase gradually over a few weeks.

8. Content and list hygiene

Even with perfect authentication:

  • include a working unsubscribe link and List-Unsubscribe headers on bulk mail
  • remove addresses that bounce
  • keep a sensible text to image ratio and send a plain text part
  • avoid link shorteners

9. Watch the feedback loops

Register the domain with Google Postmaster Tools and Microsoft SNDS. They show your reputation and spam complaint rate as the big providers see it, which is far more useful than guessing.

Quick verification

Send one message to a test address and read the headers. You want all of these:

spf=pass dkim=pass dmarc=pass 

If any of them fails, go back to that step before touching anything else.

We build and run mail infrastructure for teams that want their own servers without the deliverability headaches. More at synctrix.in/services/mail-infrastructure.