X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/8dde77c861da2fb8c14e2ce651423691db664f47..HEAD:/procmail/listquirks diff --git a/procmail/listquirks b/procmail/listquirks index ffb540f..cfd67eb 100644 --- a/procmail/listquirks +++ b/procmail/listquirks @@ -1,10 +1,34 @@ +# for lists with a CC-all policy, add the M-F-T header if none exists. This +# should go together with mutt hooks to unset followup_to: +# +# send-hook . 'set followup_to' +# send-hook '~C git@vger\.kernel\.org' 'unset followup_to' +# :0 +* ! DEST ?? . * ? echo "$EQ_TO" | $EGREP -qif $CONF/cclists +* ! ^Mail-Followup-To: { CORRESPONDENTS=`formail -cxTo: -xCc: -xFrom: | tr -s '\n' ,` - LOG="listquirks: adding M-F-T header for message on list $EQ_TO$NL" + LOG="listquirks: adding M-F-T header for message on list $EQ_TO$NL" :0 fw - |$FORMAIL -a "Mail-Followup-To: $CORRESPONDENTS" + |$FORMAIL -A "Mail-Followup-To: $CORRESPONDENTS" + CORRESPONDENTS +} + +# for lists that munge reply-to, let's get rid of it and instead add a M-F-T +# header with all correspondents. +# +:0 E +* ! DEST ?? . +* ? echo "$EQ_TO" | $EGREP -qif $CONF/replytolists +* $^Reply-To: $EQ_TO +{ + CORRESPONDENTS=`formail -cxTo: -xCc: -xFrom: -xReply-To: | tr -s '\n' ,` + LOG="listquirks: replacing Reply-To with M-F-T for message to list $EQ_TO$NL" + :0 fw + |$FORMAIL -I Reply-To: -A "Mail-Followup-To: $CORRESPONDENTS" + CORRESPONDENTS } # vim:ft=procmail