procmail
[Top] [All Lists]

Re: How do I create a file with the subject as the name?

2000-09-18 04:19:08
At 21:17 2000-09-17 -0400, Poohba wrote:
funny. I want to save all of those messages to a folder with the filename the name of the subject with dashes in place of the spaces. If that is too

I presume you're aware that you sent this request to the procmail list more than once.

You should try checking any one of several procmail archives, which would have answered the question several times over, with a little rummaging on your part. Lacking that initiative, here's a recipe that should put you somewhere on track:


# some_criteria_you_are_matching_on
:0
* ^From:some_guy
{
        :0h
        * ^Subject:[    ](Fwd:|)*[      ]*\/.*
                FWSUBJ=`echo $MATCH|sed -e s/" "/-/g`

        # you might want to do something to ensure there's a DEFAULT for the
        # FWSUBJ.  That's your excercise.

        # deliver to file, with locking.
        :0:
        $MY_WHATEVER_DIR/$FWSUBJ
}

---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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