Logout from IMAP on daemon close