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