[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1039704: Sendmail does not notice when /etc/resolv.conf changes



On Wed, 28 Jun 2023 12:13:07 +0000 Alain Knaff
<Alain.Knaff@aev.etat.lu> 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


Reply to: