try {
log.debug( "Session expired. Execute logout." );
if ( SessionManager.get( event.getSession() ) != null ) {
IMailbox mailbox = SessionManager.get( event.getSession() ).getMailbox();
if ( mailbox != null && mailbox.isLoggedIn() ) {
mailbox.logout();
}
}
}
catch (Throwable ex) {
// nothing to do