X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/8d18b671d3e6e0c871f6cc81cf6ddc58589f35ce..f009268f9dc5e6de771a8011507124bb9ce46355:/bin/release-delayed-messages diff --git a/bin/release-delayed-messages b/bin/release-delayed-messages index fd381d3..61abd85 100755 --- a/bin/release-delayed-messages +++ b/bin/release-delayed-messages @@ -1,12 +1,9 @@ #!/bin/sh set -eu -MAILDIR=$HOME/.maildir +DELAYED_QUEUE=$HOME/.maildir/.delayed -SQLITE=/usr/bin/sqlite3 -DELAYED_QUEUE_DB=$HOME/.var/procmail/delayed-queue.sqlite +DIR="${0%/*}" -QUERY="update messages set release_ts = strftime('%s', 'now') where filename like '.delayed/%'" - -$SQLITE $DELAYED_QUEUE_DB "$QUERY" -exec $HOME/.etc/mailfilter/bin/process-delayed-queue +"$DIR"/list-postponed-messages --all "$DELAYED_QUEUE" \ + | exec xargs "$DIR"/resubmit --list