Hacked out a bit more of the IMAP code...