procmail
[Top] [All Lists]

Bouncing mail whose To: equals From: (was Re: How-to...)

1997-06-09 02:29:00
On Sat, 7 Jun 1997 19:46:59 +1000, David J N Begley
<david(_at_)AVARICE(_dot_)NEPEAN(_dot_)UWS(_dot_)EDU(_dot_)AU> wrote on Spam-L:
I know this isn't the Procmail list, but since there are a few people here
using it (and I always having a hell of a time searching through the
on-line Procmail list archives) I thought I might risk it anyway...
Is it possible to compare multiple lines to look for identical
information?  That is, something like "does field 1 contain `x', and so
does field 2"?  For example, something to match:
   From: same(_at_)address
   To: same(_at_)address
and
   Reply-To: same(_at_)address
   To: same(_at_)address

Here's what I do to that end (yes, these have been tested in reality
for some time now):

:0
* ^To: \/.*
* $ ^\/(From|Reply-To): $MATCH
{
    LOG="spamreject: To: equals $MATCH
 "
    :0:
    $SPAMFOLDER
}

This could be improved to look for only the real e-mail address (i.e.
parse it down to only userid(_at_)host(_dot_)domain without any real names etc)
but I haven't bothered and can't see any real reason for that, based
on the spam I receive. 

Hope this helps,

/* era */

PS A meaningful Subject: line saves your readers time and effort

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>
  • Bouncing mail whose To: equals From: (was Re: How-to...), era eriksson <=