Spam Rule is a shell script that is designed to act as a filter for incoming mail on a qmail system. It runs between qmail-smtpd and qmail-queue, and can be used for any kind of filtering, although it was originally designed to block mail based on DNS blacklists (i.e. "RBLs"). Spam Rule is based upon the need to use different filtering rules based on who is receiving the message.