Use Sendwax as a Postfix relayhost
Everything on the box — cron, monitoring, mail(1) — goes out properly signed.
The values
| Host | smtp.sendwax.com |
|---|---|
| Port | 587 |
| Encryption | TLS / STARTTLS |
| Username | sendwax |
| Password | a send-only API key from API keys in the dashboard |
| From | an address you have approved under Senders |
The username is literally sendwax for everybody — the key is what
identifies your account. Use a send-only key: it can send mail and nothing else, so a key
sitting in a settings screen on shared hosting cannot read your contacts.
relayhost = [smtp.sendwax.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:sendwax:esk_send_your_key
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
Step by step
- Add the lines above to
main.cf, with your own key. - The square brackets matter: they tell Postfix not to look up an MX record for that name.
- Run
postfix reload, thenecho test | mail -s test you@example.com. - Watch
/var/log/mail.log. A250with a queue id means we have taken it.
Rewrite the envelope, or every message is refused
A server sends mail as root@hostname by default, and that is not an approved sender. Use sender_canonical_maps or smtp_generic_maps to rewrite local addresses to one approved address, or every cron job on the box will produce a 550 and a bounce to a mailbox nobody reads.
Checking it worked
Postfix handles our replies the way you want: a 4xx defers and retries, a 5xx bounces with our text quoted in the notice. If you see mail queueing rather than bouncing, that is us asking for patience, not a misconfiguration.
What else to know
We do not relay your message byte for byte — we read it and build a new one that our DKIM signature covers, which is what makes the reporting and the unsubscribe handling work. It costs you inline image placement, threading and a few other things, all listed on the SMTP relay page. Worth two minutes before you point production at it.
If you are writing the code rather than configuring somebody else's, the API is the better door: a message id per recipient and an error you can read, instead of a three-digit reply your framework swallowed.
Other setups
- WP Mail SMTP — The most installed SMTP plugin on WordPress. Takes about two minutes.
- FluentSMTP — Free, open source, and happy to hold several connections at once.
- Post SMTP — Keeps its own email log and can alert you when a send fails.
- Easy WP SMTP — The plainest of them. Nothing to configure beyond the connection.
- Gravity SMTP — From the Gravity Forms team, and the right choice if your forms are theirs.
- WooCommerce — Order confirmations, shipping notices, password resets. The ones customers notice.
- Laravel — Two lines of .env. Or use our package and skip SMTP entirely.
- Python — The standard library, no dependencies.
- Nodemailer — The usual way a Node app sends mail.