At 8:23 PM -0400 5/17/99, Van wrote:
>Ben Margolin wrote:
>>
>> You really want a combination of a database (with fields for subject,
>> author, body, etc.) and some sort of full-text indexing system, to
>> build indexes for the body fields. It would definitely be useful...
>>
>> [ Ben Margolin - ben@stripped ]
>>
><--snipped-->
>Ben, thanks for the note of interest. Right now, I'm parsing it at bash
>looking for the 'From -' line, and, going from there. My chief concern,
>is that this could be an extremely long operation in bash, so, I was
>hoping for a quick c kludge. But, oh well.
>
>My approach:
>1> cat the mail file;
>2> Find the 'From -' line and stick it in a variable;
>3> At the line feed and, up to the 1st blank line (message) read into an
>envelope variable;
>4> Read in the message until the next blank line into a message
>variable;
>5> Loop 'til done.
>Thoughts/pitfalls, would be helpful.
>Van
Why not use procmail and Perl to do the job ?
procmail can filter by the "From" line, and it can call a perl script
which can then do the mySql magic.
--
------------------------------------------------------------------------
Dan White
------------------------------------------------------------------------
"Sometimes I think the surest sign that intelligent life exists
elsewhere in the universe is that none of it has tried to contact us."
Calvin (Bill Waterson)