From: martin f. krafft Date: Tue, 1 Feb 2011 07:49:50 +0000 (+0100) Subject: add subject cleaner X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/46d57b0e1b08f618e5d46f2538c7ac92c79e2326 add 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 +