summaryrefslogtreecommitdiff
path: root/src/m-filter
diff options
context:
space:
mode:
Diffstat (limited to 'src/m-filter')
-rwxr-xr-xsrc/m-filter25
1 files changed, 25 insertions, 0 deletions
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 }