On Tue, Dec 16, 2014 at 01:04:29AM +0100, li...@rhsoft.net wrote:

> >>>The "-h" option is I think what you're looking for
> >>
> >>sounds promising - thank you for the hint!
> >
> >You'll need to modify the code to process the "IGNORE" action,
> >rather than print it, and to print unmatched headers
> 
> modifiy the postfix code?

Yes, create a custom variant of "postmap".

> the difficult thing here is that "grep" in context of multiline headers
> don't work that well while "header_checks" does but pipe all the mailfiles
> through smtpd is not really a repeatable solution

It is not difficult to use Perl to accumulate folded multi-line
headers into a single string for matching, and then match each
complete header against a list of patterns.

The postmap(1) utility comes close, but it prints matching headers
and the action, rather than applying the action and printing any
non-matching headers.

A chimera of postmap(1) and cleanup(8) would do the trick.  I don't
think it is very much code to copy/change.

-- 
        Viktor.

Reply via email to