This commit is contained in:
2025-05-23 08:17:34 +00:00
parent 7344bf0f70
commit 53f5e30b23
3 changed files with 45 additions and 11 deletions

View File

@ -210,7 +210,7 @@ export class CommandHandler implements ICommandHandler {
break;
case SmtpCommand.QUIT:
this.handleQuit(socket);
this.handleQuit(socket, args);
break;
case SmtpCommand.STARTTLS:
@ -734,7 +734,13 @@ export class CommandHandler implements ICommandHandler {
* Handle QUIT command
* @param socket - Client socket
*/
public handleQuit(socket: plugins.net.Socket | plugins.tls.TLSSocket): void {
public handleQuit(socket: plugins.net.Socket | plugins.tls.TLSSocket, args?: string): void {
// QUIT command should not have any parameters
if (args && args.trim().length > 0) {
this.sendResponse(socket, `${SmtpResponseCode.SYNTAX_ERROR_PARAMETERS} Syntax error in parameters`);
return;
}
// Get the session for this socket
const session = this.smtpServer.getSessionManager().getSession(socket);