140266059SGregory Neil Shapirodivert(-1) 240266059SGregory Neil Shapiro# 35dd76dd0SGregory Neil Shapiro# Copyright (c) 2000-2002, 2005-2007 Proofpoint, Inc. and its suppliers. 440266059SGregory Neil Shapiro# All rights reserved. 540266059SGregory Neil Shapiro# 640266059SGregory Neil Shapiro# By using this file, you agree to the terms and conditions set 740266059SGregory Neil Shapiro# forth in the LICENSE file which can be found at the top level of 840266059SGregory Neil Shapiro# the sendmail distribution. 940266059SGregory Neil Shapiro# 1040266059SGregory Neil Shapiro# 1140266059SGregory Neil Shapiro 12af9557fdSGregory Neil Shapiroifelse(defn(`_ARG_'), `', 13af9557fdSGregory Neil Shapiro `errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')') 1440266059SGregory Neil Shapirodivert(0) 1540266059SGregory Neil Shapiroifdef(`_EDNSBL_R_',`dnl',`dnl 164313cc83SGregory Neil ShapiroVERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013-11-22 20:51:11 ca Exp $') 1740266059SGregory Neil ShapiroLOCAL_CONFIG 1840266059SGregory Neil Shapirodefine(`_EDNSBL_R_',`')dnl 195b0945b5SGregory Neil Shapiro# map for enhanced DNS based blocklist lookups 20*d39bd2c1SGregory Neil ShapiroKednsbl dns -R A -T<TMP> -z -Z32 -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5') 2140266059SGregory Neil Shapiro') 2240266059SGregory Neil Shapirodivert(-1) 23af9557fdSGregory Neil Shapirodefine(`_EDNSBL_SRV_', `_ARG_')dnl 24d0cef73dSGregory Neil Shapirodefine(`_EDNSBL_MSG_', 25d0cef73dSGregory Neil Shapiro `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_EDNSBL_SRV_`"', 26d0cef73dSGregory Neil Shapiro X`'_ARG2_,`Xquarantine',`_EDNSBL_SRV_', 27d0cef73dSGregory Neil Shapiro `_ARG2_')')dnl 2840266059SGregory Neil Shapirodefine(`_EDNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_EDNSBL_SRV_`"',`_ARG3_')')dnl 2940266059SGregory Neil Shapirodefine(`_EDNSBL_MATCH_', `ifelse(len(X`'_ARG4_),`1',`$`'+',_ARG4_)')dnl 30d0cef73dSGregory Neil Shapirodefine(`_EDNSBL_ACTION_', 31d0cef73dSGregory Neil Shapiro `ifelse(X`'_ARG2_,`Xquarantine',`$`'#error $`'@ quarantine', 32d0cef73dSGregory Neil Shapiro X`'_ARG2_,`Xdiscard',`$`'#discard', 33d0cef73dSGregory Neil Shapiro `$`'#error $`'@ 5.7.1')')dnl 3440266059SGregory Neil Shapirodivert(8) 3540266059SGregory Neil Shapiro# DNS based IP address spam list _EDNSBL_SRV_ 3640266059SGregory Neil ShapiroR$* $: $&{client_addr} 3740266059SGregory Neil ShapiroR$-.$-.$-.$- $: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $) 3840266059SGregory Neil ShapiroR<?>OK $: OKSOFAR 3940266059SGregory Neil Shapiroifelse(len(X`'_ARG3_),`1', 4040266059SGregory Neil Shapiro`R<?>$+<TMP> $: TMPOK', 414e4196cbSGregory Neil Shapiro`R<?>$+<TMP> $#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_') 42*d39bd2c1SGregory Neil ShapiroR<?>$* patsubst(_EDNSBL_MATCH_, `\.$', `') $* _EDNSBL_ACTION_ $: _EDNSBL_MSG_ 4340266059SGregory Neil Shapiroifelse(len(X`'_ARG5_),`1',`dnl', 44*d39bd2c1SGregory Neil Shapiro`R<?>$* patsubst(_ARG5_, `\.$', `') $* _EDNSBL_ACTION_ $: _EDNSBL_MSG_') 4540266059SGregory Neil Shapiroifelse(len(X`'_ARG6_),`1',`dnl', 46*d39bd2c1SGregory Neil Shapiro`R<?>$* patsubst(_ARG6_, `\.$', `') $* _EDNSBL_ACTION_ $: _EDNSBL_MSG_') 4740266059SGregory Neil Shapiroifelse(len(X`'_ARG7_),`1',`dnl', 48*d39bd2c1SGregory Neil Shapiro`R<?>$* patsubst(_ARG7_, `\.$', `') $* _EDNSBL_ACTION_ $: _EDNSBL_MSG_') 4940266059SGregory Neil Shapiroifelse(len(X`'_ARG8_),`1',`dnl', 50*d39bd2c1SGregory Neil Shapiro`R<?>$* patsubst(_ARG8_, `\.$', `') $* _EDNSBL_ACTION_ $: _EDNSBL_MSG_') 5140266059SGregory Neil Shapiroifelse(len(X`'_ARG9_),`1',`dnl', 52*d39bd2c1SGregory Neil Shapiro`R<?>$* patsubst(_ARG9_, `\.$', `') $* _EDNSBL_ACTION_ $: _EDNSBL_MSG_') 5340266059SGregory Neil Shapirodivert(-1) 54