Bug#665487: dovecot-managesieved: Error upgrading dovecot with managesieved

2012-09-29 Thread Jaldhar H. Vyas

On Sun, 30 Sep 2012, Gabriel Filion wrote:


great! :)

if you need help in testing the new package, I can try and upgrade to it
to confirm that the problem was solved.



Are you comfortable with building a package from git?  If so you can find
the source at git.debian.org/git/collab-maint/dovecot.git
otherwise let me know and I'll put binary packages up somewhere.


--
Jaldhar H. Vyas 


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#665487: dovecot-managesieved: Error upgrading dovecot with managesieved

2012-09-29 Thread Gabriel Filion
On 2012-09-30 00:46, Jaldhar H. Vyas wrote:
> On Sun, 30 Sep 2012, Gabriel Filion wrote:
> 
>> This bug concerns a somewhat old version (current version in both
>> squeeze-backports and wheezy is 1:2.1.7-2).
>>
>> Also, the package dovecot-managesieved doesn't exist in the squeeze
>> archive. So I can't install the same version as in the original report.
>>
>> Finally, the provided patch does not apply to the current
>> dovecot-managesieved.postrm file, so I marked it as unreproducible.
>>
> 
> Thanks for looking into this.  However the bug reporter was right about
> the underlying problem which is that dovecot restarts prematurely.  This
> is still a concern in the current version.  So in 1:2.1.7-3 which I am
> about to release soon, I aim to solve that problem with dpkg triggers.

great! :)

if you need help in testing the new package, I can try and upgrade to it
to confirm that the problem was solved.

-- 
Gabriel Filion


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#665487: dovecot-managesieved: Error upgrading dovecot with managesieved

2012-09-29 Thread Jaldhar H. Vyas

On Sun, 30 Sep 2012, Gabriel Filion wrote:


This bug concerns a somewhat old version (current version in both
squeeze-backports and wheezy is 1:2.1.7-2).

Also, the package dovecot-managesieved doesn't exist in the squeeze
archive. So I can't install the same version as in the original report.

Finally, the provided patch does not apply to the current
dovecot-managesieved.postrm file, so I marked it as unreproducible.



Thanks for looking into this.  However the bug reporter was right about 
the underlying problem which is that dovecot restarts prematurely.  This 
is still a concern in the current version.  So in 1:2.1.7-3 which I am 
about to release soon, I aim to solve that problem with dpkg triggers.




--
Jaldhar H. Vyas 


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#665487: dovecot-managesieved: Error upgrading dovecot with managesieved

2012-09-29 Thread Gabriel Filion
This bug concerns a somewhat old version (current version in both
squeeze-backports and wheezy is 1:2.1.7-2).

Also, the package dovecot-managesieved doesn't exist in the squeeze
archive. So I can't install the same version as in the original report.

Finally, the provided patch does not apply to the current
dovecot-managesieved.postrm file, so I marked it as unreproducible.

-- 
Gabriel Filion


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#665487: dovecot-managesieved: Error upgrading dovecot with managesieved

2012-08-18 Thread Ivo De Decker
tags 665487 patch
thanks

Hi,

On Sat, Mar 24, 2012 at 05:11:33PM +0100, Laurens Blankers wrote:
> When upgrading dovecot from 2.0.15-1 to 1:2.0.18-1 the configuration failed
> withe errors related to managesieved.

> dpkg: warning: subprocess old post-removal script returned error exit status
> 1

The problem is that the postrm script of each dovecot plugin tries to start
dovecot unconditionally. It should only start dovecot when the plugin was
removed or purged, not when the plugin in being upgraded. In that case, the
postrm will run when the files from the plugin package have been replaced by
the files from the newer version, but you cannot be sure that the files from
dovecot-core will be upgraded at that point.

On upgrade, dovecot will be started by the postinst script of the plugin. By
the time this runs, the version of dovecot-core and dovecot-(plugin) will be
the same (because there is a strict versioned dependency). So there will be no
version mismatch.

The attached (UNTESTED!) patch probably fixes this problem for
dovecot-managesieved.

This problem likely affects the other dovecot plugins with similar maintainer
scripts in the same way.


Cheers,

Ivo


--- dovecot-managesieved.postrm	2012-06-22 06:32:02.0 +0200
+++ dovecot-managesieved.postrm.new	2012-08-19 00:59:42.762939921 +0200
@@ -26,13 +26,13 @@
 
 if [ "$1" = "purge" ] || [ "$1" = "remove" ]; then
 	rm -f /usr/share/dovecot/protocols.d/managesieved.protocol
-fi
 
-if [ -x "/etc/init.d/dovecot" ]; then
-	if [ -x /usr/sbin/invoke-rc.d ] ; then
-		invoke-rc.d dovecot start
-	else
-		/etc/init.d/dovecot start
+	if [ -x "/etc/init.d/dovecot" ]; then
+		if [ -x /usr/sbin/invoke-rc.d ] ; then
+			invoke-rc.d dovecot start
+		else
+			/etc/init.d/dovecot start
+		fi
 	fi
 fi
 


Bug#665487: dovecot-managesieved: Error upgrading dovecot with managesieved

2012-03-24 Thread Laurens Blankers
Package: dovecot-managesieved
Version: 1:2.0.18-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

When upgrading dovecot from 2.0.15-1 to 1:2.0.18-1 the configuration failed 
withe errors related to managesieved.

Here is the relevant output from the 'aptitude safe-upgrade':

-- BEGIN --
Unpacking replacement dovecot-managesieved ...
doveconf: Error: Module is for different version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_login_settings.so
doveconf: Error: Module is for different version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_settings.so
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 9: 
Unknown setting: managesieve_notify_capability
Starting IMAP/POP3 mail server: dovecotdoveconf: Error: Module is for different 
version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_login_settings.so
doveconf: Error: Module is for different version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_settings.so
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 9: 
Unknown setting: managesieve_notify_capability
 failed!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: warning: subprocess old post-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
doveconf: Error: Module is for different version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_login_settings.so
doveconf: Error: Module is for different version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_settings.so
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 9: 
Unknown setting: managesieve_notify_capability
Starting IMAP/POP3 mail server: dovecotdoveconf: Error: Module is for different 
version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_login_settings.so
doveconf: Error: Module is for different version 2.0.18: 
/usr/lib/dovecot/modules/settings/libmanagesieve_settings.so
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 9: 
Unknown setting: managesieve_notify_capability
 failed!
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing 
/var/cache/apt/archives/dovecot-managesieved_1%3a2.0.18-1_i386.deb (--unpack):
 subprocess new post-removal script returned error exit status 1
configured to not write apport reports
[..]
Errors were encountered while processing:
 /var/cache/apt/archives/dovecot-managesieved_1%3a2.0.18-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
[..]
Errors were encountered while processing:
 dovecot-core
 dovecot-sieve
 dovecot-imapd
 dovecot-common
 dovecot-ldap
-- END --

At this point dovecot seems to refuse to start.

After commenting the line 9 in dovecot.conf starting with 
'managesieve_notify_capability' and rerunning safe-upgrade the following errors 
were encountered:

-- BEGIN --
Preparing to replace dovecot-managesieved 1:2.0.15-1 (using 
.../dovecot-managesieved_1%3a2.0.18-1_i386.deb) ...
doveconf: Error: Module is for different version 2.0.15: 
/usr/lib/dovecot/modules/settings/libmanagesieve_login_settings.so
doveconf: Error: Module is for different version 2.0.15: 
/usr/lib/dovecot/modules/settings/libmanagesieve_settings.so
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 10: 
Unknown setting: managesieve_sieve_capability
-- END --

After commenting out line 10 in the configuration file and restarting dovecot 
the mail server worked again.

Relevant lines in dovecot.conf:

9: managesieve_notify_capability = mailto
10 managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date imapflags

Expected outcome: upgrading would have worked without causing dovecot to fail 
to start.

Actual outcome: manual intervention was required to revive dovecot

Classification: grave, because upgrade left dovecot unable to start

Sincerly,

Laurens

-- Package-specific info:

dovecot configuration
-
# 2.0.18: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-1-686-pae i686 Debian wheezy/sid ext3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = Courier-IMAP ready.
mail_location = maildir:/var/mail/%d/%n/Maildir
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave imapflags
namespace {
  inbox = yes
  location = 
  prefix = INBOX.
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-ldap-uid.conf
  driver = ldap
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  sieve_extens