X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/fa4ece019ddd60666d6b438c3d27d2e53f6c3d64..a3ee3c50317dcb2aa2b0041ee8c050d35220ff8b:/procmail/record-delayed-mail diff --git a/procmail/record-delayed-mail b/procmail/record-delayed-mail new file mode 100644 index 0000000..e83391b --- /dev/null +++ b/procmail/record-delayed-mail @@ -0,0 +1,18 @@ +# create table messages (msgid text unique not null, filename text +# primary key not null unique, release_ts integer not null); + +DELAYED_QUEUE_DB=$PMVAR/delayed-queue.sqlite + +DO_QUERY="$SQLITE $DELAYED_QUEUE_DB" + +DATA="$MSGID" +INCLUDERC=$PMDIR/sql-escape + +QUERY="insert into messages values + ($DATA, '\\'\$DESTFILE\\'', $RELEASE_TS)" +TRAP="$TRAP; $DO_QUERY '$QUERY'" + +QUERY +DATA +DO_QUERY +DELAYED_QUEUE_DB