IMAP DAL enhancements, thanks Alan