Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2023 23:53:56 -0400
From:      "Dan Mahoney (Ports)" <freebsd@gushi.org>
To:        vagabond <vagabond@blackfoot.net>
Cc:        Dewayne <dewayne@heuristicsystems.com.au>, questions@freebsd.org
Subject:   Re: sendmail error, "MX list for mydomain.com points back to server.mydomain.com"
Message-ID:  <A118A90A-14E6-409B-AC25-FE2704A19741@gushi.org>
In-Reply-To: <30b97aa95162c163c1781ba1a0fa8e25@blackfoot.net>
References:  <303e35e4d89e68dcd9863239dcda568e@blackfoot.net> <fc362386-aabd-618f-4dcd-9be14dbe89a5@heuristicsystems.com.au> <30b97aa95162c163c1781ba1a0fa8e25@blackfoot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
First, don=E2=80=99t obscure your domain when you=E2=80=99re trying to =
show DNS lookups, it really doesn=E2=80=99t help people trying to help =
you.  If you need more help and feel shy, feel free to contact me =
offlist.

Second, the =E2=80=9Cmail loops back to me=E2=80=9D error means =
something handed you a piece of mail, ostensibly because your system is =
the lowest MX host, but your system doesn=E2=80=99t know it=E2=80=99s =
the termination point for it.

What do you have in /etc/mail/local-host-names?  Are you using the stock =
freebsd.mc or sendmail.mc or whatever came with the system?  The stock =
file has:

define(`confCW_FILE', `-o /etc/mail/local-host-names=E2=80=99), but in =
long-ago sendmail this file was called sendmail.cw.

All variants of domains you accept mail for should be in =
/etc/mail/local-host-names, and if you want to map separately for each =
domain, you need to set up a virtusertable.

-Dan
(Dayjob: A DNS company you=E2=80=99ve heard of.  Also, been running =
sendmail in production for 20 years).

> On May 17, 2023, at 8:12 PM, vagabond <vagabond@blackfoot.net> wrote:
>=20
>> Do you have a "sendmail -bd" running?
>=20
> Yes.
>=20
> I tried turning on -d8.10 and got the following output at startup,
> which I can't interpret...
>=20
> ;; 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 =3D AAAA, class =3D IN
> ;; Querying server (# 1) address =3D 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 =3D AAAA, class =3D IN
> mydomain.com.        10M IN SOA      ns.mydomain.com. =
root.mydomain.com. (
>                                        2023051706      ; serial
>                                        4H              ; refresh
>                                        1H              ; retry
>                                        1H              ; expiry
>                                        10M )           ; minimum
>=20
> ;; rcode =3D (NOERROR), counts =3D 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 =3D AAAA, class =3D IN
> ;; Querying server (# 1) address =3D 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 =3D AAAA, class =3D IN
> mydomain.com.        10M IN SOA      ns.mydomain.com. =
root.mydomain.com. (
>                                        2023051706      ; serial
>                                        4H              ; refresh
>                                        1H              ; retry
>                                        1H              ; expiry
>                                        10M )           ; minimum
>=20
> ;; rcode =3D (NXDOMAIN), counts =3D an:0 ns:1 ar:0
> res_nsearch failed (-1)
> _res.options =3D 800012c3, HasWildcardMX =3D 0
>=20
> 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.
>=20
> 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.
>=20
> Can anyone tell me / point me to how to build sendmail from the code =
in
> /usr/src/contrib/sendmail ?
>=20
> Thanks,
>=20
> Gary
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A118A90A-14E6-409B-AC25-FE2704A19741>