TDAT: protected void cleanup(ChannelHandlerContext ctx) { // Make sure we dispose everything on exit on session close SMTPSession smtpSession = (SMTPSession) ctx.getAttachment(); if (smtpSession != null) { LifecycleUtil.dispose(smtpSession.getState().get(SMTPConstants.MAIL)); LifecycleUtil.dispose(smtpSession.getState().get(SMTPConstants.DATA_MIMEMESSAGE_STREAMSOURCE)); } super.cleanup(ctx); } COM: cleanup temporary files