![]() ![]() In SendGrid, this is under the “API Keys” settings panel. Now that the domains are configured, obtain the credentials for your provider’s SMTP gateway. As part of this, you will configure DNS CNAME records for DKIM and SPF:Ĭonfused about how SPF can work like this, even though it’s being set on, not ? SPF is used to validate the Return-Path header, not From, and SendGrid uses as the Return-Path. In SendGrid, this is called “Sender Authentication”. Once you have an account with your SMTP relay provider, you will want to add the domain(s) that you will be sending from to your account. I chose to go with SendGrid, because their free plan offers sending 100 emails/day forever, which is far more emails than I can see myself sending. There are many options available for this, with Mailgun, Mandrill by Mailchimp and SendGrid by Twilio being the three heavy-weights of the industry. To prevent other email servers from discarding our emails because they’re from an IP with no reputation for mail sending, we can use an outgoing SMTP relay instead of sending email ourselves. We do not need to set up SPF/DKIM DNS records at this time, since we will be using an outgoing SMTP relay to send email, not the mail server itself. For most use cases, this means pointing an A record from your mail hostname (in my case, ) to your mail server’s public IP, and configuring MX records on the domains that will be receiving email: Make sure to enable the fetchmail service - fetchmail will pull email from our backup mail server. Here is a step-by-step guide to configuring Mailu with an outbound SMTP gateway and backup MX server: Part 1: Install Mailuįollow the Mailu setup guide published on their website. In fact, Mailu is so easy to use, that we can configure (2) and (3) out of the box. Then, when the primary server is back up, use IMAP to mirror messages from the backup automatically. ![]() You can either self-host this backup or use a public service. Set up MX records with a lower priority than your self-hosted mail server to have them act as a fallback. Use a backup email server to receive email when your server is down.Yes, this is not self-hosting, but you cannot “self-host” an outgoing email anyways, it is ultimately leaving your network one way or another. Use a trusted SMTP outgoing relay to send email.This gives us a good, well-architected base setup to configure further. into a set of Docker containers that can be managed with Docker Compose or your container tool of choice. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |