######################################################################
###
check_mail -- check SMTP `MAIL FROM:' command
argument
######################################################################
#
for bad-HELO
F{bh}/etc/mail/top-level-domain
Kipadr regex
-aFOUND [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}
SLocal_check_mail
R$* $:$1 $| <$&{auth_authen}>
R$* $| <$+> $:$1
R$* $| <$*> $:$1 $|
<[$&{client_addr}]>[$&s]
R$* $| <$=w>[$*]
$:$1
R$* $| <[0]>[$*] $:$1
R$* $| <[$-.$-.$-.$-]>[$*]
$:$1 $| <$( access $2.$3.$4.$5 $:[$2.$3.$4] $)>[$6]
R$* $|
<RELAY>[$*] $:$1
R$* $| <[$-.$-.$-]>[$*] $:$1 $| <$(
access $2.$3.$4 $:[$2.$3] $)>[$5]
R$* $| <RELAY>[$*]
$:$1
R$* $| <[$-.$-]>[$*] $:$1 $| <$( access $2.$3
$:[$2] $)>[$4]
R$* $| <RELAY>[$*] $:$1
R$* $|
<[$-]>[$*] $:$1 $| <$( access $2 $:[$2] $)>[$3]
R$*
$| <RELAY>[$*] $:$1
R$* $| <[$*]> $=w $#error $@5.7.1
$:"550 Access denied - bogus HELO " $&s
R$* $|
<[$*]> [$=w] $#error $@5.7.1 $:"550 Access denied - bogus
HELO " $&s
R$* $| <[$*]> [[127.$-.$-.$-]] $#error
$@5.7.1 $:"550 Access denied - bogus HELO " $&s
R$*
$| <[$*]> [[10.$-.$-.$-]] $#error $@5.7.1 $:"550 Access
denied - bogus HELO " $&s
R$* $| <[$*]>
[[172.$-.$-.$-]] $#error $@5.7.1 $:"550 Access denied - bogus
HELO " $&s
R$* $| <[$*]> [[192.168.$-.$-]] $#error
$@5.7.1 $:"550 Access denied - bogus HELO " $&s
R$*
$| <[$*]> [[$+]] $:$1 $| <[$2]> [[ $( ipadr $3 $) ]]
R$*
$| <[$*]> [[FOUND]] $:$1
R$* $| <[$*]> [$+.$={bh}]
$:$1
R$* $| <[$*]> [$*] $#error $@5.7.1 $:"550 Access
denied - bogus HELO " $&s
Scheckmail
R$*
$: $1 $| $>"Local_check_mail" $1
R$* $| $#$* $#$2
R$*
$| $* $@ $>"Basic_check_mail" $1
SBasic_check_mail
#
check for deferred delivery mode
R$* $: < $&{deliveryMode}
> $1
R< d > $* $@ deferred
R< $* > $* $: $2
Жирным сам кусок отвечающий за проверку bad-helo, остальное чтоб сориентироваться в /etc/sendmail.cf куда вставить. ищем по ключу Local_check_mail.
Разделители между первым и вторым столбцом НЕ ПРОБЕЛЫ а Tab ы. наставить их можно сколько угодно