Limit the list of displayed e-mails in a mail folder to those with a “string” in their body:
l ~b "string"
BUT it does involve having all the mails. So if you use a remote IMAP, not such a good idea. IDEALY your IMAP server should implement SEARCH. See page 37 of: http://www.ietf.org/rfc/rfc2060.txt For my mail that I dump to my fs ~/Mail, I use : http://www.rrbcurnow.freeuk.com/mairix/ To index and search them.