Marcus Sykes wrote Wednesday, February 25, 2009 13:09:
I've finally managed to figure this out along with some other
tricks to beef up qmail/procmail spam handling on PLESK. In a
nutshell, it places spam into a spam folder, purges spam x
days old, and will work universally across all accounts on
the system (e.g. no manual setup per account). Hope this
helps someone out... I've tried and tested this on 3
different production servers and counting:
Here's a link to the tutorial:
http://blog.netweblogic.com/linux/mail/filter-spam-folder-proc
mail-qmail-plesk/
Some quick comments follow. First, please don't send MIME-encoded
mail to the list. This is a text-only list.
Regarding your code:
> :0
> {
Why are you going directly to a nested brace set without
any condition? That seems unnecessary.
> #SPAM HANDLING
> :0
> * ^X-Spam-Status: Yes.*
The trailing ".*" does nothing of value here. Suggest you get rid of it.
> {
> #Delete spam older than 30 days
> :0
> * ? test -d $SPAMDIR && find $SPAMDIR/new -mtime +30 -exec rm
{} \; && false
> { }
We didn't need to enter another sublevel of nested braces here. You could
do:
:0
* ^X-Spam-Status: Yes
* ? test -d $SPAMDIR && find $SPAMDIR/new -mtime +30 -exec rm {} \; && false
{ }
> #If this email account doesn't have a spam folder, don't use
deliverquota this one time, very important otherwise
you get permission problems....
> :0
> * !? test -d $SPAMDIR
> $SPAMDIR
>
> #Place in Spam Directory
> :0 EW
> * ^X-Spam-Status: Yes.*
Well, gee, but didn't we already test for "^X-Spam-Status: Yes"
way up above? Should be no need to repeat the test.
> | /usr/bin/deliverquota "$SPAMDIR"
> }
> }
dman
____________________________________________________________
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