Greylisting for SPAMCONTROL

SPAMCONTROL is a patch to qmail by Erwin Hoffmann and others that adds many missing features to qmail when run as an Internet facing MTA in todays online world.

Some features are missing in SPAMCONTROL 2.6.20 that are added by this patch:

Greylisting
The Greylisting implementation in this patch is based on code from Digital EveryWare and Bill Shupp.
It introduces a $GREYLIST environment variable (can be set in tcp.smtp) to switch the greylisting code on or off based on the connection.
It needs a MySQL database created with dbdef.sql. The connection is configured at compile time in local_scan.h or with the environment variables as explained in qmail-envelope-scanner(8).
The greylisting procedure is applied after the "static" badmailfrom, badrcptto and recipient checks from SPAMCONTROL.
Wire Tapping
Adds the qmailtap patch to the code.
Null Recipient Detection
if (!str_len(addr.s)) { err_nullrcpt(); return; }
This line in smtp_rcpt() checks if the recipient address is empty. This sometimes happens with a misbehaving MUA.
Custom Error Messages for $QMAILQUEUE programs
This is the qmail-queue-custom-error patch with an additional customerror.h include file that defines the file descriptor. It is also used for the $QHPSI program from SPAMCONTROL.
$RCPTHOSTS and $MORERCPTHOSTS
These environment variables are introduced to have more than one control/rcpthosts or control/morercpthosts.cdb file. This is handy if you want to limit rcpthosts (accepted domain names) by IP address.

Use this patch at your own risk.

AttachmentSize
old qmail-spamcontrol-2.5.27-taps-greylisting.patch61.9 KB
qmail-spamcontrol-2.6.20-taps-greylisting.patch62.28 KB