procmail
[Top] [All Lists]

Re: Second request for help with 'for' line

1997-08-28 17:33:27
Timothy Luoma suggested to Greg Maples,

| :0

It needs a local lockfile.

| * ^Received:.*for \<dbennett(_at_)netconnect\(_dot_)net\>
| MisDirected
| 
| I'm not sure about the < > stuff, but I think the \ escapes it successfully.

Actually, a backslash un-escapes angle brackets and makes them magic.
Procmail's "\<" matches on a literal "<" and its "\>" matches on a literal
">", so you may find it still working, but it's better to be specific.
Moreover, another MTA may not insert the angle brackets, so you have to
allow for their not being there, and you might also want to consider finding
the person actually named in To: or Cc:, so I think this is a better idea:

  :0:
  * (^TO_|^Received:.*for <?)dbennett(_at_)netconnect\(_dot_)net
  MisDirected

Note 1: "\<" and "\>" mean different things in egrep and perl from their
meaning in procmail, and those utilities will not match a literal angle
bracket in the text to an escaped angle bracket in a pattern.

Note 2: If your version of procmail does not support ^TO_, ^TO is almost
as good for this purpose.

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