summaryrefslogtreecommitdiff
path: root/src/m-filter
blob: 756f8b679b5d89694326a09aa99e9a6e70f21654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 }