divert(-1) # # Copyright (c) 2003, 2004 Victor Ustugov # This hack is under BSD License # Redistributions of source code must retain the above copyright notice # # hacks disscussion's maillist - http://www.mta.org.ua/mailman/listinfo/sendmail-conf # # # Check domain part of MAIL FROM field # Проверка доменной части MAIL FROM # dnl # проверка A записи доменной части MAIL FROM dnl # реализована с целью борьбы с разрешением имен несуществующих доменов в зонах .net и .com dnl # dnl # FromDomainA:64.94.110.11 REJECT 5.7.1 Domain of sender address possible does not exist dnl # divert(0) VERSIONID(`$Id: check_mail_from_domain.m4,v 8.12-0.03 2004/07/23 15:01:57 corvax Exp $')dnl divert(-1) dnl dnl LOCAL_RULESETS dnl dnl SLocal_check_mail dnl # R $* $: $>Parse0 $>3 $1 R $* $: $1 $| $>check_domain_A_record $1 R $* $| $#$* $#$2 R $* $| $* $: $1 Scheck_domain_A_record R $* $: $1 R $* < @ $+ . > $: $2 R $* < @ $+ > $: $2 R $* @ $+ $: $2 R $+ $: <$(dns_a $1 $: ? $)> R $@ SKIP R <$-.$-.$-.$-.> $: $(access FromDomainA:$1.$2.$3.$4 $: OK $) R OK $@ OK R $={Accept} $@ ACCEPT R REJECT $#error $@ 5.7.1 $: "550 Access denied" R REJECT:$+ $#error $: $1 R REJECT $+ $#error $: $1 R DISCARD $* $#discard $: discard R ERROR:$-.$-.$-:$+ $#error $@ $1.$2.$3 $: $4 R ERROR:$+ $#error $: $1 dnl