Web-o-Trust and sendmail

whitelisting using sendmail

To use a whitelist with sendmail, you must edit your m4 configuration file, and create a dnswl.m4 (also included in-lin below). If you're currently using any DNSBLs, you must whitelist first. Locate the topmost dnsbl line in your m4 file, and insert your whitelist in front of it. For example:

FEATURE(dnswl,`cabal.web-o-trust.org')
FEATURE(dnsbl,`dnsbl.njabl.org',`Message from $&{client_addr} rejected - see http://njabl.org/lookup?$&{client_addr}')

dnswl.m4 follows:

divert(-1)
#
# Jon Lewis <jlewis@lewis.org>
#
# experimental dnswl m4
#
divert(0)
VERSIONID($Id: dnswl.m4,v 1.0 2002/12/01 Exp $')
divert(8)
# DNS based IP address whitelist _ARG_
R$*                     $: $&{client_addr}
R::ffff:$-.$-.$-.$-     $: <?> $(host $4.$3.$2.$1._ARG_. $: NotFound $)
R$-.$-.$-.$-            $: <?> $(host $4.$3.$2.$1._ARG_. $: NotFound $)
R<?>NotFound            $: OKSOFAR
R<?>$+                  $@ <OK>
divert(-1)

Jon Lewis contributed these instructions, which I edited for this site.


Russell Nelson
Last modified: Tue Nov 11 14:54:48 EST 2003