X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/42a5256de2c5182ddcece78d3da54ea91cfbf088..d31cff0854bc8b4ae11fc482aa623fbd5f8728f1:/bin/process-delayed-queue diff --git a/bin/process-delayed-queue b/bin/process-delayed-queue index e978a40..826a346 100755 --- a/bin/process-delayed-queue +++ b/bin/process-delayed-queue @@ -8,7 +8,7 @@ RESUBMIT=$HOME/.etc/mailfilter/bin/resubmit DELAYED_QUEUE_DB=$HOME/.var/procmail/delayed-queue.sqlite -QUERY='select * from messages where release_ts < strftime("%s", "now")' +QUERY='select * from messages where release_ts <= strftime("%s", "now")' $SQLITE -list -separator ' ' $DELAYED_QUEUE_DB "$QUERY" \ | while read msgid basefile ts; do @@ -20,9 +20,9 @@ $SQLITE -list -separator ' ' $DELAYED_QUEUE_DB "$QUERY" \ dirname="${file%/*}" case "${dirname##*/}" in cur) - files="$files ${file}:2,S" + files="$files ${file}:2,S ${file}:2,R ${file}:2,RS" file="${dirname%/cur}/new/$basename" - files="$files $file ${file}:2," + files="$files $file ${file}:2, ${file}:2,R ${file}:2,RS" ;; new) file="${dirname%/new}/cur/$basename"