From: martin f. krafft Date: Mon, 25 May 2009 12:36:31 +0000 (+0200) Subject: properly attach mdns from crap mailers to threads X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/90e7c2b254d33d781ed8f9932713a2edbb775fae properly attach mdns from crap mailers to threads --- diff --git a/procmail/attach-mdn b/procmail/attach-mdn new file mode 100644 index 0000000..3e9a28e --- /dev/null +++ b/procmail/attach-mdn @@ -0,0 +1,14 @@ +# certain crap mailers don't use standard headers to thread messages: +# http://madduck.net/blog/2009.05.20:read-notifications-standards-and-microsoft/ +# this recreates at least the In-Reply-To header, but not the References list. +# Better than nothing. +:0 +* ^Content-class: urn:content-classes:mdn +* !^In-Reply-To: +*$ B ?? ^Original-Message-ID:$RE_EXTRACT_HEADER_VALUE +{ + LOG="attach-mdn: unthreaded MDN in reply to $MATCH$NL" + + :0 fw + |$FORMAIL -A "In-Reply-To: $MATCH" +} diff --git a/procmail/procmailrc b/procmail/procmailrc index 1271fda..f91ede7 100755 --- a/procmail/procmailrc +++ b/procmail/procmailrc @@ -29,6 +29,8 @@ INCLUDERC=$PMDIR/eqdomains INCLUDERC=$PMDIR/duplicates +INCLUDERC=$PMDIR/attach-mdn + INCLUDERC=$PMDIR/to-gmail INCLUDERC=$PMDIR/justme