fixes parsing message names with unknown flags
be more lenient when looking up mailboxes

imap servers use different folder naming schemes. sometimes
prefixed with .INBOX, sometimes not. both variants should be
recognized.