From c631739aa80cb20a3d42a07c7b3a90fd90d63bff Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Mon, 24 Sep 2018 23:19:06 +0300 Subject: [PATCH] v1.4.16 --- imap.js | 17 +++++++++-------- package.json | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/imap.js b/imap.js index c5ab5f18..52ca6adf 100644 --- a/imap.js +++ b/imap.js @@ -137,14 +137,14 @@ function clearExpiredMessages() { ); // find and delete all messages that are expired // NB! scattered query, searches over all mailboxes and thus over all shards - let cursor = db.database - .collection('messages') - .find({ - exp: true, - rdate: { - $lte: Date.now() - } - }) + let cursor = db.database.collection('messages').find({ + exp: true, + rdate: { + $lte: Date.now() + } + }); + /* + // we need to fetch entire document as we want to push it to the archive .project({ _id: true, mailbox: true, @@ -154,6 +154,7 @@ function clearExpiredMessages() { magic: true, unseen: true }); + */ let deleted = 0; let clear = () => diff --git a/package.json b/package.json index b7d46d8d..4b0fc953 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wildduck", - "version": "1.4.15", + "version": "1.4.16", "description": "IMAP/POP3 server built with Node.js and MongoDB", "main": "server.js", "scripts": {