# .procmailrc will move spam flagged by spamassassin into a spam directory. If mail fails, it is assumed mailbox quota is full. # Written by Marcus Sykes @ blog.netweblogic.com - ask@netweblogic.com MAILDIR = /var/qmail/mailnames/$1/$2/Maildir SHELL = /bin/sh SPAMDIR = $MAILDIR/.Spam/ #SUCCESSFUL DELIVERY :0 { #SPAM HANDLING :0 * ^X-Spam-Status: Yes.* { #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 | /usr/bin/deliverquota "$SPAMDIR" } #Let the rest in :0 EW | /usr/bin/deliverquota "$MAILDIR" } #BOUNCES :0 e { LOG = "User mailbox is full" EXITCODE = '' TRAP = 'exit 77;' }