From 46d57b0e1b08f618e5d46f2538c7ac92c79e2326 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 1 Feb 2011 08:49:50 +0100 Subject: [PATCH 1/1] add subject cleaner --- procmail/procmailrc | 1 + procmail/subject-cleaner | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 procmail/subject-cleaner diff --git a/procmail/procmailrc b/procmail/procmailrc index 69b3c70..e5620b3 100755 --- a/procmail/procmailrc +++ b/procmail/procmailrc @@ -49,6 +49,7 @@ INCLUDERC=$PMDIR/tickle INCLUDERC=$PMDIR/tnef-filter INCLUDERC=$PMDIR/listquirks +INCLUDERC=$PMDIR/subject-cleaner INCLUDERC=$PMRULES/all diff --git a/procmail/subject-cleaner b/procmail/subject-cleaner new file mode 100644 index 0000000..2dd3387 --- /dev/null +++ b/procmail/subject-cleaner @@ -0,0 +1,15 @@ +:0 +* SUBJECT ?? ^.+\[AntiVir checked\]$ +{ NEWSUBJECT="`echo $SUBJECT | sed -e 's,\[AntiVir checked\]$,,'`" } + +:0 +* NEWSUBJECT ?? . +{ + :0 fw + |$FORMAIL -I "Subject: $NEWSUBJECT" + SUBJECT="$NEWSUBJECT" + NEWSUBJECT +} + +# vim:ft=procmail + -- 2.39.5