procmail
[Top] [All Lists]

Re: Letting Fall Through Spam Catcher

1998-06-08 17:36:11
On Mon, 8 Jun 1998, David W. Tamkin wrote:

Paul Bartlett has this code,

[using De Morgan's law to establish OR conditions]

| [etc.]
| :0
| * $ ^TO$MY_ADDRX
| * ! ^Subject:.*(\<[\$]+|free|cash|money|rich|opportunity|AOL4Free\.com\>)

You don't need to escape a dollar sign inside brackets.

    OK.  I confess I have never really understood escaping all that
well.  I just don't use regexps very much to have gotten the hang of
them.  They are not exactly a regular part of my existence on earth. 
(As for unix, I am only a minimal user, not a techno-weenie.)

| * ! ^Precedence: *junk
| * ! ^Precedence: *bulk

You can combine those last two as

  * ! ^Precedence: *(bul|jun)k

    Good point.

| [etc.]                                                   Instead I want
| it to fall through so that it would take the default processing route.
| In other words, the recipe above should NOT catch mail addressed to
| 
|         To: pobart(_at_)some(_dot_)other(_dot_)domain
| 
| which gets forwarded to my account where procmail is active. [...]

Two suggestions:

1.  Instead of definining $MY_ADDRX to match only $USER(_at_)$\HOST, define 
it as

    MY_ADDRX=pobart@(([^ ]+\.)*digex\.net|some\.other\.domain)

    Actually, $MY_ADDRX is currently defined as

MY_ADDRX=pobart@(mail[1-5]?\.)?access[1-5]?\.digex\.net

The variable is used many places in my recipes, and trying to catch 
the other_domain address in it I presume might cause unneeded machine
cycles to be burned up in cases in which they would almost never be
used.  Instances in which I actually receive mail from the other
address are actually quite rare, (it is my GeoCities address), and the
great bulk of my incoming mail is either list mail or certifiable spam,
both of which are mostly taken care of by prior recipes.  Would it work 
in this one recipe to use the following in the conditions?:

* $ ^TO($MY_ADDRX)|(pobart(_at_)some\(_dot_)other\(_dot_)domain)

(BTW, my procmail is still v3.10, which is why I do not use ^TO_.  
I have no control over that.)

or

2.  Add a condition to the `else' recipe so that mail to your other address
    won't match that part either:

    :0E:
    * ! ^TO_pobart(_at_)some\(_dot_)other\(_dot_)domain
    $SPAMFOLDER

The results will be rather different: the first method will give a pass to
mail visibly addressed to your other account only if it has none of the
other signs of spammishness; the second way will keep any mail addressed to
your other account, whether it otherwise smells of spam or not, out of
$SPAMFOLDER.

    I hadn't thought of that.  It would be good to capture potentially
spammy stuff being forwarded from the alternate address.  So your first
idea seem a better one on reflection if I can work the address testing
right.

    Thanks very much for your helpful reply.

-- 
Paul                             <pobart(_at_)access(_dot_)digex(_dot_)net>
..........................................................
Paul O. Bartlett, P.O. Box 857, Vienna, VA 22183-0857, USA
Finger, keyserver, or WWW for PGP public key
Home Page:  http://www.access.digex.net/~pobart

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