procmail
[Top] [All Lists]

Re: MATCH with OR

2001-10-24 16:07:50

Martin, thanks for the advice!

So just to clarify, are the following recipes have work identically?
Will *all* of them store the condition content to MATCH?


:0 fwh
*       ()\/one|two|three
| formail -A "X-spam-match: $MATCH"

:0 fwh
*       ()\/(one|two|three)
| formail -A "X-spam-match: $MATCH"

:0 fwh
*       ()\/one|\
        two|\
        three
| formail -A "X-spam-match: $MATCH"

:0 fwh
*       ()\/(one|\
        two|\
        three)
| formail -A "X-spam-match: $MATCH"


Regarding the "()" at the beginning of a condition versus an
additional backslash ... I can't find it on the procmailrc man
page.  The only references to backslashes seem to be with regard
to line continuation.  But I do understand the need for it, even if
it's not documented.  :)


On Wed, Oct 24, 2001 at 01:14:15PM +0100, Martin McCarthy wrote:

[...]

:0 fwh:
*       \/(semicustomwebsites|autoremove).com|\
        (theslotsaretalkingtome|unbeatabledeals|smarttransact).com|\
        (dotinfocentral|NewDomainFactory).com|\
        (mailpromopack|postmasterpro|travelcomm|gate|roi1).net|\
        domainstop.org
| formail -A "X-spam-match: $MATCH"

A backslash at the start of a condition line effectively says "the
regular expression starts here" and isn't part of the regular expression
itself.  The details are in the man page somewhere.  So you need a
condition line that starts with something like:

  *   \\/(semi....

or (my preference):

  *   ()\/(semi....

Yes, it *is* confusing.

Hope that helps,
Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
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>