procmail
[Top] [All Lists]

Re: What's the difference?

1997-06-01 08:27:00
On Sat, 31 May 1997 21:24:54 -0400 (EDT),
Luke Davis <ldavis(_at_)voicenet(_dot_)com> wrote:
In v3.11prex, what's the difference between "TO...", and "TO_..."?

Documented in the manuals (procmailrc): 

  MISCELLANEOUS
       If the regular expression contains `^TO_' it will be  sub\xAD
       stituted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-
       Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)',
       which should catch all destination specifications
       containing a specific address.

       If the regular expression contains `^TO' it will  be  sub\xAD
       stituted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-
       Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)', which
       should catch all destination specifications containing a
       specific word.

The difference is in the trailing wildcard, which is slightly
"tighter" in ^TO_ and thus less likely to match in the middle of an
e-mail address. So ^TO_era will not match "op-erator" but ^TOera will.

/* era */

Conventionally, the leading caret is taken to be part of the macro's
name, BTW. 

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>
  • Re: What's the difference?, era eriksson <=