8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sendmail / cf / feature / enhdnsbl.m4
blobb46d265bd9433f87f26b631a630f3bfa54363eb0
1 divert(-1)
3 # Copyright (c) 2000-2002, 2005-2007 Sendmail, Inc. and its suppliers.
4 #       All rights reserved.
6 # By using this file, you agree to the terms and conditions set
7 # forth in the LICENSE file which can be found at the top level of
8 # the sendmail distribution.
10 # ident "%Z%%M% %I%     %E% SMI"
13 ifelse(defn(`_ARG_'), `', 
14         `errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')')
15 divert(0)
16 ifdef(`_EDNSBL_R_',`dnl',`dnl
17 VERSIONID(`$Id: enhdnsbl.m4,v 1.12 2007/01/08 18:22:05 ca Exp $')
18 LOCAL_CONFIG
19 define(`_EDNSBL_R_',`')dnl
20 # map for enhanced DNS based blacklist lookups
21 Kednsbl dns -R A -a. -T<TMP> -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5')
23 divert(-1)
24 define(`_EDNSBL_SRV_', `_ARG_')dnl
25 define(`_EDNSBL_MSG_',
26         `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_EDNSBL_SRV_`"',
27                 X`'_ARG2_,`Xquarantine',`_EDNSBL_SRV_',
28                 `_ARG2_')')dnl
29 define(`_EDNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_EDNSBL_SRV_`"',`_ARG3_')')dnl
30 define(`_EDNSBL_MATCH_', `ifelse(len(X`'_ARG4_),`1',`$`'+',_ARG4_)')dnl
31 define(`_EDNSBL_ACTION_',
32         `ifelse(X`'_ARG2_,`Xquarantine',`$`'#error $`'@ quarantine',
33                 X`'_ARG2_,`Xdiscard',`$`'#discard',
34                 `$`'#error $`'@ 5.7.1')')dnl
35 divert(8)
36 # DNS based IP address spam list _EDNSBL_SRV_
37 R$*                     $: $&{client_addr}
38 R$-.$-.$-.$-            $: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $)
39 R<?>OK                  $: OKSOFAR
40 ifelse(len(X`'_ARG3_),`1',
41 `R<?>$+<TMP>            $: TMPOK',
42 `R<?>$+<TMP>            $#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_')
43 R<?>_EDNSBL_MATCH_      _EDNSBL_ACTION_ $: _EDNSBL_MSG_
44 ifelse(len(X`'_ARG5_),`1',`dnl',
45 `R<?>_ARG5_             _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
46 ifelse(len(X`'_ARG6_),`1',`dnl',
47 `R<?>_ARG6_             _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
48 ifelse(len(X`'_ARG7_),`1',`dnl',
49 `R<?>_ARG7_             _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
50 ifelse(len(X`'_ARG8_),`1',`dnl',
51 `R<?>_ARG8_             _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
52 ifelse(len(X`'_ARG9_),`1',`dnl',
53 `R<?>_ARG9_             _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
54 divert(-1)