ensure origin in hook request

This commit is contained in:
Andris Reinman 2022-12-15 10:55:53 +02:00
parent 2ebcf9d2e0
commit 831514145a
No known key found for this signature in database
GPG key ID: DC6C83F4D584D364
3 changed files with 12 additions and 14 deletions

View file

@ -3039,7 +3039,7 @@ module.exports = (db, server, messageHandler, userHandler, storageHandler, setti
from: envelope.from,
to: envelope.to,
sendTime,
origin: options.ip,
origin: options.origin || options.ip,
runPlugins: true
},
(err, ...args) => {

View file

@ -113,9 +113,7 @@ class Maildropper {
envelope.reason = options.reason;
}
if (options.origin) {
envelope.origin = options.origin;
}
envelope.origin = options.origin || '127.0.0.1';
let messageInfo = {
'message-id': '<>',

View file

@ -1,6 +1,6 @@
{
"name": "wildduck",
"version": "1.38.0",
"version": "1.38.1",
"description": "IMAP/POP3 server built with Node.js and MongoDB",
"main": "server.js",
"scripts": {
@ -31,15 +31,15 @@
"eslint-config-prettier": "8.5.0",
"grunt": "1.5.3",
"grunt-cli": "1.4.3",
"grunt-eslint": "24.0.0",
"grunt-eslint": "24.0.1",
"grunt-mocha-test": "0.13.3",
"grunt-shell-spawn": "0.4.0",
"grunt-wait": "0.3.0",
"imapflow": "1.0.116",
"mailparser": "3.5.0",
"mocha": "10.1.0",
"imapflow": "1.0.117",
"mailparser": "3.6.2",
"mocha": "10.2.0",
"request": "2.88.2",
"supertest": "6.3.2"
"supertest": "6.3.3"
},
"dependencies": {
"@andris/restify-cors-middleware2": "2.1.2-patch.3",
@ -49,7 +49,7 @@
"@root/acme": "3.1.0",
"@root/csr": "0.8.1",
"accesscontrol": "2.2.1",
"axios": "1.2.0",
"axios": "1.2.1",
"base32.js": "0.1.0",
"bcryptjs": "2.4.3",
"bson": "4.7.0",
@ -59,7 +59,7 @@
"generate-password": "1.7.0",
"hash-wasm": "4.9.0",
"he": "1.2.0",
"html-to-text": "9.0.0",
"html-to-text": "9.0.3",
"humanname": "0.2.2",
"iconv-lite": "0.6.3",
"ioredfour": "1.2.0-ioredis-06",
@ -70,10 +70,10 @@
"js-yaml": "4.1.0",
"key-fingerprint": "1.1.0",
"libbase64": "1.2.1",
"libmime": "5.1.0",
"libmime": "5.2.0",
"libqp": "2.0.1",
"mailauth": "4.0.2",
"mailsplit": "5.3.2",
"mailsplit": "5.4.0",
"mobileconfig": "2.4.0",
"mongo-cursor-pagination": "8.1.2",
"mongodb": "4.12.1",