I have an issue that I imagine others might share. I'll appreciate any insights from the group here!
I have an instance of Postfix and Dovecot up and running just fine. It receives email from outside, including email to Virtual Users and Virtual Alias Users. The Virtual Alias Users forward correctly to either Virtual Users or outside accounts as appropriate. All good!
Like many others, I have discovered that some email systems (most notably Gmail and Outlook but certainly others as well) will not accept email from my system because its IP is a home account, even though it is mapped correctly in MX records and updated with DDNS. So, I have included a REGEX in my Transport Maps to route selected recipient domains through an SMTP Relay provider (Sendgrid in my case). I don't want everything going through the relay, only things that need to per my Transport Map.
As this only affects outgoing mail, I tested several scenarios and found that only some work.
I suspect that the Transport Map process is looking only at the Virtual Alias User address, which is not google.com or gmail.com. My regex in the above examples may not be great, but that shouldn't make a difference in routing, should it?
Any ideas from anyone on how I could fix this or handle it differently?
I have an instance of Postfix and Dovecot up and running just fine. It receives email from outside, including email to Virtual Users and Virtual Alias Users. The Virtual Alias Users forward correctly to either Virtual Users or outside accounts as appropriate. All good!
Like many others, I have discovered that some email systems (most notably Gmail and Outlook but certainly others as well) will not accept email from my system because its IP is a home account, even though it is mapped correctly in MX records and updated with DDNS. So, I have included a REGEX in my Transport Maps to route selected recipient domains through an SMTP Relay provider (Sendgrid in my case). I don't want everything going through the relay, only things that need to per my Transport Map.
google.com smtp:[smtp.sendgrid.net]:587
.google.com smtp:[smtp.sendgrid.net]:587
*@gmail.* smtps:[smtp.sendgrid.net]:465
/.*@gmail.*/i smtps:[smtp.sendgrid.net]:465
.google.com smtp:[smtp.sendgrid.net]:587
*@gmail.* smtps:[smtp.sendgrid.net]:465
/.*@gmail.*/i smtps:[smtp.sendgrid.net]:465
As this only affects outgoing mail, I tested several scenarios and found that only some work.
+Good Virtual Users sending to an external google.com or gmail.com correctly route through the relay provider.
-No Good Virtual Users sending to a Virtual Alias User, whose real email forwards to google.com or gmail.com DO NOT route correctly.
-No Good Virtual Users sending to a Virtual Alias User, whose real email forwards to google.com or gmail.com DO NOT route correctly.
I suspect that the Transport Map process is looking only at the Virtual Alias User address, which is not google.com or gmail.com. My regex in the above examples may not be great, but that shouldn't make a difference in routing, should it?
Any ideas from anyone on how I could fix this or handle it differently?