User Tools

Site Tools


archive:freebsd_install_spamdyke

How To Install Spamdyke On FreeBSD

Spamdyke is a filter for monitoring and intercepting SMTP connections between a remote host and a qmail server. Spam is blocked while the remote server (spammer) is still connected.

cd /usr/ports/mail/spamdyke && make WITH="DEBUG" install clean

When the option screen pops up just hit ok.

Next edit the configuration file in order to enable logging.

vi /usr/local/etc/spamdyke.conf

Change the following lines.

#log-level=VALUE
#log-target=VALUE

Remove the # and change it to the following values looking like this.

log-level=verbose
log-target=stderr

Optional Start

You can log everything as well to a user specified folder be warned though this make take up quite some amount of disk space.

First create a folder to hold the logfiles and set the right permissions.

mkdir /var/log/spamdyke
chown -R qmaild:wheel /var/log/spamdyke

We need to modify the configfile for Spamdyke.

vi /usr/local/etc/spamdyke.conf

Next change the following line. in the Spamdyke config file to this.

#full-log-dir=DIR

To something like this.

full-log-dir=/var/log/spamdyke

Optional Stop

Now we need to enable spamdyke in the qmail-smtpd run file.

vi /service/qmail-smtpd/run

Find this line and remove the # so it looks like below in order to enable spamdyke.

RBLCMD2="/usr/local/bin/spamdyke -f /usr/local/etc/spamdyke.conf"

And finally restart qmail's smtpd service.

svc -t /service/qmail-smtpd

A final check if qmail-smtpd is running as intended and we are done.

svstat /service/qmail-smtpd

You should get and output similiar like the one below.

/service/qmail-smtpd: up (pid 99430) 12 seconds

For more information regarding spamdyke please see their website: Spamdyke official site

archive/freebsd_install_spamdyke.txt · Last modified: 24/11/2023 12:33 by Allan