Prev | Current Page 1588 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"

$+.$+.$+ $: $(rlookup $4.$3.$2.$1.in-addr.arpa. $)
R $* . FOUND $# OK
R $* $#error $@ 4.1.8 $: "450 cannot resolve " $&{client_addr}
Here, under the LOCAL_CONFIG, we declare a dns-type database called rlookup. Th e-RPTR
specifies that we will be looking up PTR (address) records. The -a.FOUND instructs sendmail
to append a literal .FOUND to the value returned by a successful lookup. Finally, the -d5s
and -r2 switches prevent the lookup from hanging for too long an interval.
The actual rules are under the LOCAL_RULESETS section of your mc configuration file.
We place the rules under the Local_check_relay rule set (?§7.1.1 on page 252), which is
used to screen incoming network connections and accept or reject them based on the hostname,
domain, or IP address. The first rule matches everything and simply copies the value
of the ${client_addr} macro into the workspace. That macro contains the connecting
host??™s IP address.
The second rule checks to see whether the IP address is an IPv6 address (the IPv6: prefix) and
if so, accepts the address (the $#OK). If the address is a normal dotted-quad, IPv4-style address
(such as 123.45.67.8), the third rule finds it in the workspace. An IPv4 address is looked up in
the RHS of the third rule using the rlookup database. The key point here is that an address
has to look like a hostname, so we reverse it and add a literal .


Pages:
1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600
doktorat lampy ogrodowe określić zakłady bukmacherskie Wczasy nad morzem