291187Re: Is a late header check possible?
- Feb 7, 2013On 2/7/2013 8:58 AM, Titanus Eramius wrote:
> I'm running SpamAssassin as a content_filter on incoming mail which adsI'll assume your content_filter reinjects mail to localhost:10025
> 4 spam-headers, one of them being "X-Spam-Level:". The precise
> header varies, depending on the spamscore. SpamAssassin ads one "*" for
> each spampoint, so a example-header could be:
> X-Spam-Level: ********************
> I would like to have the ability to redirect mails with that header to
> a account where I can store them.
> So basically I *think* I'm asking if Postfix have a header_checks
> feature that runs after the content filters?
Note: make sure your post-filter header checks don't ever reject
mail. That would make you a backscatter source and get you blacklisted.
The cleanest way to do this is a separate postfix instance (not just
a master.cf listener service) that listens on 10025, with its own
header_checks. This also gives the very nice benefit of separation
between pre-filter and post-filter mail.
Alternately, you can do some master.cf gyrations. This is likely
easier to set up, but more confusing long-term. Something like:
# existing reinjection listener
127.0.0.1:10025 inet n - n - - smtpd
... existing stuff ...
# copy of the existing cleanup service
cleanup_filter unix n - n - 0 cleanup
and then put your after-filter checks in header_checks_filter.
-- Noel Jones
- << Previous post in topic Next post in topic >>