procmail
[Top] [All Lists]

Re: Problem: address not caught in To: header

2001-04-24 10:21:40
On Tue, Apr 24, 2001 at 11:19:18AM -0400, Matthew Manuel wrote:
This is what I had:

:0
* ^TO.( |<)*matthew(_at_)manuel(_dot_)ca
{   
    :0
    ! manuel(_at_)cs(_dot_)dal(_dot_)ca
}

  I just changed it form TO to TO_, although I don't think that will make a
difference in my case.  What subtle difference can this change make?
Could email addresses with numerics stop the original recipe from
working???  How about the <triangle brackets> in the addresses listed
before mine in the header?  

The difference between ^TO and ^TO_ is that the former is
designed to match against a word, while the latter is meant
to match against an address. Since you have an address, the
^TO_ form would be more appropriate. It may or may not make
a difference in and of itself, but I don't think that it
would hurt.

I would personally change your regex to this:

    * ^TO_matthew(_at_)manuel\(_dot_)ca

The ( |<) is a bit specific as well as unnecessary, and
could very well be the cause of the original problem. A rule
I always go by when creating regexes is to match just what
is needed, and not more. In this case, the only thing that
you need to count on is the address itself... nothing else
matters.

Anyway, hope this helps.

-- 
John Patton                      patton66(_at_)home(_dot_)com
Get my GnuPG public key: finger john(_at_)24(_dot_)22(_dot_)215(_dot_)225

"Man is what he believes."
- Anton Chelehov
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail