From ca98b2ba8799b40ca0fe5b38b34c817a0215b119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 26 May 2021 01:33:06 +0200 Subject: Improve 'm-pop' script Username and password have been moved to environment variables. Command-line interface has improved. --- src/m-filter | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 src/m-filter (limited to 'src/m-filter') diff --git a/src/m-filter b/src/m-filter new file mode 100755 index 0000000..756f8b6 --- /dev/null +++ b/src/m-filter @@ -0,0 +1,25 @@ +#!/usr/bin/perl -p + +# m-filter -- filter headers + +# Edit this script to your own preferences. + +BEGIN { + sub header { $_ =~ shift .. not $next =~ /^[ \t]/ } + sub skip { $_ = '' } +} + +($_, $next) = ($next, $_); +skip if header qr/^X-(?!( + Mailer + | Rspamd-\S+ +):)/xi; +skip if header qr/^( + Received + | Received-SPF + | (DKIM|DomainKey)-Signature + | ARC-\S+ + | IronPort-\S+ +):/x; + +END { print $next } -- cgit v1.2.3