imap: Added required mailbox check for FETCH and APPEND commands