From 0f0de6528c3269aee890677e9f46f2e1351536f2 Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Thu, 13 Sep 2018 09:12:41 +0300 Subject: [PATCH] v1.4.10 --- lib/api/users.js | 12 ++++++++++++ lib/user-handler.js | 1 + package.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/api/users.js b/lib/api/users.js index a1b800cb..f69c51cb 100644 --- a/lib/api/users.js +++ b/lib/api/users.js @@ -319,6 +319,7 @@ module.exports = (db, server, userHandler) => { * @apiParam {String[]} [tags] A list of tags associated with this user * @apiParam {Boolean} [addTagsToAddress] If true then autogenerated address gets the same tags as the user * @apiParam {Number} [retention] Default retention time in ms. Set to 0 to disable + * @apiParam {Boolean} [uploadSentMessages] If true then all messages sent through MSA are also uploaded to the Sent Mail folder. Might cause duplicates with some email clients, so disabled by default. * @apiParam {Boolean} [encryptMessages] If true then received messages are encrypted * @apiParam {Boolean} [encryptForwarded] If true then forwarded messages are encrypted * @apiParam {String} [pubKey] Public PGP key for the User that is used for encryption. Use empty string to remove the key @@ -473,6 +474,11 @@ module.exports = (db, server, userHandler) => { .falsy(['N', 'false', 'no', 'off', '0', 0, '']) .default(false), + uploadSentMessages: Joi.boolean() + .truthy(['Y', 'true', 'yes', 'on', '1', 1]) + .falsy(['N', 'false', 'no', 'off', '0', 0, '']) + .default(false), + pubKey: Joi.string() .empty('') .trim() @@ -1074,6 +1080,7 @@ module.exports = (db, server, userHandler) => { * @apiParam {Boolean} [allowUnsafe=true] If false then validates provided passwords against Have I Been Pwned API. Experimental, so validation is disabled by default but will be enabled automatically in some future version of WildDuck. * @apiParam {String[]} [tags] A list of tags associated with this user * @apiParam {Number} [retention] Default retention time in ms. Set to 0 to disable + * @apiParam {Boolean} [uploadSentMessages] If true then all messages sent through MSA are also uploaded to the Sent Mail folder. Might cause duplicates with some email clients, so disabled by default. * @apiParam {Boolean} [encryptMessages] If true then received messages are encrypted * @apiParam {Boolean} [encryptForwarded] If true then forwarded messages are encrypted * @apiParam {String} [pubKey] Public PGP key for the User that is used for encryption. Use empty string to remove the key @@ -1165,6 +1172,11 @@ module.exports = (db, server, userHandler) => { .min(0) .max(100), + uploadSentMessages: Joi.boolean() + .truthy(['Y', 'true', 'yes', 'on', '1', 1]) + .falsy(['N', 'false', 'no', 'off', '0', 0, '']) + .default(false), + pubKey: Joi.string() .empty('') .trim() diff --git a/lib/user-handler.js b/lib/user-handler.js index d70d8708..0498fc2d 100644 --- a/lib/user-handler.js +++ b/lib/user-handler.js @@ -1113,6 +1113,7 @@ class UserHandler { // off by default, can be changed later by user through the API autoreply: false, + uploadSentMessages: !!data.uploadSentMessages, pubKey: data.pubKey || '', encryptMessages: !!data.encryptMessages, encryptForwarded: !!data.encryptForwarded, diff --git a/package.json b/package.json index a13a81c1..83896cc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wildduck", - "version": "1.4.9", + "version": "1.4.10", "description": "IMAP/POP3 server built with Node.js and MongoDB", "main": "server.js", "scripts": {