“Is building an SMTP server hard?” comes up constantly. Here’s the honest breakdown after watching a lot of people try it.
The easy part: receiving
- Postfix + Dovecot, MX record pointed at your box, TLS via Let’s Encrypt
- Add Rspamd for spam filtering
- Working inbox in an afternoon
The hard part: getting your mail delivered
- Port 25: most residential ISPs and many cloud providers block it outbound
- IP reputation: residential ranges are pre-blocklisted; a “fresh” VPS IP may carry a previous tenant’s history
- Authentication: SPF, DKIM, DMARC and rDNS/PTR all need to line up, or Gmail/Outlook will junk you
- Ongoing work: monitoring blocklists, DMARC reports, and warming up the IP slowly
The setup that actually works for most people
Self-host inbound and storage. Route outbound through a smarthost/relay. You keep ownership of your mail and skip babysitting IP reputation.
Test before you send for real
Debugging against real inboxes burns domain reputation fast. Catch test mail in a sandbox first, then run a final check with mail-tester.com.
Disclosure: I’m with Mailtrap. We do SMTP relay and an email sandbox for exactly this, but the advice holds whichever relay or tool you use.
What tripped you up most when you set up your own mail server?
Source: r/EmailEngineering · by /u/Mailtrap_Alek