Case study · Servers & email infrastructure
Mail servers that reach the inbox: Postfix, SPF, DKIM and DMARC
Self-hosted mail servers that reach the inbox: for Freelancer.com clients and for my own server, which carries the mail for bryarworld.com and the sites I host.

The problem
Mail from self-hosted servers often lands in spam or bounces. A contact form, an invoice or a password reset goes out and never arrives, and the site owner only finds out when a customer complains. Some clients also wanted to stop paying per mailbox for hosted email, but without giving up deliverability.
The causes are rarely one big fault. They are usually several small ones: a missing or wrong SPF record, no DKIM signature, no DMARC policy, reverse DNS that doesn’t match the server name, an expired certificate, or a server IP that a large provider distrusts.
What I built
- Installed and secured Postfix or Exim4 with Dovecot (IMAP/POP3) and Let’s Encrypt TLS certificates on Debian / Ubuntu.
- Configured SPF, DKIM and DMARC for each domain, plus reverse DNS that matches the server’s hostname.
- Tested every change with real test sends and mail-tester until messages passed spam filters, instead of assuming the records were right.
- On my own server: a multi-domain setup under a hosting panel, with a strict DMARC policy (
adkim=s; aspf=s), so mail that is not properly signed for the domain fails rather than being quietly accepted.
Key decisions
- Measure, then fix. I finish each setup with test sends to major mailbox providers and a mail-tester report, and the headers are read to confirm SPF, DKIM and DMARC all pass.
- Route around a block without weakening the rest. One large consumer mailbox provider rejected part of my hosting company’s IP range, and delisting requests were not accepted. Instead of moving all mail to a paid service, I routed only that provider’s recipients through an authenticated relay. The relay signs with my own domain’s DKIM key, so DMARC still passes. All other mail still goes out directly from my server.
- Stop bad sends before they happen. Outgoing campaign mail is checked against a tracker. Addresses that bounced as non-existent are marked invalid and refused automatically, and sends are rate-limited, which protects the server’s reputation.
- Every change is reversible. Configuration files are backed up before each edit, with a written rollback step.
The result
- Client and own servers sending authenticated mail that passes SPF, DKIM and DMARC checks.
What this means for your project
If your site’s emails land in spam, your contact form “works” but nothing arrives, or you want your own mail server instead of paying per mailbox, I can find the cause, fix the DNS and server configuration, and show you the test results before I hand it over.
More case studies
Own product · Healthcare software
MediLab LIMS: a multi-tenant laboratory system in four languages
How I built MediLab LIMS, my own cloud laboratory information system: samples, worklists, results, QC and analytics, multi-tenant and in four languages.
Website + Laravel platform · Education
Next Generation Education: bilingual website and secure digital textbook platform
A bilingual Arabic/English WordPress site plus NextGen Connect, a Laravel platform that streams digital textbooks to schools with per-teacher access.
Have a project like this?
Tell me what you need. I usually reply within a few hours, and you get a clear plan and a fixed quote.
Or message me on Telegram · [email protected]


