procmail
[Top] [All Lists]

Re: Split (\/) regex with optional component on left

2009-12-17 01:29:06
* Professional Software Engineering 
<PSE-L(_at_)mail(_dot_)professional(_dot_)org>:
At 16:37 2009-12-16 -0500, James Michael Fultz wrote:
:0
* ^(List-(Id|Post)|X-(Mailing-)?List):.*<(mailto:)?\/[^(_at_)(_dot_)]+
ML/$MATCH/

So far it works for all except one of the intended matches.  Headers
such as the following:

Have you taken a look at listname_id.rc ?  Chances are, it'd just do what 
you need, without you needing to tweak.

I've seen references to it before and given it a glance but always
thought it seemed more complicated than what I needed.

Does the following recipe look workable for use with listname_id?

INCLUDERC=.../listname_id.rc

:0
* ! LISTNAME ?? ^^^^
ML/$LISTNAME/

Should the $NL variable be set somewhere (I'm assuming it would contain
a newline), unless the following section of listname_id is to be
commented out?

# If the listname isn't blank, emit it to the logfile.
# (wholly optional)
:0
* ! LISTNAME ?? ^^^^
{
        LOG="List: $LISTNAME$NL"
}
____________________________________________________________
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