On Fri, Aug 24, 2007 at 09:18:26AM -0500, Smith, Craig A wrote:
> > I need a way to search through old email messages quickly and
> efficiently.
> > I would use this for listserv archives and, I hope, for personal
> email.
> 
> Perl is very fast at matching arbitrary expressions.
> 
> 
> > For example, if I want to find every message where 
> > "jones" (case insensitive) is found in the cc field and "linux" is
> found 
> > in the message body, will they allow for that?  
> 
> Let's assume every message contains the string "Subject:" terminated by
> a new line (\n) and, when present, "CC:" also ends with a new line.

Let's not.  Read RFC2822 section 2.2.3 Long Header Fields .

> Anything following that would be message body until the next message,
> starting with the "Date:" string.  Something like
> 
>     =~ m/Subject:.*?\n.*?CC:.*?jones.*?\n.*?linux.*?Date:/gis
> 
> might work.

Read the RFC...  Then adjust for morons who don't, but write e-mail
programs.

florin

-- 
Bruce Schneier expects the Spanish Inquisition.
      http://geekz.co.uk/schneierfacts/fact/163
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20070824/a3fac42c/attachment.pgp