Bug#315656: exim4-config: Split config files with names containing full stops silently ignored

Ewan Mellor Ewan Mellor <debian-bug@ewanmellor.org.uk>, 315656@bugs.debian.org
Sat, 25 Jun 2005 10:04:58 +0100


On Fri, Jun 24, 2005 at 07:32:49PM +0200, Andreas Metzler wrote:

> On 2005-06-24 Ewan Mellor <debian-bug@ewanmellor.org.uk> wrote:
> > Package: exim4-config
> > Version: 4.50-8
> > Severity: normal
> 
> > I created a file named
> 
> > /etc/exim4/conf.d/rewrite/20_exim4-config_rewrite-example.com
> 
> > expecting the configuration to be picked up by update-exim4.conf.  However,
> > this file was silently ignored.  update-exim4.conf performs sanitisation 
> > inside run-parts:
> [...]
> > This ignores any files not matching [[:alnum:]_-]+.
> 
> > I presume the check is there for a good reason, but it is certainly too
> > strict.  Having full stops in filenames is not unusual!
> 
> Hello,
> this behavior intentionally mirrors the behavior of run-parts(1) and
> afaict is not going to change. run-parts(1) is used widely in Debian
> and the paradigma that "mv foo foo.something" disables reading the
> file is quite common.

In that case, this ought to be documented.  The best place for this, in the
absence of more formal documentation, would be
/usr/share/doc/exim4-config/README-Debian.gz, in the "What are these gazillion
number of files in /etc/exim4/conf.d?" section.  This section explains the
split configuration, and yet gives no mention of this restriction.

Can I suggest, in place of "Each section of exim's configuration has its own
subdirectory and the files in there are supposed to be read in alphanumeric
order.  router/00_exim4-config_header is followed by
router/100_exim4-config_domain_literal, ..."

we have instead

"Each section of exim's configuration has its own subdirectory and the files
in there are read as if by run-parts(8).  This means that they are handled in
alphanumeric order: router/00_exim4-config_header is followed by
router/100_exim4-config_domain_literal.  It also means that file names may
only contain letters, digits, underscores, and hyphens -- files named any
other way will be ignored.  In particular, files with names containing full
stops, such as 0_exim4-config_header.old, will be ignored."

Cheers,

Ewan.