#!/bin/sh

# Process blacklists into a usable .db database for exim
# Written by Christoph Lameter <clameter@debian.org> Oct 25, 1997
# modified by Craig Sanders 19971122
# modified by George Bonser <grep@shorelink.com> Dec 1, 1997

source /usr/lib/spamdb/constants

cd $SPAMDB

cat $SPAMDB/SpamDomains | sed -e 's/^/\*\./g' | /usr/sbin/exim_dbmbuild - spamdomains.db

cat $SPAMDB/Spammers | /usr/sbin/exim_dbmbuild - spammers.db

# The /etc/exim.conf should contain the following to enable
# the blacklist
#
# sender_verify = true
# sender_reject = "dbm;/var/spamdb/spammers.db:\
#                  *@partial-dbm;/var/spamdb/spamdomains.db"
# sender_host_reject = "partial-dbm;/var/spamdb/spamdomains.db"
#
# This only works if exim is standalone ... not running under inetd. The
# standard configuration in stable is to put exim under inetd.  To change
# this:
#
# edit /etc/inetd.conf and comment out the line starting with smtp.
# killall -HUP inetd
# exim -bd -q30m
#
# The sender_reject will reject any sender included in spammers.db or any
# envelope sender with a hostname part of the address included in spamdomains.
#
# The sender_host_reject will reject any mail from any host that resolves to
# a hostname in spamdomains regardless of envelope sender.
#
# sender_reject_recipients and sender_host_reject_recipients can be used 
# instead for somewhat different and possibly more effective behavior.
#
# See http://www.exim.org for documentation on these configuration items.

