procmail
[Top] [All Lists]

Re: Sent messages

1999-12-12 23:22:53
On Sun, 12 Dec 1999, Gary Funck wrote:

gf> On Dec 12,  4:29pm, S.Toms wrote:
gf> [...]
gf> > Each message has the leading From line looking like the following
gf> >     From skull(_at_)primenet(_dot_)com Sat Aug 15 10:58:03 1998
gf> > 
gf> > but after it goes thru the filter I have it run thru, 
gf> >     :0
gf> >     * ^Date:.*1998
gf> >     1998
gf> > 
gf> > all messages after the first end up looking like the following on the From
gf> > line
gf> >     >From skull(_at_)primenet(_dot_)com Sat Aug 15 10:58:03 1998
gf> 
gf> Scott, how are you invoking procmail?  If you're running it like this:

  Not sure were Scott came from, its actually Shaun :)

gf>     procmail script.rc <  sent.mbox
gf> that would explain why all messages after the first are treated as
gf> part of the first.  You need to "split" that mbox into separate
gf> messages, and that is done with "formail -s":
gf> 
gf>     formail -s procmail script.rc < sent.mbox
gf> 

  Thats what I was looking for, didn't even think about that, thought it
had to all be done through procmail. Thanks a bunch.

gf> should work better for you.
gf> 
gf> A word of warning is that not all Date: fields are well-formed.  The
gf> thread below:
gf> http://www.xray.mpe.mpg.de/mailing-lists/procmail/1997-02/msg00178.html

  I don't think I'll have much of a problem here, since all the messages
I'm wishing to parse were in my Sent folder (messages I emailed) rather
then message I received from outside sources. But thanks for the warning
and the location, could come in useful for something else I'm thinking
of. :)

gf> provides source for a small utility called "mdate" that will parse many of
gf> the popular date/time strings into a canonical form.  Since there
gf> are no strict rules on encoding dates and time (esp. time zones),
gf> this tool works only on a best efforts basis, and will occasionally
gf> run into something it doesn't understand.  Still, I've found it useful,
gf> for separating mail into individual files, and timestamping their
gf> last mod. date/times with the date/time the message was sent,
gf> for example.
gf> 

-- 
        S.Toms - tomas(_at_)primenet(_dot_)com - homepage is in the works
                   SuSE Linux v6.2+ - Kernel 2.2.13

Cabbage, n.:
        A familiar kitchen-garden vegetable about as large and wise as
a man's head.
                -- Ambrose Bierce, "The Devil's Dictionary"

<Prev in Thread] Current Thread [Next in Thread>