smtp-server icon indicating copy to clipboard operation
smtp-server copied to clipboard

If server is closing, then HELO etc commands should not be accepted

Open titanism opened this issue 2 years ago • 1 comments

Here we have https://github.com/nodemailer/smtp-server/blob/2bd0975292208f1cf77d7a93cb3d8b3c4d48acb8/lib/smtp-connection.js#L406 commands being parsed. However if the server is shutting down, commands such as HELO will still be accepted. Is there a way to add this feature, similar to how we can process onData, onRcptTo, etc? Then we could add if (this._closeTimeout) return setImmediate(() => callback(new Error('Server is shutting down'));.

titanism avatar Jun 11 '22 15:06 titanism

Title updated

titanism avatar Jun 11 '22 15:06 titanism