comparison misc/dccdnsbl.m4 @ 0:c7f6b056b673

First import of vendor version
author Peter Gervai <grin@grin.hu>
date Tue, 10 Mar 2009 13:49:58 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c7f6b056b673
1 divert(-1)
2
3 ############################################################################
4 # NOTICE: Unless your version of sendmail is ancient, use the standard
5 # sendmail `FEATURE(dnsbl)' or `FEATURE(enhdnsbl)' and the hackmc script
6 # in the DCC source instead of this sendmail `FEATURE' file.
7 ############################################################################
8
9
10 # Connect a DNS blacklist such as the RBL+ to the local DCCM daemon and so to
11 # a DCC server to report spam to the DCC database.
12 # The connection is by the sendmail "dcc_isspam" macro
13 #
14 # The first and required argument is the domain name of the DNS blacklist
15 # The second, optional argument is a log and SMTP status/rejection message.
16 #
17 # For example, with the following, mail from SMTP clients on the
18 # relays.mail-abuse.org list would be rejected as well as reported as
19 # extremely bulky to the DCC server:
20 # `FEATURE(dccdnsbl, `zen.spamhaus.org', `"Mail from " $`'&{client_addr} " reject to DCC - see http://www.spamhaus.org/zen/"')'
21 #
22 # (Of course, the outer pair of `' quotes must be removed)
23 #
24 # The `FEATURE(dccdnsbl)' line should be after the `FEATURE(dcc)' line
25 # if the latter is present.
26 #
27 # If you see error messages from sendmail like "map macro not found", check
28 # for the Kmacro definition in cf/m4/proto.m4 and consider the "dnl" comments
29 # below.
30
31 divert(0)
32 VERSIONID(`dccdnsbl.m4 Rhyolite Software DCC 1.3.103-1.18 $Revision$')
33 divert(-1)
34
35 define(`_DCCDNSBL_SRV_', ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',`_ARG_'))
36 define(`_DCCDNSBL_MSG_', ifelse(len(X`'_ARG2_),`1',`"Mail from " $`'&{client_addr} " refused by blackhole site '_DCCDNSBL_SRV_`"',`_ARG2_'))
37
38 dnl Remove the "dnl " strings (including the blanks) from the following 5 lines
39 dnl up to the divert(8) line if your version of sendmail does not include
40 dnl the Kmacro line by default.
41 dnl ifdef(`_DCCDNSBL_DEF_',`dnl',`dnl
42 dnl define(_DCCDNSBL_DEF_, 1)dnl
43 dnl LOCAL_CONFIG
44 dnl `# define macros map to communicate DNS black list results to DCC via dccm'
45 dnl Kmacro macro')
46 divert(8)
47 # DNS based IP address spam list _DCCDNSBL_SRV_ connected to DCCM
48 R$* $: $&{client_addr}
49 R$-.$-.$-.$- $: <?> $(host $4.$3.$2.$1._DCCDNSBL_SRV_. $: OK $)
50 R<?>OK $: OKSOFAR
51 R<?>$+<TMP> $: TMPOK
52 R<?>$+ $@ $(macro {dcc_isspam} $@ _DCCDNSBL_MSG_ $) TODCC
53 divert(-1)
54
55 ifdef(`_DCC_DEF_',`',`FEATURE(`dcc')')dnl