10 Aug 2011

The email tell to change from the folders with Procmail and Spamassassin

Linux 1 Comment

It’s a help from Procmail
You can filter your mail so, that spam you don’t even get, when you check your mail.

First you have download from procmail. Click here to download.
This (from me) a standard installation with Postfix and Spamassassin.

The text file that you saved as a text with so-called Unix line endings, containing your own filtering rules. You can do so at your own risk following sample copy and expand. This text file with the filter rules, keep you in your home directory, called with the name: .procmailrc.

Note that the file name begin with so point.

.procmailrc example

PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin
DROPPRIVS=yes
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
LOGFILE=$HOME/log
SHELL=/bin/sh

:0 H
* ^X-Spam-Status: Yes
$MAILDIR/.Junk/

Tip 1: send yourself a few emails with (and without ..) the keywords you filter. Then you can see if your filter is working. With a typing error, it is also possible to get everything to /dev/null / send .. 😉 You want to avoid.

Tip 2: Instead of going directly to /dev/null, you can all spam for a while to write a file, to see if your filter errors ($MAILDIR/.Junk/)

One Response to “The email tell to change from the folders with Procmail and Spamassassin”

  1. Vitamine B12 says:

    Behoorlijk goed! Toch weer iets geleerd. Ga je hier nog meer over schrijven? Ik ben zeer onder de indruk ten minste.

Leave a Reply