Mail server in 5 nights

January 2025. Need my own mail server. Asked AI how long it would take. "2-3 hours, not hard".

Yeah right.

Day 1. Postfix installed. Emails go out. Land in spam. Google says need SPF.

Day 2. SPF configured. Still spam. Need DKIM. Key generation, DNS records, signing emails. AI gives one config, doesn't work. Another config, breaks Postfix. Read the docs myself.

Day 3. DKIM works. Gmail accepts. Yahoo - still spam. Need DMARC. And PTR record on the server. Hosting support ticket, wait 6 hours.

Day 4. PTR done. Emails arrive. But incoming doesn't work. Dovecot, certificates, ports 993/995. AI suggests config for Dovecot 2.2, I have 2.3. Wasted 2 hours before noticing.

Day 5. Finally. Sending, receiving, IMAP, web interface. Tested from three different accounts - all good.

Could have used Mailgun or SendGrid. But then - pay for every email, depend on third-party, domain restrictions.

Own server - any domain, any volume, full control. Set up once, works forever.

Five nights instead of "2-3 hours". AI can't do infrastructure. Every config it gave me was slightly wrong. In the end I read postfix and dovecot docs cover to cover. Old school.

← Back to blog