This commit is contained in:
Andris Reinman 2018-09-24 23:19:06 +03:00
parent 915800e5f9
commit c631739aa8
2 changed files with 10 additions and 9 deletions

17
imap.js
View file

@ -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 = () =>

View file

@ -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": {