nslookup times out when type is set to MX
0
votes
1
answer
30
views
In order to send 2FA emails from a PHP web site to myself, I set up an MX record override and created a firewall rule that allows access to the mail server for the destination domain, but when I attempt to send,
sendmail
writes to its log that email is accepted for delivery but never delvers.
To test the DNS name resolution, I run nslookup
and enter type=MX
command, but it always prints:
;; communications error to 10.0.0.1#53: timed out
;; communications error to 10.0.0.1#53: timed out
;; communications error to 10.0.0.1#53: timed out
;; no servers could be reached
When I ping
, telnet
, or curl
, etc, the name resolution by that DNS server works fine. For example, it can install packages from Debian repos.
From that little information about sendmail
, which I was able to absorb, it sounds like all it needs to deliver to admin@example.com
is an MX record for example.com
to point at smtp.example.com
. Correct me if I am wrong. All of these items seem to be in place: there is an MX record for example.com
on my DNS server; it points at smtp.example.com
that also has an A record; I am sending to admin@example.com
; there is a firewall rule that allows the Linux box with sendmail
to resolve names with the DNS server; there is a firewall rule that allows the Linux box with sendmail
to send emails to smtp.example.com
. All of this exists in my LAN and does not need any access to the outside Internet.
How should I troubleshoot the sendmail delivery in this situation?
**EDIT**:
In the mean time I found out the root cause of the failing sendmail
: it prepends whatever email address I use on the command line with the currently logged in user name (without regard to su
), i.e. if my user name is myusername
, then it changes me@mydomain
to myusername@me@mydomain
on the 1st attempt and myusername@mydomain
on the 2nd attempt.
Something is missing from sendmail.mc
, but what is it?
Asked by SuperAl
(151 rep)
Apr 15, 2025, 10:11 PM
Last activity: Apr 15, 2025, 11:09 PM
Last activity: Apr 15, 2025, 11:09 PM