node_modules: update (#352)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurlaanddawidd6 authored and GitHub committed 2026-10-22 08:43:32 +02:00
1 parent 4026a70a6b
commit 47af4a10b5
53 files changed
+630 -217

No files matched your search

+16 -13
View File
@@ -7,7 +7,8 @@ import crypto from 'node:crypto';
import DataStream from './data-stream.js';
import { PassThrough } from 'node:stream';
import * as shared from '../shared/index.js';
import { ERR_ACCESS_DENIED, isTransientError } from '../errors.js';
import { parseServerMessageId } from './server-message-id.js';
import { ERR_ACCESS_DENIED, isPermanentResponseCode, isTransientError } from '../errors.js';
// default timeout values in ms
const CONNECTION_TIMEOUT = 2 * 60 * 1000; // how much to wait for the connection to be established
const SOCKET_TIMEOUT = 10 * 60 * 1000; // how much to wait for socket inactivity before disconnecting the client
@@ -361,9 +362,7 @@ class SMTPConnection extends EventEmitter {
if (this._destroyed || this._closing) {
return;
}
const connectFn = secure
? tls.connect
: net.connect;
const connectFn = secure ? tls.connect : net.connect;
try {
this._socket = connectFn(opts, () => this._onConnect());
this._setupConnectionHandlers();
@@ -701,6 +700,16 @@ class SMTPConnection extends EventEmitter {
result.messageTime = Date.now() - envelopeTime;
result.messageSize = stream.outByteCount;
result.response = str;
const serverMessageId = parseServerMessageId(result.response, this.options.host);
if (serverMessageId) {
result.serverMessageId = serverMessageId;
}
// an LMTP server answers the message once per recipient, so recipients can be
// refused after the envelope info was built without any rejected errors on it
const rejectedErrors = this._envelope?.rejectedErrors;
if (!result.rejectedErrors && rejectedErrors && rejectedErrors.length) {
result.rejectedErrors = rejectedErrors;
}
return callback(null, result);
});
if (typeof message.pipe === 'function') {
@@ -928,6 +937,7 @@ class SMTPConnection extends EventEmitter {
const responseCode = (typeof response === 'string' && Number((response.match(/^\d+/) || [])[0])) || false;
if (responseCode) {
err.responseCode = responseCode;
err.permanent = isPermanentResponseCode(responseCode);
}
if (command) {
err.command = command;
@@ -970,12 +980,7 @@ class SMTPConnection extends EventEmitter {
this.close();
return;
}
if (!failureResponse &&
this.stage === 'connected' &&
!this._responseActions.length &&
!this._pendingSend &&
!this._destroyed &&
!this._closing) {
if (!failureResponse && this.stage === 'connected' && !this._responseActions.length && !this._pendingSend && !this._destroyed && !this._closing) {
// nothing was waiting for the server, so this is the server ending an idle session
// (usually after its idle timeout), not a failure
this.logger.info({
@@ -1196,9 +1201,7 @@ class SMTPConnection extends EventEmitter {
const args = [];
let useSmtpUtf8 = false;
this._envelope = (envelope || {});
this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '')
.toString()
.trim();
this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '').toString().trim();
this._envelope.to = []
.concat(this._envelope.to || [])
.map(to => ((to && to.address) || to || '').toString().trim());