procmail
[Top] [All Lists]

Re: why two expressions aren't matching

2005-02-24 05:02:33
Toen wij Justin Gombos kietelden, kwam er dit uit:

  SPAMGOURMET_DOMAIN = '(\
  antichef.(com|net)|\
  neverbox.com|\
  recursor.net|\
  spamcannon.net|\
  spamgourmet.(com|net|org)|\
  xoxy.net)'

If that assignement is indented, the choice for 
the single quotes is the right one. If you would 
have used double quotes, than this would occur:

  procmail: Assigning "SPAMGOURMET_DOMAIN=(   antichef.(com|net)
     |   neverbox.com|   recursor.net|   spamcannon.net
     |   spamgourmet.(com|net|org)|   xoxy.net)"

(all in one long line), so with all the embedded spaces, and 
that would destroy the regex...


  SG_SUFFIX = jgombos(_at_)$SPAMGOURMET_DOMAIN

  SG = [^.]*[.][^.]*[.]$SG_SUFFIX

  :0 :
  * SG ?? blah[(_dot_)]blah[(_dot_)]jgombos(_at_)spamgourmet[(_dot_)]com
  match_found

Regexes belong to the right of the '??' only. 

Try:

  SG_SUFFIX = "jgombos(_at_)$SPAMGOURMET_DOMAIN"

  regex_SG  = "[^.]*[.][^.]*[.]$SG_SUFFIX"

  H_From = 'blah(_dot_)blah(_dot_)jgombos(_at_)spamgourmet(_dot_)com'

  :0:
  *$ H_From ?? $regex_SG
  match_found

(tested :)

-- 
Grtz, Ruud

____________________________________________________________
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