Handler method called upon receipt of an unrecognized command.
Returns an error response and logs the command.
//If there was message failure, don't consider it as an unknown command
if (session.getState().get(SMTPSession.MESG_FAILED) != null) {
return;
}
session.getResponseBuffer().append("500 "+DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.DELIVERY_INVALID_CMD))
.append(" Command ")
.append(session.getCommandName())
.append(" unrecognized.");
String responseString = session.clearResponseBuffer();
session.writeResponse(responseString);