This page is no longer maintained. Please use www.Sendmail.org instead!
check_relay
too.
You need
a patch
for sendmail 8.8.5 to make this work (it's fixed in later versions).
# Database definition Kjunk btree /etc/mail/junkThe map is the same as for check_mail and looks like the following:
D.X.Y.Z IP C.X.Y IP B.X IP A IP(full IP numbers, class C, B, or A nets)
SjunkIP # lookup IP in database # full IP address R$-.$-.$-.$- $: $(junk $1.$2.$3.$4 $) # class C net R$-.$-.$-.$- $: $(junk $1.$2.$3 $: $1.$2.$3.$4 $) # class B net R$-.$-.$-.$- $: $(junk $1.$2 $: $1.$2.$3.$4 $) # class A net R$-.$-.$-.$- $: $(junk $1 $: $1.$2.$3.$4 $) Scheck_relay # check IP R$+ $| $+ $: $1 $| $>junkIP $2 R$+ $| IP $#error $@ 5.7.1 $: "no access from your IP" # check hostname R$+ $| $+ $: $>junk <@$1> R$*<@$*JUNK>$* $#error $@ 5.7.1 $: "no access from this host"You also need the
junk
ruleset from
check_mail
.
All of these rulesets are included in the
check.tar
file as HACKs for use in your
.mc
file.