Misc progress on mail sources and IMAP