procmail
[Top] [All Lists]

Re: Problem with this recipe

1998-10-01 11:44:55
Francis Vidal asked about matching on this:

| HELP_REGEXP="abuse|info|support|webmaster|webguru|ftpadmin|helpdesk"

| * ^TO.*$HELP_REGEXP

Era Eriksson has already pointed out that you need the $ modifier, that .*
there does more harm than good, and that ^TO_ is probably preferabele to ^TO
if your version of procmail supports it.

But also, you're going to need parentheses around $HELP_REGEXP, either in
the recipe where it is used,

  * $ ^TO_($HELP_REGEXP)

or in the assignment that defines it:

  HELP_REGEXP="(abuse|info|support|webmaster|webguru|ftpadmin|helpdesk)"

Otherwise you'll be telling procmail to look for a match to ^TO_abuse, or for
the wordsinfo, support, webmaster, webguru, ftpadmin, or helpdesk ANYWHERE in
the head.

You could safely put the parentheses in both places, but one or the other
will do.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Problem with this recipe, David W. Tamkin <=