Bug#1039704: Sendmail does not notice when /etc/resolv.conf changes
On Wed, 28 Jun 2023 12:13:07 + Alain Knaff wrote: > Package: sendmail-base > Version: 8.17.1.9-2 > > As far as I understood, since Debian 12, isc-dhcp-client is > considered obsolete, and dhcpcd is recommended instead. > > However, dhcpcd appears to be slightly slower, with the result that > on startup sendmail sees an empty /etc/resolv.conf file. Please check how network is handled. Sendmail must be started after all networking stuff is set up. Maybe check the discussing about moving from sysvinit startscripts to systemd, so relevant parts can be included in the systemd unit. > Apparently, sendmail only reads this file once at startup (and on > reload), meaning that it won't be able to process outbound mails, as > it can't look any domain names up. How is nsswitch.conf set? Is a caching server like systemd-resolve or dnsmasq active? Is nscd being used? Maybe ask in newsgroup comp.mail.sendmail how sendmail handles DNS lookups (does it really look up the resolv.conf or does it use glibc?). From the sendmail 4th edition: |But even if your sendmail binary supports DNS, site configuration |might not. If your host supports a service-switch file, for instance, |make sure that file lists dns as the method used to fetch information |about hosts. For met it looks like it doesn't directly read resolv.conf, so it might be a general DNS problem on your system. > There actually *is* a /usr/share/sendmail/dynamic script meant to > reload sendmail when the network changes (i.e. nameservers become > available), but unfortunately it only leaves 2 choices: > 1. DAEMON_NETMODE="Static" => do not reload sendmail on network > change > > 2. DAEMON_NETMODE="Dynamic" => recompile the entire configuration, > and reload sendmail on network change > > Not only is Static the default (which means that people having newly > upgraded to Debian 12 might miss it), but Dynamic is over the top (we > don't need a complete recompilation of the configuration: it never > mentions the server's anywhere) Can you change it and provide a patch? -- Gruß Marco Moock
Bug#1039704: Sendmail does not notice when /etc/resolv.conf changes
Package: sendmail-base Version: 8.17.1.9-2 Hi, As far as I understood, since Debian 12, isc-dhcp-client is considered obsolete, and dhcpcd is recommended instead. However, dhcpcd appears to be slightly slower, with the result that on startup sendmail sees an empty /etc/resolv.conf file. Apparently, sendmail only reads this file once at startup (and on reload), meaning that it won't be able to process outbound mails, as it can't look any domain names up. There actually *is* a /usr/share/sendmail/dynamic script meant to reload sendmail when the network changes (i.e. nameservers become available), but unfortunately it only leaves 2 choices: 1. DAEMON_NETMODE="Static" => do not reload sendmail on network change 2. DAEMON_NETMODE="Dynamic" => recompile the entire configuration, and reload sendmail on network change Not only is Static the default (which means that people having newly upgraded to Debian 12 might miss it), but Dynamic is over the top (we don't need a complete recompilation of the configuration: it never mentions the server's anywhere) So could we have a "Semi-Dynamic" setting instead, which would be the default after upgrade, and which would only do the reload, without preceding config recompilation? Thanks, Alain -- Alain Knaff Ingénieur Informaticien LE GOUVERNEMENT DU GRAND-DUCHÉ DE LUXEMBOURG Ministère de l'Environnement, du Climat et du Développement durable Administration de l'environnement 1, avenue du Rock'n'Roll . L-4361 Esch-sur-Alzette Tél. (+352) 40 56 56-309 E-Mail: alain.kn...@aev.etat.lu www.emwelt.lu . www.environnement.public.lu . www.luxembourg.lu