On 2/7/2013 8:58 AM, Titanus Eramius wrote: > I'm running SpamAssassin as a content_filter on incoming mail which ads > 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?
I'll assume your content_filter reinjects mail to localhost:10025 after processing. 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. http://www.postfix.org/MULTI_INSTANCE_README.html Alternately, you can do some master.cf gyrations. This is likely easier to set up, but more confusing long-term. Something like: # master.cf # existing reinjection listener 127.0.0.1:10025 inet n - n - - smtpd ... existing stuff ... -o cleanup_service_name=cleanup_filter # copy of the existing cleanup service cleanup_filter unix n - n - 0 cleanup -o header_checks=pcre:/etc/postfix/header_checks_filter -o body_checks= and then put your after-filter checks in header_checks_filter. -- Noel Jones