procmail
[Top] [All Lists]

increasing efficiency

1997-09-04 10:17:52

I'm trying to streamline my .procmailrc.  I've determined that most of the  
lists I am on can be caught more easily that ^TO that I have been using.   
Most of them have some line such as 'Sender:' or 'X-Loop' or some other  
unique line.

What I'd really like to do is make these two sets as efficient as possible:

Note: usual tripe: yes $APPNMAIL and $LISTS are defined, yes I want to use  
variables for them, yes the 'w' flag is there on purpose, and no I don't need  
to do locking as appnmail takes care of that for itself.


1) Majordomo mailing lists.  They all come with the From_ line defined as  
@greatcircle.com, so that's the first test.

2) There are 3 groups, and the mailboxes are the same as the list name...  
can I use $MATCH somehow?  Here's what I have right now:

:0
* ^From (_dot_)*(_at_)GreatCircle\(_dot_)COM
{
        :0w
        * ^(Sender|To|Cc):.*majordomo-users?(-owner)
        | $APPNMAIL $LISTS/majordomo-users

        :0w
        * ^(Sender|To|Cc):.*majordomo-docs?(-owner)
        | $APPNMAIL $LISTS/majordomo-docs

        :0w
        * ^(Sender|To|Cc):.*majordomo-workers?(-owner)
        | $APPNMAIL $LISTS/majordomo-workers
}

Rather than have 3 separate ones for 'users' 'docs' and 'workers' I'd rather  
have one that used $MATCH, but I'm not sure how to do it.

I'd like to make it something like this:

:0
* ^From (_dot_)*(_at_)GreatCircle\(_dot_)COM
{
        SOMEMAGICHERETOSET$MATCH
        
        :0w
        | $APPNMAIL $LISTS/majordomo-$MATCH

}       

Note: the Sender line always has the -owner part

Any help appreciated....

TjL

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