Re: Filters and Spam

From: Tim Myddletun (hello-yarners@see.my.sig)
Date: Tue, 10 Jun 1997 19:30:39 -0400

Tue, 10 Jun 1997 14:46:13 +0200, tc@login.dknet.dk (Thomas Christensen) wrote:
>How to do a "Not" filter. How to do it if I get another email address -
>I will get yet another redirected email address (tc@magna.dk) real soon
>now. So what I want is a "(NOT tc@tc.dk) OR (NOT tc@magna.dk) in to: -> Null"

I posted a while ago a batch file hack to accomplish this. It works
very well actually. I haven't got a spam in my inbox in a long time
... and, "out of sight, out of mind"!

I've since improved on the idea. The original idea was to create
a filter that filtered all mail to your email address(es) to a folder
called "to.me". That way only mail not addressed to you goes to the
"inbox". After import is done, you then can rename the "inbox" to a
spam folder, and rename the "to.me" folder to "inbox". It worked
roughly like this (with no error checking):

ren %HOME\mail\inbox %HOME\mail\to.me
ren %HOME\mail\spam %HOME\mail\inbox
import <filename>
ren %HOME\mail\inbox %HOME\mail\spam
ren %HOME\mail\to.me %HOME\mail\inbox

Alternately you could, if brave, just delete the "spam" inbox; i keep
it and check it out every week or so just to make sure something
didn't slip through i should have seen. Also it would be very
advisable to put in some sort of error checking to make sure the
renaming goes according to plan, or to check if "to.me" already
exists or whatever.

But never mind. I have a new method now which i like even better. (-:
With this method you need two (at least) filters. Your next to last
filter(s) should filter all mail to your addresses to the "to.me"
folder. The LAST filter in your filter list should look for . in the
entire header (yes, a period)... that will capture any remaining
mail... and filter that to "spam". Now after the import is over all
you need to do is:

if exist %HOME\mail\to.me copy /b %HOME\mail\inbox + %HOME\mail\to.me
if errorlevel==0 if exist %HOME\mail\to.me del %HOME\mail\to.me

That (at least in 4dos/4os2 -- you might want to check your command
processor help file to see if it has the same syntax and behavior)
will append the "to.me" folder to the end of your "inbox" and then if
successful delete the "to.me". You also (in 4dos/4os2) could just do
it in one line with the "move" command.

The virtue of this second method (to my mind) is that i'm not
shuffling around folders which can get pretty confusing... especially
if one day you run "import" without going through your batch file...

at least that's my experience. (-:

>And how to ensure that my mailinglist filters are done before this filter.

Filters are processed in the alphabetically sorted order you see them
displayed in the "filter" program.... so just name your filters
alphabetically (or use numbers at the beginnning of the names) and
you can control the order.

Happy experimenting...

-- 
 .+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.
  Tim Myddletun =-=-= the Wood between the Worlds =-=-= x @ veX . net
  -=-=- brace yourself and read The Idiot by Fyodor Dostoyevsky -=-=-                                         
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Yarn/2 Bells & Whistles Page: http://www.vex.net/~x/bells2.phtml
        * June 10th * International Day of the Noble Parasite