X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/9551828cd214519a5c3b95c1d3747a0a4788a470..406e0c358dbe50c3ff0463c12f3d9bcdccfaf5d2:/procmail/delay-delivery diff --git a/procmail/delay-delivery b/procmail/delay-delivery index e04f7d7..405cbcb 100644 --- a/procmail/delay-delivery +++ b/procmail/delay-delivery @@ -1,12 +1,9 @@ -:0 -* ^X-Mailer: swaks -{ DELAY="30 seconds" } - # create table messages (msgid text unique not null, filename text # primary key not null unique, release_ts integer not null); :0 * DELAY ?? . +* ! DELAYED ?? . { #TODO: for tickling, use header date RELEASE="`date -d \"now + $DELAY\" +'%s %c'`" @@ -29,6 +26,9 @@ ($DATA, '\\'\$DESTFILE\\'', $RELEASE_TS)" TRAP="$TRAP; $DO_QUERY '$Q'" + :0 fw + |$FORMAIL -I "X-Delayed: $RELEASE_TS ($RELEASE_TIME)" + :0 $DELAYED_QUEUE }