Greylisting for qmail with IPv6 support
I have been using the greylisting implementation for qmail from
http://shupp.org/ which is based on the implementation for exim from
I wanted to add IPv6 support and found no references on the web
regarding greylisting and IPv6 (at least no implementation
With PostgreSQL it was an easy task to rewrite local_scan.c to support
IPv6. At least with qmail as sender_host_address is set to the value of
$TCPREMOTEIP which is either an IPv4 or IPv6 address. I do not know exim
and if exim does it the same way.
Even IPv4 benefits from using the inet data type of PostgreSQL
because of the CIDR support. Manual white or black listing entries now
are not limited to the class based approach of the MySQL
implementation any more.
See the below for my local_scan.c version and the database definition for PostgreSQL.
The executable has to be linked against libpq and not libmysqlclient,
i.e. you need to adjust the Makefile accordingly.
It works for me, YMMV.
A qmail IPv6 patch can be found here: http://member.wide.ad.jp/~fujiwara/
A ucspi-tcp IPv6 patch can be found here: http://www.fefe.de/ucspi/
A rblsmtpd IPv6 patch can be found here: http://gurubert.de/qmail/rblsmtpd/IPv6
A djbdns IPv6 patch can be found here: http://www.fefe.de/dns/