Cleanup IMAP interface