From 9928f5809745d346abc93ae0ea55aa3e188df4ec Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Wed, 27 Dec 2017 13:59:51 +0200 Subject: [PATCH] v1.0.98 --- lib/maildropper.js | 27 +++++++++++++++------------ package.json | 2 +- setup/install.sh | 2 ++ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/lib/maildropper.js b/lib/maildropper.js index 86f78c70..b141ec0f 100644 --- a/lib/maildropper.js +++ b/lib/maildropper.js @@ -67,19 +67,22 @@ class Maildropper { break; case 'relay': - (Array.isArray(options.to) ? options.to : [].concat(options.to || [])).forEach(to => { - let relayData = target.value; - if (typeof relayData === 'string') { - relayData = tools.getRelayData(relayData); - } - deliveries.push({ - to, - mx: relayData.mx, - mxPort: relayData.mxPort, - mxAuth: relayData.mxAuth, - mxSecure: relayData.mxSecure + [] + .concat(options.to || []) + .concat(target.recipient || []) + .forEach(to => { + let relayData = target.value; + if (typeof relayData === 'string') { + relayData = tools.getRelayData(relayData); + } + deliveries.push({ + to, + mx: relayData.mx, + mxPort: relayData.mxPort, + mxAuth: relayData.mxAuth, + mxSecure: relayData.mxSecure + }); }); - }); break; case 'http': diff --git a/package.json b/package.json index d6b6bdea..33a3e90a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wildduck", - "version": "1.0.97", + "version": "1.0.98", "description": "IMAP server built with Node.js and MongoDB", "main": "server.js", "scripts": { diff --git a/setup/install.sh b/setup/install.sh index c7be38a8..f579e9db 100755 --- a/setup/install.sh +++ b/setup/install.sh @@ -327,6 +327,8 @@ npm install --unsafe-perm --production chown -R deploy:deploy /var/opt/zone-mta.git chown -R deploy:deploy /opt/zone-mta +# DKIM key must be readable to wildduck process +chown wildduck:wildduck /opt/zone-mta/keys/wildduck.email-dkim.pem echo '[Unit] Description=Zone Mail Transport Agent