Forwarding incoming email with an smtp as a service relay reddit / selfhosted ---------------------------------------------------------------------- ItchyWeight · 2023-10-20 16:25 After having hosted my own postfix server, including SPF, DKIM and DMARC for years, I finally gave up since there were still fluctuating delivery issues for outgoing mail. So the plan is to use an an external service as relay for outgoing mail, handling generated transactional mails like user registrations and such. (there's still a postfix running on that box) For now, I've chosen smtp2go which requires sender verification, which is fine for those transactional outgoing mails whose sender is always the same. With my completely self-hosted setup, I forwarded incoming email to an info address on that domain to my gmail address (to avoid an additional inbox). But unfortunately, that doesn't work with smtp2go because the actual sender for a to be forwarded email is obviously someone who's not a verified sender from smtp2go's perspective and therefor bounces. I suspect other smtp providers might handle that the same way. The only option I see now is to leave incoming mail on that server, install dovecot or something and setup my main google address to pull messages from that server - which is kind of awkward... How do you guys deal with such a scenario? ---------------------------------------------------------------------- watchdog_timer · 2023-10-20 17:25 I don't quite understand your setup. What is the purpose of forwarding incoming email to Gmail? Why can't your mail client retrieve messages from the upstream server? ---------------------------------------------------------------------- florian_7843 · 2023-10-20 17:35 Not what you asked for, but I started with self hosting my mail server \~ 1-2 years ago using mailu. Handles basically everything for me and I only needed to check my DNS entries + Reverse DNS. Haven't really had any problems since then. Only thing I had to make sure to set SPF to strictest setting (I believe drop), etc.. that made the big ones MS and Google trust my mail instance without problems. Only had a single mail rejected by Microsoft when I had my SPF set to junk instead of drop or something like that. ---------------------------------------------------------------------- adamshand · 2023-10-20 18:14 That's an interesting anecdote about setting SPF to drop. Thanks! ---------------------------------------------------------------------- ItchyWeight · 2023-10-20 18:38 The MX record for the domain points to the server running that postfix, otherwise no mail would be routed there anyway. The original configuration was with a relayhost set to smtp2go and virtual\_alias\_maps which mapped [incoming@mydomain.com](mailto:incoming@mydomain.com) \-> [myaccount@gmail.com](mailto:myaccount@gmail.com) Strangely enough, smtp2go obviously allowed these forwards from the virtual\_alias\_maps at least up until summer or so, then they apparently changed something and now there are bounces. Meanwhile, I did setup dovecot so that I don't loose those incoming mails, but it adds complexity, which is why I'm curious how others handle this kind of situation... Plus, I have other domains MX pointing to that server - which accepts them via respective virtual\_alias\_domains - but again, the forward to family member's actual accounts stopped working - so more "intermediate" mailboxes, not so nice... ---------------------------------------------------------------------- ItchyWeight · 2023-10-20 18:42 Yeah, well, empirically, I had repeated issues with t-online and gmail recipients mostly. And I was never sure if it was my config, my IP (hosted on netcup), or something else, but it required constant attention. And that problem should really be gone with an smtp as a service (hopefully). But maybe I'll have a look at mailu anyway... ---------------------------------------------------------------------- florian_7843 · 2023-10-20 19:37 Check out mxtoolbox. Great website to check your mail server/ DNS etc. ---------------------------------------------------------------------- bz386 · 2023-10-20 20:02 I haven't tried it myself, but SRS (Sender Rewriting Scheme) might work for your use case. It is designed to route bounces back through a chain of email servers and is specifically supposed to solve your forwarding scenario. There's [PostSRSd](https://github.com/roehling/postsrsd) that can add this capability to Postfix. Otherwise you really need a SMTP relay that is not focused on transactional emails, but I'm not aware of any free ones (for obvious reasons). Services like [pobox.com](https://pobox.com) or [mxroute.com](https://mxroute.com) might be usable as SMTP relays, but they obviously have a cost, which might not be worth it. I was in the same situation and eventually caved in and just routed all my personal email and domains to Fastmail, and only use smtp2go for transactional emails sent by my servers. ---------------------------------------------------------------------- ProfessionalAd3026 · 2023-10-20 20:16 T-Online sucks for many years already. They wouldn’t even follow standard back in the days. ---------------------------------------------------------------------- haroldp · 2023-10-20 23:06 SRS is exactly the fix for this. ---------------------------------------------------------------------- ItchyWeight · 2023-10-21 07:25 Interesting, although I have to admit, this brings back memories of dealing with sendmail rewrite rules back in the 90s when I had to maintain a uucp based mailserver as an intern ;-) I’ll have look, thanks! ---------------------------------------------------------------------- Affectionate-Fig-805 · 2023-10-21 14:43 what does mxtoolbox says about your email deliverability or overall email health? ---------------------------------------------------------------------- watchdog_timer · 2023-10-21 17:59 If you're already running your own mail server, what's the purpose of the Gmail forward? I set our family's email clients to retrieve their messages directly off the serv using IMAP or POP3. Outgoing messages are routed through a free Mailjet account. Since all the sender "from" are on our domain, they're in our Mailjet allowed list. ---------------------------------------------------------------------- ItchyWeight · 2023-10-22 09:08 Yes, that'd be an option and that's what I've meanwhile setup for the main incoming address anyway.