]> git.madduck.net Git - etc/mailfilter.git/blobdiff - procmail/listquirks

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

no need to scan bodies for test and ignore patterns
[etc/mailfilter.git] / procmail / listquirks
index ffb540f545fb593ab5ca3531aec88072a65c37d0..cfd67ebcd83d90050e81cf02fc8bcca9303d0001 100644 (file)
@@ -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