Bug#933231: exim4-base: /etc/cron.daily/exim4-base can't detect hostname via hostname --fqdn

Christian Garbs mitch at cgarbs.de
Wed Jul 31 21:11:27 BST 2019


On Sun, Jul 28, 2019 at 02:08:20PM +0200, Andreas Metzler wrote:
> On 2019-07-27 Christian Garbs <mitch at cgarbs.de> wrote:
> > Package: exim4-base
> > Version: 4.92-8+deb10u1
> > Severity: normal
> > Tags: ipv6
> 
> > After the update from Stretch to Buster, on one of my systems
> > /etc/cron.daily/exim4-base failed on every run with just
> 
> > hostname: Name or service not known
> 
> > as an error message.
> 
> > I could trace this to the usage of "hostname --fqdn" in the script.

[...]

> > Is there another way to get a proper hostname, perhaps from Exim
> > or the Exim configuration, that can be used in /etc/cron.daily/exim4-base
> > instead of calling "hostname --fqdn"?
> 
> There is
> /usr/sbin/exim4 -bP primary_hostname
> or
> /usr/sbin/exim4 -be '${primary_hostname}'
> 
> How about the attached patch?

Hello Andreas,

the patch looks good!

The fallback to hostname without any parameters is a nice touch – if
the admin can keep his systems apart, everything is ok, no need for
any flags ;-)


I have applied the patch against the original /etc/cron.daily/exim4-base
from Buster and deployed it to three systems (the one that showed the
bug plus two unaffected others):  Everything works as expected.

Please apply the patch to the next version.

Thanks for the quick reply and patch!
Christian
-- 
....Christian.Garbs....................................https://www.cgarbs.de

A truly wise man never plays leapfrog with a unicorn.



More information about the Pkg-exim4-maintainers mailing list