Add IMAP state tracker and accessor