Relay
A relay is simply another mail server you send everything to, rather than try to deliver it yourself.
There are many companies that specialize in this. Sign up for a free account and they give you the block of text to add to your postfix config. Some popular ones are:
- SMTP2GO
- MailGun
- Amazon SES
They allow anywhere between 50 and 300 a day for free. Amazon charges a miniscule fee after a year.
Note: I originally used SendGrid, but they removed their free tier. I migrated to SMTP2GO but didn’t take the best of notes so be suspicious of this doc.
SMTP2GO
This is the preferred service when you are only interested in a mail relay.
Relay Setup
https://www.smtp2go.com/setupguide/postfix/ https://ivansalloum.com/how-to-configure-postfix-for-external-smtp-relay/
Restart Postfix and use mutt to send an email. It works! the only thing you’ll notice is that your message has a “On Behalf Of” notice in the message letting you know it came from SendGrid. Follow the section below to change that.
Domain Integration
To integrate your domain fully, add DNS records using these instructions.
https://support.smtp2go.com/hc/en-gb/articles/115004408567-Verified-Senders
Technical Notes
DNS
If you’re familiar with email domain-based security, you’ll see that two of the records are links to DKIM keys so they can sign emails as you. The other record (emXXXX) is the host they will use to send email. The SPF record for that host will include a SPF record that includes multiple pools of IPs so that SPF checks will pass. They use CNAMEs on your side so they can rotate keys and pool addresses without changing DNS entries.
If none of this makes sense to you, then that’s really the point. You don’t have to know any of it - they take care of it for you.
Next Steps
Your server can now send email too. All shell users on your sever rejoice!
To actually use your mail server, you’ll want to add some remote client access.
- Set up Dovecot
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.