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.
My first attempt was check_recipient_access=regexp:/etc/postfix/esa ...
with esa containing:
# Send non-local mail to the ESA
/\@local1\.edu$/ dunno
/\@local2\.edu$/ dunno
// FILTER smtp:[esa]:25
which didn't work when the mail had both internal and external
recipients. I believe because as stated in the FILTER_README:
* The same content filter is applied to all the recipients of a given
message.
So I then tried messing with transport_maps and then default_transport,
but I don't think I can override these settings in port 10027 smtpd
definition in master.conf (so I ended up with a mail loop).
I believe I can accomplish this by using either the transport_maps or
default_transport setting and configuring another instance of postfix
listen on 10027 for the checked mail. Is this the best way of doing
this, or is there an easier way?
Thanks in advance,
Rich