This draft comes from a real send-only mail setup note. I cleaned it up heavily before putting it here because the original working log included real domains, DNS values, and implementation details that should never be published as-is.
The core lesson, though, is highly reusable: if a server only sends mail and does not receive it, you still need to treat deliverability seriously. Without SPF and DKIM, send-only mail is much more likely to be flagged, filtered, or sent straight to spam.
The Goal
The goal was to improve the reputation and authenticity of outgoing mail from a send-only server by doing three things well:
- publish a valid SPF record
- configure OpenDKIM to sign outbound mail
- wire Postfix to the DKIM milter correctly
Why This Matters
Plenty of infrastructure sends mail without being a full mail server:
- application alerts
- contact form relays
- system notifications
- backup and cron reports
Even in those cases, receiving systems still judge the messages. If you skip the basics, deliverability suffers.
1. Start with SPF
A representative SPF record for a send-only server looks like this:
| |
The exact content depends on who is allowed to send for the domain. The important thing is that the sending IPs and providers are explicitly represented.
2. Install OpenDKIM
On a Debian or Ubuntu host:
| |
3. Wire Postfix to OpenDKIM
In the original note, I also stripped the X-Originating-IP header and connected Postfix to the local milter socket:
| |
4. Prepare OpenDKIM Directories
| |
5. Create a Minimal OpenDKIM Config
Example /etc/opendkim.conf:
| |
Trusted hosts example:
| |
6. Map Domains to Signing Keys
If the server sends for multiple domains, keep the mapping explicit.
/etc/opendkim/SigningTable
| |
/etc/opendkim/KeyTable
| |
7. Generate DKIM Keys
For each domain:
| |
That generates:
mail.privatefor the servermail.txtfor DNS publication
8. Publish the DNS Record
The selector typically looks like:
| |
The published record itself will resemble:
| |
9. Restart and Verify
| |
Then send a test mail:
| |
When reviewing the raw message, I want to see:
- a
DKIM-Signatureheader DKIM: PASS- ideally
SPF: PASS - ideally
DMARC: PASS
One Important Postfix Note
For send-only hosts, I do not treat all sending domains as local receiving domains. mydestination should stay limited to the host’s actual local identity unless the server is also meant to receive mail for those domains.
That distinction matters because send-only mail is simpler and safer when you avoid pretending the box is also a full inbound mail server.
What This Note Shows
This is the kind of systems work that often looks small from the outside. But when mail is part of business operations, deliverability is infrastructure, not decoration.
A send-only host still needs:
- correct DNS
- correct signing
- correct Postfix wiring
- correct verification after deployment
Closing Thought
I keep notes like this because mail problems are easy to underestimate until they quietly affect alerts, onboarding messages, resets, receipts, or system notifications. Once rewritten and sanitized, a note like this becomes a good reusable checklist for any future send-only host.