procmail
[Top] [All Lists]

Re: Digest

1997-05-05 14:14:00
Additionally, the repeated check for the same header is a bit redundant.
You
can probably save a few nanoseconds by using a recipe with braces:

Hey, a nanosecond is a nanosecond.;) I'm not sure about some of these finer
points yet. I'll get the hang of it one of these days.


:0
* ^TOjoke-l\>
{
    # Save a copy of the entire message to the main archive
    :0c:
    $HOME/mail/joke-l

    # Do nasty things to the original's headers
    :0fh
    | formail -XFrom -XTo: -XDate: -XSubject:

    # Save a copy to the daily file
    :0c
    $ARCHIVES/$DAYFILE

    # Finally, deliver the "original" to the monthly file
    :0h
    $ARCHIVES/$MONTHFILE
}

Thanks! It seems to work well with no error messages. The only bug I can
find is that only the stripped header gets delivered to the MONTHFILE. Both
should contain the same information; one daily and the other monthly.

 
I've opted for the From_ line as delimiter here. That way, the body of the
message never has to go through formail; this should save you another
ounce of
resources. (It's particularly nice if you receive big postings, but even
for
normal messages of only a few kilobytes, a savings is never to be sneered
at.)
As another bonus, the produced files will actually be valid mbox folders. 

Good idea! Someone could then split apart the messages with procmail if they
wanted to?


The ^TO macro is a magic gizmo which will match To: and Cc: and a bunch of
others. Look at the procmailrc manual page for details.

Thanks for pointing this out. I've seen this before but haven't come across
any details yet.

Regards,

Dave/Webmaster

                VserV Inc. | Enjoy Great Humor?
            www.v-serv.com | Join Joke-L
Commercial Website Hosting | Listserv <listserv(_at_)ddave(_dot_)com>

   "I love the smell of SPAMMER frying in the morning."
         Wagner playing in the background...

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