diff --git a/.prettierrc.js b/.prettierrc.js index 566518a..3f83654 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,5 +1,8 @@ module.exports = { printWidth: 160, tabWidth: 4, - singleQuote: true + singleQuote: true, + endOfLine: 'lf', + trailingComma: 'none', + arrowParens: 'avoid' }; diff --git a/config.example.toml b/config.example.toml index f2c4ce4..7b456ac 100644 --- a/config.example.toml +++ b/config.example.toml @@ -1,69 +1,111 @@ # plugins/wildduck.toml ["modules/zonemta-wildduck"] -enabled=["receiver", "main", "sender"] +enabled = ["receiver", "main", "sender"] # to which SMTP interfaces this plugin applies to. Use "*" for all interfaces -interfaces=["feeder"] +interfaces = ["feeder"] # optional hostname to be used in headers # defaults to os.hostname() -hostname="example.com" +hostname = "example.com" # How long to keep auth records in log # NB! removed, use const:authlog:time setting instead #authlogExpireDays=30 -disableUploads=false # if true then messages are not uploaded to Sent Mail folder -uploadAll=false # if false then messages from Outlook are not uploaded to Sent Mail folder +disableUploads = false # if true then messages are not uploaded to Sent Mail folder +uploadAll = false # if false then messages from Outlook are not uploaded to Sent Mail folder # SRS settings for forwarded emails # --------------------------------- ["modules/zonemta-wildduck".srs] - # Handle rewriting of forwarded emails. If false then SRS is not used - # Only affect messages that have interface set to "forwarder" - enabled=true +# Handle rewriting of forwarded emails. If false then SRS is not used +# Only affect messages that have interface set to "forwarder" +enabled = true - # SRS secret value. Must be the same as in the MX side - secret="secret value" +# SRS secret value. Must be the same as in the MX side +secret = "secret value" - # SRS domain, must resolve back to MX - rewriteDomain="example.com" +# SRS domain, must resolve back to MX +rewriteDomain = "example.com" # DKIM Settings # ------------- ["modules/zonemta-wildduck".dkim] - # If true then also adds a signature for the outbound domain - signTransportDomain=false +# If true then also adds a signature for the outbound domain +signTransportDomain = false - # If set then decrypt encrypted DKIM keys using this password - #secret="a secret cat" +# If set then decrypt encrypted DKIM keys using this password +#secret="a secret cat" - # Cipher to use to decrypt encrypted DKIM keys (legacy keys only) - #cipher="aes192" +# Cipher to use to decrypt encrypted DKIM keys (legacy keys only) +#cipher="aes192" +# Logging Settings +# ------------- ["modules/zonemta-wildduck".gelf] - enabled=false - component="mta" - - ["modules/zonemta-wildduck".gelf.options] - graylogPort=12201 - graylogHostname='127.0.0.1' - connection='lan' +enabled = false +component = "mta" -["modules/zonemta-wildduck".certs] - # Configuration for centralised TLS certification handling +["modules/zonemta-wildduck".gelf.options] +graylogPort = 12201 +graylogHostname = '127.0.0.1' +connection = 'lan' - # If set then decrypt encrypted TLS keys using this password - #secret="a secret cat" +# Certificate Settings +# ------------- - # Cipher to use to decrypt encrypted TLS keys (legacy keys only) - #cipher="aes192" - ["modules/zonemta-wildduck".certs.tlsOptions] - # options from https://nodejs.org/dist/latest-v16.x/docs/api/tls.html#tls_tls_createsecurecontext_options - minVersion = "TLSv1" +["modules/zonemta-wildduck".certs] +# Configuration for centralised TLS certification handling + +# If set then decrypt encrypted TLS keys using this password +#secret="a secret cat" + +# Cipher to use to decrypt encrypted TLS keys (legacy keys only) +#cipher="aes192" +["modules/zonemta-wildduck".certs.tlsOptions] +# options from https://nodejs.org/dist/latest-v16.x/docs/api/tls.html#tls_tls_createsecurecontext_options +minVersion = "TLSv1" + +# Autogenerated SNI certificates +# ------------------------------ + +["modules/zonemta-wildduck".acme] +# ACME configuration for generating TLS certificates with Let's Encrypt +# Only relevant if acme.autogenerate.enabled is `true`, otherwise no certificates are generated using this module + +# ACME production settings +# Must match with ACME settings in WildDuck +key = "production" +directoryUrl = "https://acme-v02.api.letsencrypt.org/directory" +email = "domainadmin@example.com" + +# If hostname has a CAA record set then match it against this list +# CAA check is done before WildDuck tries to request certificate from ACME +caaDomains = ["letsencrypt.org"] + +# Private key settings, if WildDuck has to generate a key by itself +keyBits = 2048 +keyExponent = 65537 + +["modules/zonemta-wildduck".acme.autogenerate] +# If enabled then automatically generates TLS certificates based on SNI servernames +enabled = false + +["modules/zonemta-wildduck".acme.autogenerate.cnameMapping] +# Sudomain CNAME mapping +# "abc" = ["def.com"] means that if the SNI servername domain is "abc.{domain}" +# then there must be a CNAME record for this domain that points to "def.com". +# If multiple CNAME targets are defined (eg ["def.com", "bef.com"], then at least 1 must match. +# Additionally, there must be at least 1 email account with "@{domain}" address. +# If there is no match, then TLS certificate is not generated. + +#imap = ["imap.example.com"] +#smtp = ["smtp.example.com"] +#pop3 = ["imap.example.com"] #["modules/zonemta-wildduck".mxRoutes] # "*.l.google.com" = "gmail" diff --git a/index.js b/index.js index 9c1c4d2..bc0612e 100644 --- a/index.js +++ b/index.js @@ -35,18 +35,18 @@ module.exports.init = function (app, done) { ? new Gelf(app.config.gelf.options) : { // placeholder - emit: (ev, entry) => app.logger.info('GELF', JSON.stringify(entry)), + emit: (ev, entry) => app.logger.info('GELF', JSON.stringify(entry)) }; wdErrors.setGelf(gelf); - const loggelf = (message) => { + const loggelf = message => { if (!message) { return false; } if (typeof message === 'string') { message = { - short_message: message, + short_message: message }; } message = message || {}; @@ -59,7 +59,7 @@ module.exports.init = function (app, done) { message.host = hostname; message.timestamp = Date.now() / 1000; message._component = (app.config.gelf && app.config.gelf.component) || 'mta'; - Object.keys(message).forEach((key) => { + Object.keys(message).forEach(key => { if (!message[key]) { delete message[key]; } @@ -71,7 +71,7 @@ module.exports.init = function (app, done) { cipher: app.config.dkim && app.config.dkim.cipher, secret: app.config.dkim && app.config.dkim.secret, database, - loggelf: (message) => loggelf(message), + loggelf: message => loggelf(message) }); const certHandler = new CertHandler({ @@ -79,16 +79,19 @@ module.exports.init = function (app, done) { secret: app.config.certs && app.config.certs.secret, database, redis: redisClient, + users: usersdb, + acmeConfig: app.config.acme, + loggelf: message => loggelf(message) }); const settingsHandler = new SettingsHandler({ - db: database, + db: database }); const ttlcounter = counters(redisClient).ttlcounter; const srsRewriter = new SRS({ - secret: (app.config.srs && app.config.srs.secret) || '?', + secret: (app.config.srs && app.config.srs.secret) || '?' }); const messageHandler = new MessageHandler({ @@ -98,9 +101,9 @@ module.exports.init = function (app, done) { gridfs: gridfsdb, attachments: app.config.attachments || { type: 'gridstore', - bucket: 'attachments', + bucket: 'attachments' }, - loggelf: (message) => loggelf(message), + loggelf: message => loggelf(message) }); const userHandler = new UserHandler({ @@ -108,7 +111,7 @@ module.exports.init = function (app, done) { redis: redisClient, gridfs: gridfsdb, users: usersdb, - loggelf: (message) => loggelf(message), + loggelf: message => loggelf(message) }); const auditHandler = new AuditHandler({ @@ -116,7 +119,7 @@ module.exports.init = function (app, done) { gridfs: gridfsdb, users: usersdb, bucket: 'audit', - loggelf: (message) => loggelf(message), + loggelf: message => loggelf(message) }); const encryptMessage = util.promisify(messageHandler.encryptMessage.bind(messageHandler)); @@ -140,18 +143,18 @@ module.exports.init = function (app, done) { reject(error); }, time); promise - .then((result) => { + .then(result => { clearTimeout(timer); resolve(result); }) - .catch((err) => { + .catch(err => { clearTimeout(timer); reject(err); }); }); const mxCache = new Map(); - const resolveMx = async (domain) => { + const resolveMx = async domain => { if (mxCache.has(domain)) { let cached = mxCache.get(domain); if (cached.error && cached.updated >= Date.now() - 60 * 60 * 1000) { @@ -202,7 +205,7 @@ module.exports.init = function (app, done) { const interfaces = [].concat(app.config.interfaces || '*'); const allInterfaces = interfaces.includes('*'); - app.addHook('smtp:init', async (server) => { + app.addHook('smtp:init', async server => { let maxRcptTo = await settingsHandler.get('const:max:rcpt_to'); if (maxRcptTo) { server.options.maxRecipients = maxRcptTo; @@ -237,7 +240,7 @@ module.exports.init = function (app, done) { _xclient: 'yes', _session_id: session.id, - _ip: session.remoteAddress, + _ip: session.remoteAddress }); return next(err); @@ -266,7 +269,7 @@ module.exports.init = function (app, done) { 'smtp', { protocol: 'SMTP', - ip: session.remoteAddress, + ip: session.remoteAddress }, (err, result) => { if (err) { @@ -290,7 +293,7 @@ module.exports.init = function (app, done) { _require_asp: result ? 'yes' : '', _session_id: session.id, - _ip: session.remoteAddress, + _ip: session.remoteAddress }); return next(err); @@ -317,7 +320,7 @@ module.exports.init = function (app, done) { _scope: result.scope, _session_id: session.id, - _ip: session.remoteAddress, + _ip: session.remoteAddress }); auth.username = result.username !== username ? result.username + '[' + username + ']' : result.username; @@ -337,17 +340,17 @@ module.exports.init = function (app, done) { servername, Object.assign({}, (app.config.certs && app.config.certs.tlsOptions) || {}), { - source: 'smtp', + source: 'smtp' }, { - loggelf: (message) => loggelf(message), + loggelf: message => loggelf(message) } ) - .then((ctx) => { + .then(ctx => { data.secureContext = ctx; next(null); }) - .catch((err) => next(err)); + .catch(err => next(err)); }); // Check if an user is allowed to use specific address, if not then override using the default @@ -394,14 +397,14 @@ module.exports.init = function (app, done) { if (userData.fromWhitelist && userData.fromWhitelist.length) { let nAddr = tools.normalizeAddress(address, false, { removeLabel: true, - removeDots: true, + removeDots: true }); if ( - userData.fromWhitelist.some((addr) => { + userData.fromWhitelist.some(addr => { addr = tools.normalizeAddress(addr, false, { removeLabel: true, - removeDots: true, + removeDots: true }); if (addr === nAddr) { @@ -427,7 +430,7 @@ module.exports.init = function (app, done) { return done(null, { address, - addrview: normalizedAddress, + addrview: normalizedAddress }); } } @@ -450,7 +453,7 @@ module.exports.init = function (app, done) { } if (addressData.targets) { - if (addressData.targets.find((target) => target.user && target.user.toString() === userData._id.toString())) { + if (addressData.targets.find(target => target.user && target.user.toString() === userData._id.toString())) { return done(null, addressData); } else { return done(null, false); @@ -471,7 +474,7 @@ module.exports.init = function (app, done) { _mail_action: 'rw_envelope_from', _queue_id: envelope.id, _envelope_from: envelope.from, - _rewrite_from: userData.address, + _rewrite_from: userData.address }); // replace MAIL FROM address @@ -516,7 +519,7 @@ module.exports.init = function (app, done) { _header_from: tools.normalizeAddress(headerFromObj.address), _header_from_value: headerFrom, _header_from_name: headerFromName, - _rewrite_from: envelope.from, + _rewrite_from: envelope.from }); app.logger.info( @@ -661,7 +664,7 @@ module.exports.init = function (app, done) { _queue_id: session.envelopeId, _limit_sent: sent, _limit_allowed: userData.recipients, - _sess: session.id, + _sess: session.id }); app.logger.info( @@ -689,7 +692,7 @@ module.exports.init = function (app, done) { _queue_id: session.envelopeId, _limit_sent: sent, _limit_allowed: userData.recipients, - _sess: session.id, + _sess: session.id }); app.logger.info('Sender', '%s RCPTACCEPT accepted %s sent=%s allowed=%s', session.envelopeId, address.address, sent, userData.recipients); @@ -721,7 +724,7 @@ module.exports.init = function (app, done) { } let now = new Date(); - audits = audits.filter((auditData) => { + audits = audits.filter(auditData => { if (auditData.start && auditData.start > now) { return false; } @@ -749,7 +752,7 @@ module.exports.init = function (app, done) { let chunks = [ Buffer.from('Return-Path: ' + envelope.from + '\r\n' + generateReceivedHeader(envelope, hostname) + '\r\n'), - envelope.headers.build(), + envelope.headers.build() ]; let chunklen = chunks[0].length + chunks[1].length; @@ -761,7 +764,7 @@ module.exports.init = function (app, done) { chunklen += chunk.length; } }); - body.once('error', (err) => next(err)); + body.once('error', err => next(err)); body.once('end', () => { // Next we try to upload the message to Sent Mail folder // It doesn't really matter if it succeeds or not so we are not waiting until it's done @@ -801,7 +804,7 @@ module.exports.init = function (app, done) { originhost: envelope.originhost, transhost: envelope.transhost, transtype: envelope.transtype, - time: new Date(), + time: new Date() }, date: false, @@ -809,7 +812,7 @@ module.exports.init = function (app, done) { raw: messageSource, // if similar message exists, then skip - skipExisting: true, + skipExisting: true }); if (data) { app.logger.info('Rewrite', '%s MSAUPLSUCC user=%s uid=%s', envelope.id, envelope.user, data.uid); @@ -823,11 +826,11 @@ module.exports.init = function (app, done) { let processAudits = async () => { const messageData = await prepareMessage({ - raw, + raw }); if (messageData.attachments && messageData.attachments.length) { - messageData.ha = messageData.attachments.some((a) => !a.related); + messageData.ha = messageData.attachments.some(a => !a.related); } else { messageData.ha = false; } @@ -847,8 +850,8 @@ module.exports.init = function (app, done) { originhost: envelope.originhost, transhost: envelope.transhost, transtype: envelope.transtype, - time: new Date(), - }, + time: new Date() + } }); app.logger.verbose( 'Rewrite', @@ -864,11 +867,11 @@ module.exports.init = function (app, done) { if (addToSent) { // addMessage also calls audit methods - storeSentMessage().catch((err) => + storeSentMessage().catch(err => app.logger.error('Rewrite', '%s MSAUPLFAIL user=%s error=%s', envelope.id, envelope.user, err.message) ); } else { - processAudits().catch((err) => + processAudits().catch(err => app.logger.error('Rewrite', '%s MSAUPLFAIL user=%s error=%s', envelope.id, envelope.user, err.message) ); } @@ -922,7 +925,7 @@ module.exports.init = function (app, done) { let from = (delivery.envelope.from || (delivery.parsedEnvelope && delivery.parsedEnvelope.from) || '').toString(); let fromDomain = from.substr(from.lastIndexOf('@') + 1); - let getKey = async (domain) => { + let getKey = async domain => { let keyData; try { keyData = await dkimHandler.get({ domain }, true); @@ -951,31 +954,31 @@ module.exports.init = function (app, done) { }; getKey(fromDomain) - .then((keyData) => { + .then(keyData => { if (keyData) { delivery.dkim.keys.push({ domainName: tools.normalizeDomain(fromDomain), keySelector: keyData.selector, - privateKey: keyData.privateKey, + privateKey: keyData.privateKey }); } - if (!app.config.signTransportDomain || delivery.dkim.keys.find((key) => key.domainName === delivery.zoneAddress.name)) { + if (!app.config.signTransportDomain || delivery.dkim.keys.find(key => key.domainName === delivery.zoneAddress.name)) { return next(); } getKey(delivery.zoneAddress.name) - .then((keyData) => { + .then(keyData => { if (keyData) { delivery.dkim.keys.push({ domainName: tools.normalizeDomain(delivery.zoneAddress.name), keySelector: keyData.selector, - privateKey: keyData.privateKey, + privateKey: keyData.privateKey }); } next(); }) - .catch((err) => { + .catch(err => { app.logger.error( 'DKIM', '%s.%s DBFAIL Failed loading DKIM key "%s". %s', @@ -987,7 +990,7 @@ module.exports.init = function (app, done) { next(); }); }) - .catch((err) => { + .catch(err => { app.logger.error('DKIM', '%s.%s DBFAIL Failed loading DKIM key "%s". %s', delivery.id, delivery.seq, fromDomain, err.message); next(); }); @@ -1002,7 +1005,7 @@ module.exports.init = function (app, done) { let message = { _queue_id: (entry.id || '').toString(), - _queue_id_seq: (entry.seq || '').toString(), + _queue_id_seq: (entry.seq || '').toString() }; if (entry.rwRcptFrom) { @@ -1053,7 +1056,7 @@ module.exports.init = function (app, done) { let updateAudited = (status, info) => { auditHandler .updateDeliveryStatus(entry.id, entry.seq, status, info) - .catch((err) => app.logger.error('Rewrite', '%s.%s LOGERR %s', entry.id, entry.seq, err.message)); + .catch(err => app.logger.error('Rewrite', '%s.%s LOGERR %s', entry.id, entry.seq, err.message)); }; switch (entry.action) { @@ -1097,7 +1100,7 @@ module.exports.init = function (app, done) { to: (entry.to || '').toString(), response: entry.response, mx: entry.mx, - local_ip: entry.ip, + local_ip: entry.ip }); break; @@ -1123,7 +1126,7 @@ module.exports.init = function (app, done) { to: (entry.to || '').toString(), response: entry.response, mx: entry.mx, - local_ip: entry.ip, + local_ip: entry.ip }); break; @@ -1149,7 +1152,7 @@ module.exports.init = function (app, done) { to: (entry.to || '').toString(), response: entry.response, mx: entry.mx, - local_ip: entry.ip, + local_ip: entry.ip }); break; @@ -1245,12 +1248,12 @@ module.exports.init = function (app, done) { return next(); }); - app.addHook('sender:responseError', async (delivery) => { + app.addHook('sender:responseError', async delivery => { let deferTimesStr = await settingsHandler.get('const:sender:defer_times'); if (deferTimesStr) { const deferTimes = deferTimesStr .split(',') - .map((v) => { + .map(v => { let m = v.match(/\s*(\d+)\s*([^\d\s]+)?\s*/); if (!m) { return false; @@ -1282,7 +1285,7 @@ module.exports.init = function (app, done) { return n; } }) - .filter((v) => v); + .filter(v => v); if (deferTimes && deferTimes.length) { delivery.deferTimes = deferTimes; } @@ -1306,7 +1309,7 @@ module.exports.init = function (app, done) { if (envelope.user) { query = { - username: envelope.user.split('[').shift(), + username: envelope.user.split('[').shift() }; } @@ -1331,8 +1334,8 @@ module.exports.init = function (app, done) { uploadSentMessages: true, disabled: true, suspended: true, - fromWhitelist: true, - }, + fromWhitelist: true + } }, (err, userData) => { if (err) { @@ -1355,14 +1358,14 @@ module.exports.init = function (app, done) { settingsHandler .get('const:max:recipients') - .then((maxRecipients) => { + .then(maxRecipients => { userData.recipients = Number(userData.recipients) || app.config.maxRecipients || maxRecipients; users.set(envelope, userData); return callback(null, userData); }) - .catch((err) => callback(err)); + .catch(err => callback(err)); } ); } diff --git a/package-lock.json b/package-lock.json index 335bde0..a0b80e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "nodemailer": "6.9.13", "punycode.js": "2.3.1", "srs.js": "0.1.0", - "wildduck": "1.42.6" + "wildduck": "1.43.2" }, "devDependencies": { "eslint": "8.57.0", @@ -26,15 +26,6 @@ "grunt-eslint": "24.3.0" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@aws-crypto/ie11-detection": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", @@ -122,16 +113,15 @@ "optional": true }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.556.0.tgz", - "integrity": "sha512-HWd7PyXCuY1Z9KBaufbzpIvS2QeUAak5wfYwylW2DrEvt6A4tjWCBSbbSXNoawqCv/HitA39v953N/1PojJVVQ==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.564.0.tgz", + "integrity": "sha512-AJGd0RXAyycNqb8RBySVkIrzNOd8JzI4sVVC/7pA41t4EeUGM6b2tcsOlt1eVqcNxR1hvn2ZbwnNI8e3OlEnhQ==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.556.0", "@aws-sdk/core": "3.556.0", - "@aws-sdk/credential-provider-node": "3.556.0", + "@aws-sdk/credential-provider-node": "3.564.0", "@aws-sdk/middleware-host-header": "3.535.0", "@aws-sdk/middleware-logger": "3.535.0", "@aws-sdk/middleware-recursion-detection": "3.535.0", @@ -222,14 +212,13 @@ } }, "node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.556.0.tgz", - "integrity": "sha512-AXKd2TB6nNrksu+OfmHl8uI07PdgzOo4o8AxoRO8SHlwoMAGvcT9optDGVSYoVfgOKTymCoE7h8/UoUfPc11wQ==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.564.0.tgz", + "integrity": "sha512-LWBXiwA0qlGhpJx3fbFQagVEyVPoecGtJh3+5hoc+CTVnT00J7T0jLe3kgemvEI9kjhIyDW+MFkq1jCttrGNJw==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.556.0", "@aws-sdk/core": "3.556.0", "@aws-sdk/middleware-host-header": "3.535.0", "@aws-sdk/middleware-logger": "3.535.0", @@ -271,7 +260,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "@aws-sdk/credential-provider-node": "^3.556.0" + "@aws-sdk/credential-provider-node": "^3.564.0" } }, "node_modules/@aws-sdk/client-sts": { @@ -367,12 +356,12 @@ } }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.556.0.tgz", - "integrity": "sha512-PKYBjfpLHJZhrIv0M9eJ47yeDaV8NUMVe4vsiHG5tvlvwWGP84k9GJlr51U/s84OzIyXzVpiqP8PU5yKovUFIg==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.564.0.tgz", + "integrity": "sha512-rjpj+VR9NbF9hg2H0gfuhbQL+6WlRVEBBxI8rweSsSm5r5exENqP+xmEdL6mmFCyM/EjDQswNs0td2tVSc/onw==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.556.0", + "@aws-sdk/client-cognito-identity": "3.564.0", "@aws-sdk/types": "3.535.0", "@smithy/property-provider": "^2.2.0", "@smithy/types": "^2.12.0", @@ -418,15 +407,15 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.556.0.tgz", - "integrity": "sha512-0Nz4ErOlXhe3muxWYMbPwRMgfKmVbBp36BAE2uv/z5wTbfdBkcgUwaflEvlKCLUTdHzuZsQk+BFS/gVyaUeOuA==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.564.0.tgz", + "integrity": "sha512-kiEfBoKRcbX7I/rjhVGJrTUQ0895ANhPu6KE1GRZW7wc1gIGgKGJ+0tvAqRtQjYX0U9pivEDb0dh16OF9PBFFw==", "optional": true, "dependencies": { "@aws-sdk/client-sts": "3.556.0", "@aws-sdk/credential-provider-env": "3.535.0", "@aws-sdk/credential-provider-process": "3.535.0", - "@aws-sdk/credential-provider-sso": "3.556.0", + "@aws-sdk/credential-provider-sso": "3.564.0", "@aws-sdk/credential-provider-web-identity": "3.556.0", "@aws-sdk/types": "3.535.0", "@smithy/credential-provider-imds": "^2.3.0", @@ -440,16 +429,16 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.556.0.tgz", - "integrity": "sha512-s1xVtKjyGc60O8qcNIzS1X3H+pWEwEfZ7TgNznVDNyuXvLrlNWiAcigPWGl2aAkc8tGcsSG0Qpyw2KYC939LFg==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.564.0.tgz", + "integrity": "sha512-HXD5ZCXzfcd6cJ/pW8frh8DuYlKaCd/JKmwzuCRUxgxZwbLEeNmyRYvF+D7osETJJZ4VIwgVbpEw1yLqRz1onw==", "optional": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.535.0", "@aws-sdk/credential-provider-http": "3.552.0", - "@aws-sdk/credential-provider-ini": "3.556.0", + "@aws-sdk/credential-provider-ini": "3.564.0", "@aws-sdk/credential-provider-process": "3.535.0", - "@aws-sdk/credential-provider-sso": "3.556.0", + "@aws-sdk/credential-provider-sso": "3.564.0", "@aws-sdk/credential-provider-web-identity": "3.556.0", "@aws-sdk/types": "3.535.0", "@smithy/credential-provider-imds": "^2.3.0", @@ -479,13 +468,13 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.556.0.tgz", - "integrity": "sha512-ETuBgcnpfxqadEAqhQFWpKoV1C/NAgvs5CbBc5EJbelJ8f4prTdErIHjrRtVT8c02MXj92QwczsiNYd5IoOqyw==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.564.0.tgz", + "integrity": "sha512-Wv0NV8tDwtydEpsp/kVZ22Z+40bsSBDYgYZ1Uxx+KR8a1PvT6B5FnEtccWTJ371sQG/uqLum7dXSbJq1Qqze1w==", "optional": true, "dependencies": { "@aws-sdk/client-sso": "3.556.0", - "@aws-sdk/token-providers": "3.556.0", + "@aws-sdk/token-providers": "3.564.0", "@aws-sdk/types": "3.535.0", "@smithy/property-provider": "^2.2.0", "@smithy/shared-ini-file-loader": "^2.4.0", @@ -513,21 +502,21 @@ } }, "node_modules/@aws-sdk/credential-providers": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.556.0.tgz", - "integrity": "sha512-CnWP/AEF+sPeO8fabrHy4Oeo52xDFuDQMpjKcI7oJzGF6Ne2ZPTq6wTJQPLeXeg4OzLcK0tT3G4z/27MLdsLsw==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.564.0.tgz", + "integrity": "sha512-QQrVTPuRRK37IEtCqzGpStfvr5fZMqxlCQFNJ6mDpHOkL1oyrYIrBpWCB4N95dJyoyLsogleDoFZelfjM9HIzQ==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.556.0", + "@aws-sdk/client-cognito-identity": "3.564.0", "@aws-sdk/client-sso": "3.556.0", "@aws-sdk/client-sts": "3.556.0", - "@aws-sdk/credential-provider-cognito-identity": "3.556.0", + "@aws-sdk/credential-provider-cognito-identity": "3.564.0", "@aws-sdk/credential-provider-env": "3.535.0", "@aws-sdk/credential-provider-http": "3.552.0", - "@aws-sdk/credential-provider-ini": "3.556.0", - "@aws-sdk/credential-provider-node": "3.556.0", + "@aws-sdk/credential-provider-ini": "3.564.0", + "@aws-sdk/credential-provider-node": "3.564.0", "@aws-sdk/credential-provider-process": "3.535.0", - "@aws-sdk/credential-provider-sso": "3.556.0", + "@aws-sdk/credential-provider-sso": "3.564.0", "@aws-sdk/credential-provider-web-identity": "3.556.0", "@aws-sdk/types": "3.535.0", "@smithy/credential-provider-imds": "^2.3.0", @@ -617,12 +606,12 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.556.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.556.0.tgz", - "integrity": "sha512-tvIiugNF0/+2wfuImMrpKjXMx4nCnFWQjQvouObny+wrif/PGqqQYrybwxPJDvzbd965bu1I+QuSv85/ug7xsg==", + "version": "3.564.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.564.0.tgz", + "integrity": "sha512-Kk5ixcl9HjqwzfBJZGQAtsqwKa7Z8P7Mdug837BG8zCJbhf7wwNsmItzXTiAlpVrDZyT8P1yWIxsLOS1YUtmow==", "optional": true, "dependencies": { - "@aws-sdk/client-sso-oidc": "3.556.0", + "@aws-sdk/client-sso-oidc": "3.564.0", "@aws-sdk/types": "3.535.0", "@smithy/property-provider": "^2.2.0", "@smithy/shared-ini-file-loader": "^2.4.0", @@ -2251,9 +2240,9 @@ } }, "node_modules/bullmq": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-5.7.4.tgz", - "integrity": "sha512-LjPXGyDZ3c5Tbbq8ccwQEXBHrOKljHfrJ5DQMXUXyKDxxwqKxXLX8Vr69BviDOu6RmPzokh3rPziqf7Y5JylKw==", + "version": "5.7.6", + "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-5.7.6.tgz", + "integrity": "sha512-bDTNqqNDrmUGHcA5lw6tcestchS4vV7/VkTyywybvOiXGtkGZCyjuziBzCNwDYMKibPpWmKySe5yTJsEb5bIlw==", "dependencies": { "cron-parser": "^4.6.0", "ioredis": "^5.3.2", @@ -4368,9 +4357,9 @@ "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" }, "node_modules/joi": { - "version": "17.12.3", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.3.tgz", - "integrity": "sha512-2RRziagf555owrm9IRVtdKynOBeITiDpuZqIpgwqXShPncPKNiRQoiGsl/T8SQdq+8ugRzH2LqY67irr2y/d+g==", + "version": "17.13.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.0.tgz", + "integrity": "sha512-9qcrTyoBmFZRNHeVP4edKqIUEgFzq7MHvTNSDuHSqkpOPtiBkgNgcmTSqmiw1kw9tdKaiddvIDv/eCJDxmqWCA==", "dependencies": { "@hapi/hoek": "^9.3.0", "@hapi/topo": "^5.1.0", @@ -5534,17 +5523,17 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -5775,30 +5764,30 @@ } }, "node_modules/pino": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.20.0.tgz", - "integrity": "sha512-uhIfMj5TVp+WynVASaVEJFTncTUe4dHBq6CWplu/vBgvGHhvBvQfxz+vcOrnnBQdORH3izaGEurLfNlq3YxdFQ==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.21.0.tgz", + "integrity": "sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==", "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.1.1", "on-exit-leak-free": "^2.1.0", - "pino-abstract-transport": "^1.1.0", + "pino-abstract-transport": "^1.2.0", "pino-std-serializers": "^6.0.0", "process-warning": "^3.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "sonic-boom": "^3.7.0", - "thread-stream": "^2.0.0" + "thread-stream": "^2.6.0" }, "bin": { "pino": "bin.js" } }, "node_modules/pino-abstract-transport": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.1.0.tgz", - "integrity": "sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", + "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", "dependencies": { "readable-stream": "^4.0.0", "split2": "^4.0.0" @@ -6987,9 +6976,9 @@ "dev": true }, "node_modules/thread-stream": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.4.1.tgz", - "integrity": "sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.7.0.tgz", + "integrity": "sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==", "dependencies": { "real-require": "^0.2.0" } @@ -7375,9 +7364,9 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "node_modules/wildduck": { - "version": "1.42.6", - "resolved": "https://registry.npmjs.org/wildduck/-/wildduck-1.42.6.tgz", - "integrity": "sha512-GScdHsebtMcVUL+27uVieAZwQfhOooH3yU4C36XO0rYbIbGsEGsSMoX9RRVDhOFlM/HtlzvBcZd4IOY8v8v0gA==", + "version": "1.43.2", + "resolved": "https://registry.npmjs.org/wildduck/-/wildduck-1.43.2.tgz", + "integrity": "sha512-JQ8ByGHrf74f5fxOvVKdOBtlCgosdIHvCQ4ASkS7JQXNa1cMK9rpSibzJgIyBpShaMqV/eP7WwFG94vFMeVZUQ==", "dependencies": { "@fidm/x509": "1.2.1", "@opensearch-project/opensearch": "2.7.0", @@ -7390,7 +7379,7 @@ "base32.js": "0.1.0", "bcryptjs": "2.4.3", "bson": "6.6.0", - "bullmq": "5.7.4", + "bullmq": "5.7.6", "fido2-lib": "3.5.3", "gelf": "2.0.1", "generate-password": "1.7.1", @@ -7403,7 +7392,7 @@ "ioredis": "5.4.1", "ipaddr.js": "2.2.0", "isemail": "3.2.0", - "joi": "17.12.3", + "joi": "17.13.0", "js-yaml": "4.1.0", "key-fingerprint": "1.1.0", "libbase64": "1.3.0", @@ -7423,7 +7412,6 @@ "npmlog": "7.0.1", "openpgp": "5.11.1", "pem-jwk": "2.0.0", - "punycode": "2.3.1", "punycode.js": "2.3.1", "pwnedpasswords": "1.0.6", "qrcode": "1.5.3", @@ -7448,6 +7436,15 @@ "node": ">=16.0.0" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index ebdcb41..c789fba 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "nodemailer": "6.9.13", "punycode.js": "2.3.1", "srs.js": "0.1.0", - "wildduck": "1.42.6" + "wildduck": "1.43.2" }, "devDependencies": { "eslint": "8.57.0",