From: DT on
Hello,
In mr Allman's and Costales's sendmail 4th edition ( paragraph
23.7.11.22, page 922) it's mentioned, that

[...] Otherwise, the first database map, the ldapmh, looks up the
attribute mailLocalAddress, and if the value
following that item matches, it looks for the attribute mailHost. If
that attribute is found, it
returns that field’s value. The second database map, the ldapmra, also
looks up the attribute
mailLocalAddress, and if the value following that item matches, it
looks for the attribute
mailRoutingAddress. If that is found, it returns that field’s value.
[...]

While in proto.m4 ( line 1463 ) of 8.14.3 and 1465 of 8.14.4
( original source distribution)
root(a)local:/usr/share/sendmail/cf/m4# grep -n ldapmh /usr/share/
sendmail/cf/m4/proto.m4
1463:R<$+><$+><$*> $: <$(ldapmra $2 $: $)> <$(ldapmh $2 $: $)> <
$1> <$2> <$3>
root(a)local:/usr/share/sendmail/cf/m4#

and then sendmail.cf generated, and then ldap search lookups ( checked
with openldap connection
debugging ), ldap mail routing is checked first (then, additionally,
if `nodomain' option is empty,
domains of address in the same order. I even checked, that I did not
replaced order of map
definition in my sendmail.mc, until quick look into proto.m4 quote
explained me this issue.

This is strange, because I'd bet it was opposite order in some
previous version, I didn't notice
when it got changed, a book probably needs correction in this chapter,
especially regarding
final mailHost / mailRoutingAddress found/not-found behaviour, if the
order changes behaviour
with such context.

Regards,
DT