On Sun, 24 Jul 2005, Chris wrote:
On Sunday 24 July 2005 04:04 pm, Damian Menscher wrote:
On Sun, 24 Jul 2005, Chris wrote:
This is probably a very dumb question, but here goes. I'll be going on
vacation in about a month and instead of coming back to a spam folder
full of a couple of thousand messages I'd just like to not even have them
tossed into
the spam folder. I currently have this in my .procmailrc file:
:0
* ^X-Spam-Flag: YES
$JUNKMAIL
Would just changing the $JUNKMAIL to /dev/null drop all spam into a black
hole? I checked the examples man page and the others, did find one
example where /dev/null was used in a linuxgazette article, but want to
make sure this is the correct way.
Yes, it is. I do the following (after scanning with SpamAssassin):
:0:
* ^X-Spam-Status: Yes
* autolearn=spam
/dev/null
:0:
* ^X-Spam-Status: Yes
junk
This blackholes the definite spam (stuff that was so obviously spam that
SA auto-trained the bayes database on it) and saves the probable spam to
my junk folder. About 2/3 of my spam ends up being sent directly to
/dev/null this way. (I did this originally because reviewing the
junk-mail folder had become too much of a chore. Since you have exactly
the same concern, I expect you'll like this solution.)
Thanks Damian, I'll do it then. However, just a question, you have two
recipes, one that on X-Spam-Status: Yes autolearns then sends spam
to /dev/null the other on X-Spam-Status: Yes sends spam to your junk folder,
doesn't the first recipe cancel out the 2nd? Or am I a bit confused here?
If the first recipe matches, it never makes it to the second (which is
what you want).
My zeroth recipe (not shown since I assume you already have one that
works ) sends the mail through SpamAssassin.
The next recipe (first one above) checks to see if it was spam and had
been autolearned as spam (check that your SA is set up to add that
header -- I think it's there by default with recent releases), and if
so, dumps the mail to /dev/null. Note that SA does the autolearning,
not the recipe.
If that recipe doesn't match, then the mail falls through the the next
one (the second recipe above) which checks if it's spam, and saves it to
my junk folder if so.
Anything that still doesn't match falls through to later recipes, or to
the default mailbox.
Damian Menscher
--
-=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
-=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc:(217)333-0038 |#=-
-=#| 4602 Beckman, VMIL/MS, Imaging Technology Group:(217)244-3074 |#=-
-=#| <menscher(_at_)uiuc(_dot_)edu> www.uiuc.edu/~menscher/ Fax:(217)333-9819
|#=-
-=#| The above opinions are not necessarily those of my employers. |#=-
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail