/** * Executes a full reset() of the session * which requires a new HELO command to be sent */ public void reset() { reset(false); setAuthenticated(false); }
@Override public void execute(String commandString, ConnectionContext context) throws IOException { Session session = context.getSession(); session.reset(session.getHasSeenHelo()); context.sendResponse("250 Ok"); } }
context.getSession().reset(); // clean slate
session.reset(true); // reset session, but don't require new HELO/EHLO