From 143aa93c2249cd1f26de16ad3b0d467c11292969 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Tue, 21 May 2019 13:08:34 -0700 Subject: [PATCH 1/3] conn: remove TLS version from header conn: suppress verify message when =FAIL (it is misleading) --- connection.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/connection.js b/connection.js index f593f92ef..c71b3c108 100644 --- a/connection.js +++ b/connection.js @@ -1448,16 +1448,13 @@ class Connection { let sslheader; if (this.get('tls.cipher.version')) { - sslheader = `(version=${this.tls.cipher.version} cipher=${this.tls.cipher.name} verify=`; + sslheader = `(cipher=${this.tls.cipher.name}`; if (this.tls.verified) { - sslheader += 'OK)'; + sslheader += ' verify=OK)'; } else { if (this.tls.verifyError && this.tls.verifyError.code === 'UNABLE_TO_GET_ISSUER_CERT') { - sslheader += 'NO)'; - } - else { - sslheader += 'FAIL)'; + sslheader += ' verify=NO)'; } } } From 4a8bc9e1ffb99cb424b390bacca39e8b6d45e884 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Tue, 21 May 2019 13:09:21 -0700 Subject: [PATCH 2/3] ws: clean up a few log messages --- logger.js | 2 +- outbound/hmail.js | 2 +- plugins/queue/discard.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/logger.js b/logger.js index db2cac28f..a6c532180 100644 --- a/logger.js +++ b/logger.js @@ -51,7 +51,7 @@ logger.levels = { for (const le in logger.levels) { logger.levels[`LOG${le}`] = logger.levels[le]; - logger['LOG' + le] = logger.levels[le]; + logger[`LOG${le}`] = logger.levels[le]; } logger.formats = { diff --git a/outbound/hmail.js b/outbound/hmail.js index c1c6069e1..8097eda10 100644 --- a/outbound/hmail.js +++ b/outbound/hmail.js @@ -295,7 +295,7 @@ class HMailItem extends events.EventEmitter { // check if there are any MXs left if (this.mxlist.length === 0) { this.todo.rcpt_to.forEach(rcpt => { - self.extend_rcpt_with_dsn(rcpt, DSN.addr_bad_dest_system(`Tried all MXs${self.todo.domain}`)); + self.extend_rcpt_with_dsn(rcpt, DSN.addr_bad_dest_system(`Tried all MXs ${self.todo.domain}`)); }); return this.temp_fail("Tried all MXs"); } diff --git a/plugins/queue/discard.js b/plugins/queue/discard.js index 11e7dbeee..fe8664ec3 100644 --- a/plugins/queue/discard.js +++ b/plugins/queue/discard.js @@ -13,7 +13,7 @@ exports.discard = (next, connection) => { if (q_wants && q_wants !== 'discard') return next(); function discard () { - connection.loginfo(this, 'discarding message'); + connection.loginfo('discarding message'); // Pretend we delivered the message return next(OK); } From 894adba3eeb3aeef58ddc67642a6ceb40f5c9fc7 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Tue, 21 May 2019 13:12:21 -0700 Subject: [PATCH 3/3] add missing ) --- connection.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/connection.js b/connection.js index c71b3c108..8a2a8e957 100644 --- a/connection.js +++ b/connection.js @@ -1456,6 +1456,9 @@ class Connection { if (this.tls.verifyError && this.tls.verifyError.code === 'UNABLE_TO_GET_ISSUER_CERT') { sslheader += ' verify=NO)'; } + else { + sslheader += ')'; + } } }