Daniel Bromberg: > Greetings master postfixers, > > I am trying to solve a forwarding problem. I have two separate amavis > instanceson my edge MX that each do spam-checking: one incoming > (obvious), one outgoing (our users aren't too good about keeping their > computers zombie-free). > > For the particular case where mail passes the gateway, arrives locally, > whereupon it's discovered that it should be forwarded to an external > address, I do NOT want it to get re-scanned by the outgoing amavis > instance, but rather sent straight through. So, I need to route it > differently by choosing an alternate transport (which I will just set up > as a special, 'pre-screened' smtp listening port.) However, how do I > identify / capture this stream of forwarded mail? Right now, to the > outgoing MX/amavis gateway, it looks exactly like it originated from the > inside, rather than having been forwarded. > > mysql_virtual_alias_maps, which I'm using, did not have any helpful > references (because aliases are general, not necessarily external), nor > did several Google's about forwarding magic.
Use separate entry points for clean and dirty mail on the each MTA. Receive all mail from remote senders on inbound-dirty. Receive all mail from local senders on outbound-dirty. Configure the inbound MTA with a "relayhost" setting of outbound-clean. Configure the outbound MTA to send local mail to inbound-clean. Wietse