More IMAP hackery