From 64af158a8fae169d3f24f82687f92cc7769bc92f Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 17 Aug 2007 17:05:02 +0200 Subject: [PATCH] generalise list quirks for dealing with lists with cc-all policy --- config/cclists | 1 + config/ignore-lists | 2 ++ procmail/listquirks | 10 ++++++++++ procmail/procmailrc | 2 ++ procmail/rules/mass | 9 +-------- 5 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 config/cclists create mode 100644 procmail/listquirks diff --git a/config/cclists b/config/cclists new file mode 100644 index 0000000..931115f --- /dev/null +++ b/config/cclists @@ -0,0 +1 @@ +^git@vger\.kernel\.org$ diff --git a/config/ignore-lists b/config/ignore-lists index 9d22f50..03cded3 100644 --- a/config/ignore-lists +++ b/config/ignore-lists @@ -1,2 +1,4 @@ ^Sender: owner-mutt-users@mutt\.org$ ^Sender: owner-postfix-users@postfix\.org$ +$^ prevent CCs from git mailing list. +^([Tt]o|[Cc]{2}):.*git@vger\.kernel.org diff --git a/procmail/listquirks b/procmail/listquirks new file mode 100644 index 0000000..ffb540f --- /dev/null +++ b/procmail/listquirks @@ -0,0 +1,10 @@ +:0 +* ? echo "$EQ_TO" | $EGREP -qif $CONF/cclists +{ + CORRESPONDENTS=`formail -cxTo: -xCc: -xFrom: | tr -s '\n' ,` + LOG="listquirks: adding M-F-T header for message on list $EQ_TO$NL" + :0 fw + |$FORMAIL -a "Mail-Followup-To: $CORRESPONDENTS" +} + +# vim:ft=procmail diff --git a/procmail/procmailrc b/procmail/procmailrc index 9b66cee..fc4b83d 100755 --- a/procmail/procmailrc +++ b/procmail/procmailrc @@ -72,4 +72,6 @@ INCLUDERC=$PMDIR/handlespam INCLUDERC=$PMDIR/lurker +INCLUDERC=$PMDIR/listquirks + INCLUDERC=$PMRULES/all diff --git a/procmail/rules/mass b/procmail/rules/mass index f7d539f..59b6bd3 100644 --- a/procmail/rules/mass +++ b/procmail/rules/mass @@ -2,14 +2,7 @@ * ORIG_DOMAIN ?? ^mass\.madduck\.net$ { DESTDIR=$BASE/.mass - - :0 - * ORIG_LOCAL ?? ^git=vger\.kernel\.org$ - { - CORRESPONDENTS=`formail -cxTo: -xCc: -xFrom: | tr -s '\n' ,` - :0 fw - |$FORMAIL -a "Mail-Followup-To: $CORRESPONDENTS" - } + :0 ${DESTDIR}/ } -- 2.39.2