diff --git a/app/models/emails.js b/app/models/emails.js index 0a9b195b84..3018df7a90 100644 --- a/app/models/emails.js +++ b/app/models/emails.js @@ -2,6 +2,7 @@ const punycode = require('node:punycode'); const { Buffer } = require('node:buffer'); const { isIP } = require('node:net'); +const Axe = require('axe'); const Boom = require('@hapi/boom'); const SpamScanner = require('spamscanner'); const _ = require('lodash'); @@ -51,11 +52,11 @@ const BYTES_15MB = bytes('15MB'); const transporter = nodemailer.createTransport({ streamTransport: true, buffer: true, - logger: true + logger: new Axe({ + silent: true + }) }); -transporter.logger = logger; - const scanner = new SpamScanner({ logger, clamscan: env.NODE_ENV === 'test' diff --git a/helpers/get-transporter.js b/helpers/get-transporter.js index 6ba72dded2..ac8bef9e85 100644 --- a/helpers/get-transporter.js +++ b/helpers/get-transporter.js @@ -2,6 +2,7 @@ const { callbackify } = require('node:util'); const { isIP } = require('node:net'); const punycode = require('node:punycode'); +const Axe = require('axe'); const _ = require('lodash'); const isFQDN = require('is-fqdn'); const isSANB = require('is-string-and-not-blank'); @@ -207,7 +208,7 @@ async function getTransporter(connectionMap = new Map(), options = {}, err) { : {}), secure: false, secured: false, - logger: true, // NOTE: we remap this to our own logger below + logger: new Axe({ silent: true }), host: mx.host, port: mx.port, connection: mx.socket, @@ -218,9 +219,6 @@ async function getTransporter(connectionMap = new Map(), options = {}, err) { tls }); - // remap because shared logger does not use logger properly - transporter.logger = logger; - const pool = { truthSource, mx,