On 2/26/2013 2:42 PM, Rich Bishop wrote: > I'm running postfix 2.3.3 on Linux. I'd like to send mail to an > external content filter based on the recipient address, which would > be injected back into postfix on port 10027.
This requires multiple postfix instances because the transport_maps parameter is global. http://www.postfix.org/MULTI_INSTANCE_README.html In the main/default postfix instance, use a transport_maps entry for each recipient that should be filtered, pointing to the filter next-hop. Allow unfiltered recipients to be delivered normally, no special arrangements should be needed for them (other than normal postfix configuration for your usage). The content filter should reinject to the second postfix instance, which should then deliver normally; basically a duplicate of the default instance but without the per-recipient transport_maps. Note that per-recipient transport_maps can be a bottleneck if your server is near its performance limits. A higher performance solution is to use virtual_alias_maps to rewrite the filtered recipients to a new domain eg. u...@example.com u...@filter.example.com and use transport_maps to direct filter.example.com to the filter entry port. This also requires a second postfix instance for reinjection and delivery of the filtered mail (well, not required, but very strongly recommended). If necessary, the recipient can be rewritten back to the original domain name in the second postfix instance. -- Noel Jones