procmail
[Top] [All Lists]

Re: mismatch on plussed addresses

1998-03-19 12:36:20
Timothy Luoma wrote,

| This recipe mismatched today.
| 
| My username <luomat(_at_)peak(_dot_)org> was followed by someone who had a 
username
| with a + in it.....
| 
| I thought this recipe was designed to only catch from 'luomat' to the next
| comma (specifically to avoid this potential problem)
| 
| :0:
| * ^(To|Cc):.*luomat.*\+[^,]*
| PlussBox

The recipe may catch messages that match its condition, but the condition
doesn't catch any substrings, since you aren't extracting.

It matches if a To: or Cc: header contains "luomat", followed by anything
(including a string that reaches into another name) or nothing, followed by a
plus sign; and immediately to the right of the plus sign there must be zero
or more non-commas.  There always will be zero or more non-commas, even if
the plus sign is at the end of the line or if the character after the plus
sign is a comma, so that last part is a no-op.

I'm not positive of all the details of what you want here, but I think the
problem is the .* between your logname and the plus sign.  Why would you
permit anything to come between them at all, much less allow literally
*anything*?

 :0:
 * $ ^TO_$LOGNAME\+
 PlusBox # or keep the two s's if you insist

If you do intend to permit intervening text between your logname and the plus
sign, make sure it has no commas:

 * $ ^TO_$LOGNAME[^,]*\+

<Prev in Thread] Current Thread [Next in Thread>