Mike Spencer
2024-03-01 02:36:59 UTC
Not limited to Slackware but as a long-time Slackware user, this group
seems more like home to me...
Given sendmail 8.17.1 running as daemon:
/usr/sbin/sendmail -L sm-mta -bd -q25m
/usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
is there a way to query the daemon to learn what nameserver(s) it is
using?
Why do I ask?
AFAICT, unlike some other programs which appear to query
/etc/rsolv.conf each time they use DNS, sendmail reads
/etc/resolv.conf when it starts and stores the IP addresses of
nameservers internally. If /etc/resolv.conf changes, that change is
not noted by sendmail. The result is a prolonged, fruitless attempt
to resolve a hostname from nameservers that will no longer respond to
the request from the then-current net-facing IP address of localhost.
Details
My usual setup is a desktop cabled to a router that is in turn cabled
to a gateway device using ISP "A".
The sendmail daemon's only task is to deliver outgoing mail to a
smarthost with TLS and AUTH.
At times, using wicd, I disconnect from the router and reconnect via
wi-fi, using a cell phone served by ISP "B" as an access point. Wicd
replaces /etc/resolv.conf with one that references the nameservers of
ISP "B". Apps such as a web browser and Usenet news proceed as
expected after the change but sendmail fails to deliver messages to
the remote smarthost.
Restarting sendmail fixes this.
It would be convenient to be able to query the sendmail daemon to see
what it was using as nameservers and avoid a restart if one isn't
needed.
I have the Bat Book but don't find an answer there.
A way to do this or enlightenment of ignorance on my part -- things I
don't know I don't know :-) -- welcome.
seems more like home to me...
Given sendmail 8.17.1 running as daemon:
/usr/sbin/sendmail -L sm-mta -bd -q25m
/usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
is there a way to query the daemon to learn what nameserver(s) it is
using?
Why do I ask?
AFAICT, unlike some other programs which appear to query
/etc/rsolv.conf each time they use DNS, sendmail reads
/etc/resolv.conf when it starts and stores the IP addresses of
nameservers internally. If /etc/resolv.conf changes, that change is
not noted by sendmail. The result is a prolonged, fruitless attempt
to resolve a hostname from nameservers that will no longer respond to
the request from the then-current net-facing IP address of localhost.
Details
My usual setup is a desktop cabled to a router that is in turn cabled
to a gateway device using ISP "A".
The sendmail daemon's only task is to deliver outgoing mail to a
smarthost with TLS and AUTH.
At times, using wicd, I disconnect from the router and reconnect via
wi-fi, using a cell phone served by ISP "B" as an access point. Wicd
replaces /etc/resolv.conf with one that references the nameservers of
ISP "B". Apps such as a web browser and Usenet news proceed as
expected after the change but sendmail fails to deliver messages to
the remote smarthost.
Restarting sendmail fixes this.
It would be convenient to be able to query the sendmail daemon to see
what it was using as nameservers and avoid a restart if one isn't
needed.
I have the Bat Book but don't find an answer there.
A way to do this or enlightenment of ignorance on my part -- things I
don't know I don't know :-) -- welcome.
--
Mike Spencer Nova Scotia, Canada
Mike Spencer Nova Scotia, Canada