procmail
[Top] [All Lists]

Re: MATCH

2001-10-18 03:51:02

I use a similar rule to match my FreeBSD mailing lists.  I have:

:0:
*       ^Sender: owner-freebsd-(_dot_)*(_at_)FreeBSD(_dot_)ORG
*       ^Sender: owner-freebsd-\/.*@
*       MATCH ?? ^\/[^(_at_)]+
freebsd-$MATCH

which works just fine.

Regarding the pmtest messages, what's the goal here?  Exactly what
are you (Butch) trying to get into the MATCH variable?  Anything that
was matched?  If so, you need the '\/' at the beginning of every
matchable regexp.  Something like:

        :0
        *       ^\/From:.*DotComCentral.*|\
                ^\/From: ADV.*|\
                ^\/Subject: .*million email.*
        {
                :0 f
                | formail -i "X-spam-match: $MATCH"
        }

        :0:
        *       ^X-spam-match
        spamtrap

I haven't tested this ... in particular, I don't know how the '\/' marker
will behave in conditions containing or bars ... but is that sort of what
you're looking for?


On Wed, Oct 17, 2001 at 06:24:16PM +0100, Stig Brautaset wrote:
From: Stig Brautaset <stigbrau(_at_)online(_dot_)no>
To: Procmail List <procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE>
Subject: Re: MATCH
X-URL: http://www.brautaset.org
Date: Wed, 17 Oct 2001 18:24:16 +0100

* Butch Evans <butch(_at_)sheltonbbs(_dot_)com> spake thus:
I have the following recipe:

:0

* ^Subject: pmtest|^Subject: 
cybr|^FROM(_dot_)*deliberatus(_at_)my995internet(_dot_)com

{
        :0f
        |formail -i "X-match: $MATCH">>$KILLEDBOX
}


I have read the man page, as well as Jari Aalto's tips page.  I am
just not getting how to construct the regex in order to get a value
for $MATCH.  I have tried: 
*
(^Subject: pmtest|^Subject: 
cybr|^FROM(_dot_)*deliberatus(_at_)my995internet(_dot_)com)\/.*

as well as other variations on the above theme.  Am I going to have
to put something like
^Subject: pmtest\/.*|^Subject: cybr\/.*|.......
in order to get it to work?  Any other suggestions where a
tips/example page speaks to a guy who wonders why regular
expressions are called "regular"?

I know, it's a though one. AFAIK, how to use MATCH is very much
neglected in the various man pages... Here is one rule I have in my
.procmailrc:

:0:
* ^X-Mailing-List.*\/debian-(user|security|laptop)@
* MATCH ?? ()\/[^(_at_)]+
lists/$MATCH

It puts messages from the various debian lists in folders such as
~/Mail/lists/debian-user etc.

HTH


Regards,
Stig

-- 
brautaset.org
Registered Linux User 107343
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

_______________________________________________
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>