At 23:50 2007-08-14 +0200, David J. Weller-Fahy wrote:
Before I get into my questions, I do have one about the second recipe.
Why the following conditions in the List-Subscribe recipe?
Do the contents of MATCH match any character one or more times with
one dash at the end? [ * MATCH ?? ^^\/.+- ]
AND
Do the contents of MATCH match any character one or more times with
no dash at the end? [ * MATCH ?? ^^\/.+[^-] ]
I would think they would cancel out, and make that recipe useless...
what am I missing?
The recipe uses SCORING (see 'man procmailsc') with a 'maximal' result,
causing any match to instantly treat the recipe as true, without needing to
check any of the other conditions. The series of conditions is intended to
whittle down the MATCH to something which is just a LISTNAME, without other
tokens (like -owner, or -s*bscribe, -request, etc).
As stated before the second recipe, "taht didn't work."
Old typo version you're using as a source. The comment means that the
series of conditions, which really should match most lists didn't seem to
do it, so, in case it's some other type of list, try the next set of
conditions.
I ended up
putting together the following test headers to make sure my recipe set
picked up all variations on the rules:
You can test it easily enough - set it up in a sandbox, invoke the recipe,
then right afterward, take every message where LISTNAME isn't set, and
store it to a file:
:0:
* ? LISTNAME ????
unmatched.mbx
then throw a pile of saved mail at it:
formail -s procmail sandbox.rc < savedmail.mbx
anything left in unmatched.mbx wasn't identified as having come from a list.
Works really well if your saved mail corpus is all known list mail...
After a bit of testing, I determined that the following rules extracted
the list name of all my mailing lists (including an oddball with only
the sender field):
After a bit of testing, did you determine whether any of your test messages
were not identified by the prior recipe, or are you just looking to
reinvent the wheel?
x-(beenthere|loop):[$WS]*\
BBBZZZZT.
X-Loop: is used a lot as a default loop catcher in procmail recipes for
autoreplies and forwards. It is *NOT* indicative of list messages. I must
admit I have not spent much time examining the rest of your conditions -
but that one leaps out as an error.
---
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