1N/Adivert(-1)
1N/A#
1N/A# Copyright (c) 2000-2002, 2005-2007 Sendmail, Inc. and its suppliers.
1N/A# All rights reserved.
1N/A#
1N/A# By using this file, you agree to the terms and conditions set
1N/A# forth in the LICENSE file which can be found at the top level of
1N/A# the sendmail distribution.
1N/A#
1N/A# ident "%Z%%M% %I% %E% SMI"
1N/A#
1N/A
1N/Aifelse(defn(`_ARG_'), `',
1N/A `errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')')
1N/Adivert(0)
1N/Aifdef(`_EDNSBL_R_',`dnl',`dnl
1N/AVERSIONID(`$Id: enhdnsbl.m4,v 1.12 2007/01/08 18:22:05 ca Exp $')
1N/ALOCAL_CONFIG
1N/Adefine(`_EDNSBL_R_',`')dnl
1N/A# map for enhanced DNS based blacklist lookups
1N/AKednsbl dns -R A -a. -T<TMP> -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5')
1N/A')
1N/Adivert(-1)
1N/Adefine(`_EDNSBL_SRV_', `_ARG_')dnl
1N/Adefine(`_EDNSBL_MSG_',
1N/A `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_EDNSBL_SRV_`"',
1N/A X`'_ARG2_,`Xquarantine',`_EDNSBL_SRV_',
1N/A `_ARG2_')')dnl
1N/Adefine(`_EDNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_EDNSBL_SRV_`"',`_ARG3_')')dnl
1N/Adefine(`_EDNSBL_MATCH_', `ifelse(len(X`'_ARG4_),`1',`$`'+',_ARG4_)')dnl
1N/Adefine(`_EDNSBL_ACTION_',
1N/A `ifelse(X`'_ARG2_,`Xquarantine',`$`'#error $`'@ quarantine',
1N/A X`'_ARG2_,`Xdiscard',`$`'#discard',
1N/A `$`'#error $`'@ 5.7.1')')dnl
1N/Adivert(8)
1N/A# DNS based IP address spam list _EDNSBL_SRV_
1N/AR$* $: $&{client_addr}
1N/AR$-.$-.$-.$- $: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $)
1N/AR<?>OK $: OKSOFAR
1N/Aifelse(len(X`'_ARG3_),`1',
1N/A`R<?>$+<TMP> $: TMPOK',
1N/A`R<?>$+<TMP> $#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_')
1N/AR<?>_EDNSBL_MATCH_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_
1N/Aifelse(len(X`'_ARG5_),`1',`dnl',
1N/A`R<?>_ARG5_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
1N/Aifelse(len(X`'_ARG6_),`1',`dnl',
1N/A`R<?>_ARG6_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
1N/Aifelse(len(X`'_ARG7_),`1',`dnl',
1N/A`R<?>_ARG7_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
1N/Aifelse(len(X`'_ARG8_),`1',`dnl',
1N/A`R<?>_ARG8_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
1N/Aifelse(len(X`'_ARG9_),`1',`dnl',
1N/A`R<?>_ARG9_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
1N/Adivert(-1)