procmail
[Top] [All Lists]

Re: To = From

1999-02-18 10:11:41
In message 
<Pine(_dot_)LNX(_dot_)3(_dot_)96(_dot_)990218093112(_dot_)6773A-100000(_at_)argo(_dot_)dancris(_dot_)com>,
 Michael 
Rawls writes:
 Hi All,
   I have a newbie procmail question.  For a procmail spam filter is it
possible for me to have procmail determine if the "To:" address and the
"From:" address are the same?

Logic example:

If "To:" address equals "From:" address then dump as spam.

Here you go...

#
# First, we sort out all mails with identical From: and To:
#
:0 h
SPAM_FROM=| formail -z -x 'From:'

:0 h
SPAM_TO=| formail -z -x 'To:'

# Is From: and To: identical?
:0 w
* ? test "$SPAM_FROM" = "$SPAM_TO"
* !^TOchalmers.se
xmail/SPAM/.

//Christer

-- 
| Sys admin @ ED                 WWW: http://www.etek.chalmers.se/            |
| Email: mort(_at_)etek(_dot_)chalmers(_dot_)se  Phone: (0)31 772 5431, (0)707 
53 57 57       |

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