procmail
[Top] [All Lists]

Re: Anti spamming

1997-04-09 22:46:00
On Thu, 10 Apr 1997 01:19:55 -0400 (EDT) steffi2(_at_)dgs(_dot_)dgsys(_dot_)com 
(Robert
Nicholson) wrote:

How can you reliably just get the the email address out and leave out
the comments if you are going to use this to do matches?

Right now different user agents send a different From: field and so the
rule is user agent dependent.

[I've cc'd this response to the list; for those of you who missed our
previous episode, this question refers to the use of variable
extraction, via MATCH, to set the value of a variable (FROM) containing
the email address of a message sender.]

A good point.  I hadn't really considered this before, since at the
moment I'm not using *any* recipes that generate autoreplies.  To make
sure you're just getting the email address part of the message, sans
comments and other ornamentation, try this:

     FROM=`formail -rtz -X "To:"`

Which, while not as efficient as variable extraction, should give you
what you want.

-- Lars

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Boston University Office of Information Technology

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