From: martin f. krafft Date: Sun, 23 Sep 2007 19:12:36 +0000 (+0200) Subject: extract headers early, also tickle-delivered, and clean up those X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/77da85a6358ffc97778ac2c06e3c9e803163f1c4 extract headers early, also tickle-delivered, and clean up those --- diff --git a/procmail/cleanup b/procmail/cleanup index 1ce8cf2..286614d 100644 --- a/procmail/cleanup +++ b/procmail/cleanup @@ -1,7 +1,3 @@ -:0 -* ^X-Trained-As: \/(h|sp)am -{ TRAINED_AS=$MATCH } - # remove all headers added in the *local* mail chain: # 1. added by this mailfilter # 2. added by the retraining system @@ -10,6 +6,7 @@ :0 fw |$FORMAIL \ -IX-EqDomain -IX-EqTo -IX-Justme -IX-Spamtrapped \ + -IX-Delay -IX-Tickle \ -IX-Trained-As \ -IX-UID -IX-OfflineIMAP- \ -IX-Status -IStatus -IX-Keywords -IContent-Length diff --git a/procmail/defines b/procmail/defines index a544089..62464dd 100644 --- a/procmail/defines +++ b/procmail/defines @@ -125,6 +125,14 @@ INCLUDERC=$PMDIR/get-msgid :0 E { LOG="NO ORIGINAL_TO: $MSGID" } +:0 +*$ ^X-Trained-As:$RE_EXTRACT_HEADER_VALUE +{ TRAINED_AS="$MATCH" } + +:0 +*$ ^X-Tickle-Delivered:$RE_EXTRACT_HEADER_VALUE +{ TICKLE_DELIVERED="$MATCH" } + # fix variable values for special cases INCLUDERC=$PMDIR/normalise @@ -185,7 +193,3 @@ RETRAIN # JUSTME # if set, contains reason why justme message was passed JUSTME - -# TRAINED_AS -# if set, contains category with which this message has just been trained -TRAINED_AS diff --git a/procmail/tickle b/procmail/tickle index caa09bd..157ed9d 100644 --- a/procmail/tickle +++ b/procmail/tickle @@ -1,7 +1,7 @@ :0 * ! DEST ?? . +* ! TICKLE_DELIVERED ?? . * ORIGINAL_TO ?? ^.+@tickle\.madduck\.net$ -* !^X-Tickle-Delivered * ORIGINAL_TO ?? ^\/[^@]+ { BIN_DATE=/bin/date