Procmail requires 3 additional files .procmailrc .mailboxlist .qmail this procmail filter includes header checks, subject line checks, email by xxx sites, a Rbl (real time blacklist) check to 6 differant blackhole sites. I dont guarantee that it will catch all spam messages but it should stop much of it. this procmail filter will save suspected spam messages to a new mailbox named "Mailbox.spam". you may either use imap to read this new mailbox or use the webmail interface on the mail server. You may change the variable SPAMFOLDER=/dev/null to delete this messages instead of saving it. there is a logging file that is created named maillog it will contain a summary list of email messages received. you will need to download this file and remove it from the server every so often. ### begin .procmailrc file SHELL=/bin/sh PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:/var/qmail/bin:. MAILDIR=$HOME # You'd better make sure it exists DEFAULT=$MAILDIR/Mailbox LOCKFILE=$HOME/.lockmail # change to /dev/null to delete spam messages SPAMFOLDER=$MAILDIR/Mailbox.spam FORMAIL=/usr/local/bin/formail LOGFILE=$MAILDIR/maillog INCDIR=/var/qmail/procmail # # uncomment if you do not want to receive any email # to for these address # #INCLUDERC=$INCDIR/rc.neta.com #INCLUDERC=$INCDIR/rc.getnet.com #INCLUDERC=$INCDIR/rc.getnet.net #INCLUDERC=$INCDIR/rc.openlines.com #INCLUDERC=$INCDIR/rc.openlines.net #INCLUDERC=$INCDIR/rc.wixnet.com #INCLUDERC=$INCDIR/rc.bossig.net #INCLUDERC=$INCDIR/rc.bossig.com INCLUDERC=$INCDIR/rc.headers INCLUDERC=$INCDIR/rc.subjects INCLUDERC=$INCDIR/rc.xxx INCLUDERC=$INCDIR/rc.viruses INCLUDERC=$INCDIR/rc.uchinese INCLUDERC=$INCDIR/rc.html INCLUDERC=$INCDIR/rc.work_from_home INCLUDERC=$INCDIR/rc.credit INCLUDERC=$INCDIR/rc.webhost INCLUDERC=$INCDIR/rc.websitetraffic INCLUDERC=$INCDIR/rc.websurf INCLUDERC=$INCDIR/rc.rblcheck ## create file .blacklist in home directory ## with list of blocked email addresses #INCLUDERC=$INCDIR/rc.blacklist ### End .procmailrc file your .qmail file should read as: | preline /usr/local/bin/procmail your .mailboxlist file should read as: Mail/sent-mail Mailbox.spam Trash
further reading on procmail
procmail
man pages
lockfile
man pages
formail
man pages
