X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/721bb27ffd590921fc1d111756481161a11fb521..3c950f6eebc63284f6a50c9e26b428141eef4c0d:/procmail/delay-delivery diff --git a/procmail/delay-delivery b/procmail/delay-delivery index e68d829..38f7c4e 100644 --- a/procmail/delay-delivery +++ b/procmail/delay-delivery @@ -1,14 +1,16 @@ #TODO: create config/delay-(disabled|tonight|weekend) :0 +* POSTPONED ?? . +{ + :0 fw + |$FORMAIL -R X-Postponed X-Was-Postponed +} + +:0 E * ! DISABLE_DELAYS ?? . * DELAY ?? . -* ! DELAYED ?? . { - :0 - * DELAY ?? ^[0-9] - { DELAY="now + $DELAY" } - #TODO: for tickling, use header date RELEASE="`$BIN_DATE -d \"$DELAY\" +'%s %c'`" @@ -25,11 +27,10 @@ { RELEASE_TIME="$MATCH" } LOG="delay: delay delivery of $MSGID until $RELEASE_TIME$NL" - - :0 fw - |$FORMAIL -I "X-Delayed: $RELEASE_TS ($RELEASE_TIME)" + POSTPONED="$RELEASE_TS ($RELEASE_TIME)" INCLUDERC=$PMDIR/record-delayed-mail + INCLUDERC=$PMDIR/addheaders :0 $DELAYED_QUEUE