diff options
-rwxr-xr-x | src/fh | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#!/usr/bin/perl -p + +# fh -- filter headers + +BEGIN { + sub header { $_ =~ shift .. not $next =~ /^[ \t]/ } + sub skip { $_ = '' } +} + +($_, $next) = ($next, $_); +skip if header qr/^X-\S+:/i and not header qr/^( + X-Mailer + | X-Virus-Scanned +):/x; +skip if header qr/^( + Received + | Received-SPF + | (DKIM|DomainKey)-Signature + | ARC-Message-Signature + | IronPort-\S+ +):/x; + +END { print $next } |