Re: ^TO or ^TO_
David W. Tamkin <dattier <at> ripco.com>
2000-10-02 15:46:12 GMT
Subba Rao asked,
| I have seen the use of this condition in many recipes. Both of them seem to
| * ^TOsomeone <at> place.com
| * ^TO_someone <at> place.com
| Which of these options is the recommended for use by the procmail developers?
^TO_ came later as a tweak on ^TO. The principal difference is that ^TO
can match an expression that ends in a hyphen while ^TO_ will not, so you
^TO_string will match only if the string is at the beginning of an element
of an address, while ^TOstring will also match if a hyphen appears
immediately before the string.
If you don't want a match if the string is preceded by a hyphen (in contrast
to a space, a quote, a left-side angle bracket, a comma, a colon, or a tab,
for some examples), and your version of procmail supports ^TO_, use ^TO_.
If you want to accept a match if the string follows a hyphen, or if your
version of procmail is too old to have ^TO_ (but not so old that it doesn't
have ^TO either), use ^TO.