Ooriginal: zde .
If you’re using qmail (see IntegratedInMta), you can set up SpamAssassin through Qmail-Scanner, which has a patched version able to delete spam at a given threshold. Here’s the patched version and the original.
If you don’t want the full Qmail-Scanner you can use Mailparser by Eric Bambach which is a very lightweight and very fast C program that drops any message with X-Spam-Flag: YES in the header. Rename /var/qmail/bin/qmail-queue to qmail-queue.orig and add it to the delivery queue after SpamAssassin.
Example /var/qmail/bin/qmail-queue file
/usr/bin/spamc | /var/qmail/bin/mailparser | /var/qmail/bin/qmail-queue.orig