From: "Justin Zygmont" <jzygmont@xxxxxxxxxxxxx>
hi, I was using postfix and was wondering what the best method would be to discard all messages that have been marked as spam in the subject line. I guess spamassassin just prosesses email, but doesnt remove them, has anyone setup procmail with postfix to work well?
I sort of had it working at one time during my digression to Mandrival. I added the following line to the postfix main.cf file: mailbox_command=/usr/bin/procmail -f- That got procmail to run. From there filtering is an exercise for the Wiki reader - provided that is sufficient to use procmail in your configuration. That aside I do have a handy suggestion to work with. SpamAssassin is <gasp> not perfect. So it is handy to have a way to filter spam messages for the false positive. For that your specific needs must be addressed. For my needs I added this line to the local.cf file in place of any stock markup rule: rewrite_header Subject *****SPAM***** _SCORE(00)_ ** This gives Subject lines that start with "*****SPAM***** 005.1 **" followed by the original title. The number format allows the mail program to sort the scores so all you need look at, generally, are the low scores rather than all scores. Within procmail, however, you may want to filter on the spam level header: X-Spam-Level: ********************************************** If there are more than say 10 stars then /dev/null it if you wish. If you have "little ones" you want to shield from the V word spams and porn spams you may wish to divert all spam into a directory you can check over yourself. Automating that process may be "annoying" but rewarding. It would start with a directory that is world writable but not readable or executable. Divert ALL spam to that directory with the "^X-Spam: Yes" procmail rule. :0: * ^X-Spam: Yes /home/spamreview Make your user account the only one that is in a "spamreview" group that is allowed to read, write, and execute that directory. Then you can delete the spams and forward the mismarked hams to their rightful recipients. A variant on the various automated training tricks that typically use IMAP folders should work very nicely, even if the littles are reading via MS based tools like Outlook Express. I hope this helps the immediate problem and offers some additional useful suggestions. {^_^}