#904042 dovecot-sieve: Failed to initialize script execution: Invalid postmaster_address

Package:
dovecot-sieve
Source:
dovecot
Description:
secure POP3/IMAP server - Sieve filters support
Submitter:
Graham Cobb
Date:
2018-12-16 20:39:03 UTC
Severity:
normal
#904042#5
Date:
2018-07-18 18:45:46 UTC
From:
To:
I recently upgraded dovecot and it now fails to start sieve processing. syslog contains:

Error: sieve: Failed to initialize script execution: Invalid postmaster_address: invalid address `postmaster@' specified for the postmaster_address setting

The problem appears to be that the default dovecot configuration (/etc/dovecot/conf.d/15-lda.conf)
allows the postmaster_address setting to default. The default value is postmaster@%d.
Unfortunately in some contexts the domain (%d) is not known and so the postmaster_address
ends up with the invalid value 'postmaster@'.

This seems to have been the case for some time but does not seem to have caused any noticeable problems (for me, at least).
However, a recent change to dovecot-sieve seems to insist on validating that address when initialising sieve processing.
This causes sieve to fail, with the error shown above, even when the postmaster_address setting will not actually be used.
No sieve scripts at all are run, whether they rely on that setting or not.

Note: in my case, sieve is being called from dovecot-lda, which is handling local delivery.

The workround is to manually configure postmaster_address.

Personally I doubt the wisdom of the new validation, as it never seems to have caused a problem before.
I don't know if it can be removed, or if the code can be improved to correctly detect the domain in more cases.

But as this breaks all sieve scripts after a debian upgrade to this version please consider one or more of the following:

1) Add a NEWS item warning that the postmaster_address setting in /etc/dovecot/conf.d/15-lda.conf must be modified to specify
the domain explicitly.

2) Do magic at upgrade time to fix the setting.

3) For new installations, make sure the setting is specified correctly so that they will be able to start using sieve.

#904042#10
Date:
2018-11-25 18:16:22 UTC
From:
To:
Hi,

Thanks for the report! The default was changed in 2.3.4 to expand to
postmaster@<hostname> if %d is empty. Can you check if it works for you
so that I can close the bug?

Thanks,
Apollon

#904042#17
Date:
2018-12-16 20:37:56 UTC
From:
To:
Hi there,

It doesn't work for me with v2.3.4-2 from testing. I see the logic:

  # doveconf -x postmaster_address
  postmaster_address = postmaster@%{if;%d;ne;;%d;%{hostname}}

but it doesn't expand to full address. Error is the same.

Cheers,

  Marco


On Sun, 25 Nov 2018 20:16:22 +0200 Apollon Oikonomopoulos <apoikos@debian.org> wrote: