[mms] Fix blacklist/whitelist matching with IMAP backend (Bug #13031).