In this setup, greylite is a module in the UCSPI chain that anticipates qmail-smtpd.
Nota bene: some users reported to have problems with the
STARTTLS command when greylite wraps qmailrocks
combined
with the JMS
patch. If you want to stick with both you're
forced to use greylite in proxy mode, which is reported to solve
the problem.
tar xjvf greylite-VERSION.tar.bz2 cd greylite-VERSION
make all install
Several arguments can be appended to the command line for enabling compilation of different components. The general form is:
make all install ARGUM1 ARGUM2 ARGUM3 ...
WITH_GEOIP=yes enables support for GeoIP in suspicion rules.
WITH_DNSBLENV=yes enables the compilation of the dnsblenv module.
WITH_UCSPI2SOCKET=yes enables the compilation of the ucspi2socket module.
In greylite ≥ 3.0 the backend for storing data can be chosen. By default, SQLite is used. The following can be specified for changing this:
run filefrom lifewithqmail.org is used as example). Edit /var/service/qmail-smtp/run and insert the red block:
...
/usr/local/bin/tcpserver -v -R -l "$LOCAL" \
-x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/usr/local/bin/greylite /var/qmail/bin/qmail-smtpd 2>&1
then restart the service:
svc -t /var/service/qmail-smtp
transparentas long as the GREYLIST environment variable is not set, that is, it passes the control to
qmail-smtpdwithout doing anything. The GREYLIST variable can be set from the CDB file. Edit the /etc/tcp.smtp file and insert the red block:
...
:allow,GREYLIST=""
don't forget to regenerate the rules file:
cat /etc/tcp.smtp | tcprules /etc/smtp.cdb /tmp/tmprulesfile.cdb(or use make, if the Makefile is available).
Done.