Better handle * and % characters in MailboxQuery, with a test, patch contributed by Thomas Söhngen (JAMES-1566)