final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
final SelectedMailbox sm = session.getSelected();
final MailboxListener idleListener;
if (sm != null) {
idleListener = new IdleMailboxListener(session, responder);
mailboxManager.addListener(sm.getPath(), idleListener , mailboxSession);
} else {
idleListener = null;
}
final AtomicBoolean idleActive = new AtomicBoolean(true);