update
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user