[If you're on a Darwin system and use Apple Mail or
one of the many other clients, you can grep through your mail files
locally. For Mail, look in your home directory's
Library/Mail/ directory. There should be a
subdirectory there, perhaps named something like
iTools:example@mail.example.com, with an IMAP
directory tree beneath it. IMAP stores messages individually, not in
standard Unix mbox format, so there is no way to look for all matches
in a single mailbox by grepping a single file, but fortunately, you
can use regular expressions to construct a file list to search.
:-) -- SJC]
Here are two ways to match "a simple
problem", "an easy
problem", as well as "a
problem"; the second expression is more exact:
% egrep "a[n]? (simple|easy)? ?problem" data
% egrep "a[n]? ((simple|easy) )?problem" data