Package: dovecot-core
Version: 1:2.3.21+dfsg1-3+b1
Severity: normal

Dear Maintainer,

when the Dovecot configuration contains an `!include` statement with a
wildcard that does not match anything, dovecot prints an error and
terminates.

Expected behaviour: Dovecot processes the configuration as if the
`!include` statement was not present.

The upstream on-line documentation [0] says on `!include`:
> It’s not an error if wildcards don’t result in any matching files.

[0] 
<https://doc.dovecot.org/configuration_manual/config_file/#including-config-files>

Steps to reproduce:

  mkdir dir
  printf '%s\n' '!include dir/*.conf' > dovecot.conf
  dovecot -Fc dovecot.conf
  doveconf -c dovecot.conf

Output of `dovecot -Fc doveconf.conf`:

  doveconf: Fatal: Error in configuration file dovecot.conf line 1: No matches

Output of `doveconf -c dovecot.conf`:

  # 2.3.21 (47349e2482): dovecot.conf
  # Pigeonhole version 0.5.21 (f6cd4b8e)
  doveconf: Fatal: Error in configuration file dovecot.conf line 1: No matches

Workaround 1:
 * Create an empty dummy configuration file in `dir/`.

Workaround 2:
 * Use `!include_try` instead.
   * Unlike `!include`, this also silently ignores read errors.

Possibly related upstream mailing list thread:
 * 
<https://dovecot.org/mailman3/hyperkitty/list/[email protected]/message/S52QEUHS2T6G3FGAYYXIE32YAP7NYGT2/>
 * 
<https://dovecot.org/mailman3/hyperkitty/list/[email protected]/message/BUSWILJK4DMCZ3NXWYOEWH2ZR2NTEFLA/>

-- Package-specific info:

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.9-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dovecot-core depends on:
ii  adduser              3.137
ii  init-system-helpers  1.66
ii  libapparmor1         3.0.13-2
ii  libbz2-1.0           1.0.8-5.1
ii  libc6                2.37-15.1
ii  libcap2              1:2.66-5
ii  libcrypt1            1:4.4.36-4
ii  libexttextcat-2.0-0  3.4.7-1
ii  libicu72             72.1-4+b1
ii  liblua5.4-0          5.4.6-3+b1
ii  liblz4-1             1.9.4-2
ii  liblzma5             5.6.1+really5.4.5-1
ii  libpam-runtime       1.5.3-6
ii  libpam0g             1.5.3-6
ii  libsodium23          1.0.18-1
ii  libssl3t64           3.2.1-3
ii  libstemmer0d         2.2.0-4+b1
ii  libsystemd0          255.4-1+b1
ii  libtirpc3t64         1.3.4+ds-1.2
ii  libunwind8           1.6.2-3
ii  libwrap0             7.6.q-33
ii  libzstd1             1.5.5+dfsg2-2
ii  openssl              3.2.1-3
ii  ssl-cert             1.1.2
ii  ucf                  3.0043+nmu1
ii  zlib1g               1:1.3.dfsg-3.1

dovecot-core recommends no packages.

Versions of packages dovecot-core suggests:
pn  dovecot-gssapi        <none>
pn  dovecot-imapd         <none>
pn  dovecot-ldap          <none>
pn  dovecot-lmtpd         <none>
pn  dovecot-managesieved  <none>
pn  dovecot-mysql         <none>
pn  dovecot-pgsql         <none>
pn  dovecot-pop3d         <none>
pn  dovecot-sieve         <none>
pn  dovecot-solr          <none>
pn  dovecot-sqlite        <none>
pn  dovecot-submissiond   <none>
pn  ntp                   <none>

Versions of packages dovecot-core is related to:
ii  dovecot-core [dovecot-common]  1:2.3.21+dfsg1-3+b1
pn  dovecot-dev                    <none>
pn  dovecot-gssapi                 <none>
pn  dovecot-imapd                  <none>
pn  dovecot-ldap                   <none>
pn  dovecot-lmtpd                  <none>
pn  dovecot-managesieved           <none>
pn  dovecot-mysql                  <none>
pn  dovecot-pgsql                  <none>
pn  dovecot-pop3d                  <none>
pn  dovecot-sieve                  <none>
pn  dovecot-sqlite                 <none>

-- no debconf information

Reply via email to