procmail
[Top] [All Lists]

Re: Using List-Id in recipes

2006-01-30 16:21:01
At 10:30 2006-01-30 +0000, Anne Wilson wrote:

And will put all of them into the specified folder?  Not quite what I
was wanting to achieve, but thanks anyway.  I can see that using
selected bits of this will come in handy later.

Well, to be correct about it, the recipe which Mr. Kreme posted isn't mine 
verbatim - I set a $LISTNAME variable which can be subsequently used by 
other recipes.

<http://www.professional.org/procmail/listname_id.rc>

Basically, the idea is to get $LISTNAME set to some list-specific string, 
and then afterwards, you can just check $LISTNAME to match whatever lists 
you're s*scribed to:

# once, up near the top of your procmailrc
INCLUDERC=listname_id.rc

# an example of matching a specific list and doing something with it
:0
* LISTNAME ?? ^^bugtraq^^
{
         :0c:
         | formail -A"${XMBHEAD} BUGTRAQ" >> $DEFAULT

         :0:
         | gzip -9fc >> $LISTNAME.gz
}

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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