On 2024-12-30 at 10:11 +0100, Jaroslaw Rafa wrote: > I also considered using a "more comprehensive solution" that you suggest, > but similarly have no time to implement it. BTW, I have no problems with > sending to Microsoft, or Yahoo, or any other big recipients, except Google. > That's the only one that is problematic. Of course I fell into the usual > t-online block for unknown servers, but this has been resolved pretty > quickly. > > The problem with implementing this is that many companies use Google for > hosting their mail, so it should be used not only for destinations at > gmail.com, but also for various other domains - you have to first check if a > MX for a given domain is at Google, and it must be done with an external > script, as Postfix's destination-based transport choice cannot check for MX, > it can only literally check for recipient's domain (there were requests on > Postfix list about such feature, and Wietse explained why it would be > hard/impossible to implement with current Postfix architecture).
Unlike O365, Google Workspace uses the same MX names for everyone, so you may override the resolution for aspmx.l.google.com alt1.aspmx.l.google.com alt2.aspmx.l.google.com alt3.aspmx.l.google.com alt4.aspmx.l.google.com on your dns cache (note: if using /etc/hosts, you will need to set smtp_host_lookup native) to point to a different IP (e.g. 127.0.0.7) on which you have a different MTA listening which then does the proxying to that service. It might be possible to combine that second instance into the main postfix as different interface, but I'm not so proficient in postfix, so I leave that optimization as an exercise for the reader. ☺ _______________________________________________ mailop mailing list mailop@mailop.org https://list.mailop.org/listinfo/mailop