We use a multi-hop SMTP system to go from the inside of our network out to the Internet at the domain test.lists.example.com.
The setup is this way for ingress:
{EXTERNAL} -> MS365 (relay/antispam) -> MS On-Prem (via 365 Connector) -> Mailman for delivery to listserv
Egress is this:
Mailman -> Postfix SMTP Relay (smtpproxy) -> INTERNET
--
When a message is sent an invalid list (we'll call it invalid@test.lists.example.com) we end up with a nasty side effect in the system. The "no such recipient" response gets sent to the smtpproxy machine and then *it gets redelivered back to Mailman* as a redelivery as if it isn't accepting a permanent-failure condition code.
This results in a nasty mail loop that results with a "too many hops" error that doesn't state "invalid recipient" and I have no idea why this is the case.
Can anyone provide any insight into how to prevent this type of routing loop caused by the egress of messages?
Thomas