Re: sendmail error, "MX list for mydomain.com points back to server.mydomain.com"

From: vagabond <vagabond_at_blackfoot.net>
Date: Thu, 18 May 2023 00:12:59 UTC
> Do you have a "sendmail -bd" running?

Yes.

I tried turning on -d8.10 and got the following output at startup,
which I can't interpret...

;; res_nquerydomain(ns.mydomain.com, <Nil>, 1, 28)
;; res_query(ns.mydomain.com, 1, 28)
;; res_nmkquery(QUERY, ns.mydomain.com, IN, AAAA)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31693
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;      ns.mydomain.com, type = AAAA, class = IN
;; Querying server (# 1) address = 127.0.0.1
;; new DG socket
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31693
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;;      ns.mydomain.com, type = AAAA, class = IN
mydomain.com.        10M IN SOA      ns.mydomain.com. root.mydomain.com. 
(
                                         2023051706      ; serial
                                         4H              ; refresh
                                         1H              ; retry
                                         1H              ; expiry
                                         10M )           ; minimum

;; rcode = (NOERROR), counts = an:0 ns:1 ar:0
;; res_nquerydomain(ns.mydomain.com, mydomain.com, 1, 28)
;; res_query(ns.mydomain.com.mydomain.com, 1, 28)
;; res_nmkquery(QUERY, ns.mydomain.com.mydomain.com, IN, AAAA)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44741
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;      ns.mydomain.com.mydomain.com, type = AAAA, class = IN
;; Querying server (# 1) address = 127.0.0.1
;; new DG socket
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44741
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;;      ns.mydomain.com.mydomain.com, type = AAAA, class = IN
mydomain.com.        10M IN SOA      ns.mydomain.com. root.mydomain.com. 
(
                                         2023051706      ; serial
                                         4H              ; refresh
                                         1H              ; retry
                                         1H              ; expiry
                                         10M )           ; minimum

;; rcode = (NXDOMAIN), counts = an:0 ns:1 ar:0
res_nsearch failed (-1)
_res.options = 800012c3, HasWildcardMX = 0

I don't understand the 0 answers and NXDOMAIN at all
It's not clear to me where all that is coming from, as strings like 
res_send()
don't seem to appear in the source.

Also, that only prints at startup; apparently it doesn't go through the 
domain.c code
for delivery to a localhost, even though I get that error message back.

Can anyone tell me / point me to how to build sendmail from the code in
/usr/src/contrib/sendmail ?

Thanks,

Gary