Imap ESEARCH helper