This commit is contained in:
Andris Reinman 2019-01-18 11:23:31 +02:00
parent 4864685ff2
commit 1116bc0675
4 changed files with 22 additions and 3 deletions

View file

@ -1039,7 +1039,7 @@ module.exports = (db, server, messageHandler, userHandler) => {
* @apiSuccess {Boolean} draft Does this message have a \Draft flag
* @apiSuccess {String[]} html An array of HTML string. Every array element is from a separate mime node, usually you would just join these to a single string
* @apiSuccess {String} text Plaintext content of the message
* @apiSuccess {Object[]} attachments List of attachments for this message
* @apiSuccess {Object[]} [attachments] List of attachments for this message
* @apiSuccess {String} attachments.id Attachment ID
* @apiSuccess {String} attachments.filename Filename of the attachment
* @apiSuccess {String} attachments.contentType MIME type
@ -1047,6 +1047,12 @@ module.exports = (db, server, messageHandler, userHandler) => {
* @apiSuccess {String} attachments.transferEncoding Which transfer encoding was used (actual content when fetching attachments is not encoded)
* @apiSuccess {Boolean} attachments.related Was this attachment found from a multipart/related node. This usually means that this is an embedded image
* @apiSuccess {Number} attachments.sizeKb Approximate size of the attachment in kilobytes
* @apiSuccess {Object} [verificationResults] Security verification info if message was received from MX. If this property is missing then do not automatically assume invalid TLS, SPF or DKIM.
* @apiSuccess {Object} verificationResults.tls TLS information. Value is <code>false</code> if TLS was not used
* @apiSuccess {Object} verificationResults.tls.name Cipher name, eg "ECDHE-RSA-AES128-GCM-SHA256"
* @apiSuccess {Object} verificationResults.tls.version TLS version, eg "TLSv1/SSLv3"
* @apiSuccess {Object} verificationResults.spf Domain name (either MFROM or HELO) of verified SPF or false if no SPF match was found
* @apiSuccess {Object} verificationResults.dkim Domain name of verified DKIM signature or false if no valid signature was found
* @apiSuccess {Object} contentType Parsed Content-Type header. Usually needed to identify encrypted messages and such
* @apiSuccess {String} contentType.value MIME type of the message, eg. "multipart/mixed"
* @apiSuccess {Object} contentType.params An object with Content-Type params as key-value pairs
@ -1219,7 +1225,8 @@ module.exports = (db, server, messageHandler, userHandler) => {
text: true,
textFooter: true,
forwardTargets: true,
meta: true
meta: true,
verificationResults: true
}
}
);
@ -1362,6 +1369,10 @@ module.exports = (db, server, messageHandler, userHandler) => {
metaData: messageData.meta.custom || '{}'
};
if (messageData.verificationResults) {
response.verificationResults = messageData.verificationResults;
}
if (messageData.meta.reference) {
response.reference = messageData.meta.reference;
}

View file

@ -536,6 +536,10 @@ class FilterHandler {
flags
};
if (options.verificationResults) {
messageOpts.verificationResults = options.verificationResults;
}
if (outbound && outbound.length) {
messageOpts.outbound = [].concat(outbound || []);
}

View file

@ -190,6 +190,10 @@ class MessageHandler {
copied: false
};
if (options.verificationResults) {
messageData.verificationResults = options.verificationResults;
}
if (options.outbound) {
messageData.outbound = [].concat(options.outbound || []);
}

View file

@ -1,6 +1,6 @@
{
"name": "wildduck",
"version": "1.13.0",
"version": "1.13.1",
"description": "IMAP/POP3 server built with Node.js and MongoDB",
"main": "server.js",
"scripts": {