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

2018-12-16 Thread Marco Emilio Poleggi
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 
wrote:
> Control: tags -1 + moreinfo upstream
> 
> Hi,
> 
> On 19:45 Wed 18 Jul , Graham Cobb wrote:
> > 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@'.
> 
> Thanks for the report! The default was changed in 2.3.4 to expand to 
> postmaster@ if %d is empty. Can you check if it works for you 
> so that I can close the bug?
> 
> Thanks,
> Apollon
> 
> 

-- 
**
#!·p·r·o·f·e·s·s·i·o·n·a·l·*·e·t·h·0·s
**
Marco Emilio Poleggi
10 Rue Cavour
1203 Genève
Suisse
**
 Tél. +41 79 697 71 91
www.professional-eth0s.com



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

2018-11-25 Thread Apollon Oikonomopoulos
Control: tags -1 + moreinfo upstream

Hi,

On 19:45 Wed 18 Jul , Graham Cobb wrote:
> 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@'.

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

Thanks,
Apollon



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

2018-07-18 Thread Graham Cobb
Package: dovecot-sieve
Version: 1:2.3.2.1-1
Severity: normal

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.




-- Package-specific info:

dovecot configuration
-
# 2.3.2.1 (0719df592): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.2 ()
# OS: Linux 4.15.0-2-amd64 x86_64 Debian buster/sid 
# Hostname: black.home.cobb.me.uk
protocol lmtp {
  mail_plugins = " sieve"
}
protocol lda {
  mail_plugins = " sieve"
}

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IE.utf8, LC_CTYPE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_IE.utf8), LANGUAGE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL set to 
en_IE.utf8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dovecot-sieve depends on:
ii  dovecot-core  1:2.3.2.1-1
ii  libc6 2.27-3
ii  ucf   3.0038

dovecot-sieve recommends no packages.

dovecot-sieve suggests no packages.

Versions of packages dovecot-sieve is related to:
ii  dovecot-core [dovecot-common]  1:2.3.2.1-1
pn  dovecot-dev
pn  dovecot-gssapi 
ii  dovecot-imapd  1:2.3.2.1-1
pn  dovecot-ldap   
pn  dovecot-lmtpd  
pn  dovecot-managesieved   
pn  dovecot-mysql  
pn  dovecot-pgsql  
pn  dovecot-pop3d  
ii  dovecot-sieve  1:2.3.2.1-1
pn  dovecot-sqlite 

-- no debconf information