--- In postfix-us...@yahoogroups.com, Sahil Tandon <sa...@...> wrote: > > jweinbergerhj wrote: > > > I know it's a simple question...but doea any know if this: > > > > content_filter=hash:/path/to/table (or mysql:/path/to/filters.cf) > > > > will work? > > No. From postconf(5): > > content_filter (default: empty) > > The name of a mail delivery transport that filters mail after it is > queued. > > This parameter uses the same syntax as the right-hand side of a > Postfix transport(5) table. This setting has a lower precedence > than a content filter that is specified with an access(5) table or > in a header_checks(5) or body_checks(5) table. > > > I'm trying to test some new content filters and want to be able to apply them per > > domain or per address (recipient) for my test and personal domains before I make them > > standard. > > You could use check_recipient_access; example: > > /etc/postfix/main.cf: > smtpd_recipient_restrictions = > .. > check_recipient_access hash:/etc/postfix/filters > .. > > /etc/postfix/filters > recipi...@... FILTER foo:bar > > There are some caveats and limitations; for more information see: > http://www.postfix.org/access.5.html > http://www.postfix.org/FILTER_README.html > > -- > Sahil Tandon <sa...@...> > Sahil
Thanks!! I read "This parameter uses the same syntax as the right-hand side of a Postfix transport(5) table" as meaning it can take the same syntax as transport_maps, i.e. a table. Maybe not. check_recipient_access works fine, but it is problematic for me, as the messages get passed to the content filter before alias translation, which causes problems with aliases that map to virtual mailboxes. Also I would need check_recipient_access to be a mysql: table (which it can be), but I don't know how to control the matching order in a mysql table lookup - any ideas? Do you (or anyone) have any ideas on how to overcome this? I also came up with another way to do this...does anyone have any thoughts on how this will work? Make the content filter into the transport using transport_maps. Then when the content filter injects the messages back into postfix, use master.cf -o transport_maps to override and make the actual transport maps effective. Will that work? Thanks for your help! --Jeff