From: martin f. krafft Date: Fri, 29 Feb 2008 14:24:23 +0000 (+0100) Subject: fix up tickler X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/764f42aae3e19194a1d356fa7ed7821223e02ccd?ds=sidebyside fix up tickler --- diff --git a/procmail/cleanup b/procmail/cleanup index b739291..e22b58b 100644 --- a/procmail/cleanup +++ b/procmail/cleanup @@ -1,6 +1,6 @@ # remove all headers added in the *local* mail chain: # 1. added by this mailfilter -# (but not X-Tickle, X-Delayed, or X-Resubmitted) +# (but not X-Tickle, X-Postponed, or X-Resubmitted) # 2. added by the retraining system # 3. added by offlineimap # 4. added by the MUA diff --git a/procmail/defines b/procmail/defines index a24641c..17b3d3c 100644 --- a/procmail/defines +++ b/procmail/defines @@ -156,11 +156,7 @@ INCLUDERC=$PMDIR/get-msgid { TRAINED_AS="$MATCH" } :0 -*$ ^X-Tickle-Delivered:$RE_EXTRACT_HEADER_VALUE -{ TICKLE_DELIVERED="$MATCH" } - -:0 -*$ ^X-Delayed:$RE_EXTRACT_HEADER_VALUE +*$ ^X-Postponed:$RE_EXTRACT_HEADER_VALUE { DELAYED="$MATCH" } # fix variable values for special cases diff --git a/procmail/delay-delivery b/procmail/delay-delivery index e68d829..9b79534 100644 --- a/procmail/delay-delivery +++ b/procmail/delay-delivery @@ -5,10 +5,6 @@ * DELAY ?? . * ! DELAYED ?? . { - :0 - * DELAY ?? ^[0-9] - { DELAY="now + $DELAY" } - #TODO: for tickling, use header date RELEASE="`$BIN_DATE -d \"$DELAY\" +'%s %c'`" @@ -27,7 +23,7 @@ LOG="delay: delay delivery of $MSGID until $RELEASE_TIME$NL" :0 fw - |$FORMAIL -I "X-Delayed: $RELEASE_TS ($RELEASE_TIME)" + |$FORMAIL -I "X-Postponed: $RELEASE_TS ($RELEASE_TIME)" INCLUDERC=$PMDIR/record-delayed-mail diff --git a/procmail/tickle b/procmail/tickle index fbb8a76..6557848 100644 --- a/procmail/tickle +++ b/procmail/tickle @@ -1,16 +1,16 @@ +# The X-Tickle header has priority over the Original-To address :0 -* ORIGINAL_TO ?? ^.+@tickle\.madduck\.net$ -* ORIGINAL_TO ?? ^\/[^@]+ +*$ ^X-Tickle:${RE_SPACE}+\/${RE_NOT_SPACE}+ { TICKLE="$MATCH" } :0 E -*$ ^X-Tickle:${RE_SPACE}+\/${RE_NOT_SPACE}+ +* ORIGINAL_TO ?? ^.+@tickle\.madduck\.net$ +* ORIGINAL_TO ?? ^\/[^@]+ { TICKLE="$MATCH" } :0 * TICKLE ?? . * ! DEST ?? . -* ! TICKLE_DELIVERED ?? . { DAILY_DELIVERY_TIME=04:20 JUST_DATE="`$BIN_DATE -d \"$DATE\" +%x`"