1 (edited by aniyan.rajan6 2013-10-18 19:24:07)

Topic: Upgrade

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: Debian/Wheezy
- Related log if you're reporting an issue:
====

Hello Zhang,

I was upgrading my server from Debian/Squeeze to Debian/Wheezy.

apt-get dist-upgrade did not complete successfully. I got the following output:(1). Then I tried again and got the following output:(2). During the upgrade, I left all the config files unchanged, including the dovecot. Could you please suggest how can I solve this ? Thanks.

(1)
===========================================
Processing triggers for python-central ...
Processing triggers for python-support ...
Errors were encountered while processing:
dovecot-core
dovecot-imapd
dovecot-pop3d
dovecot-common
dovecot-gssapi
dovecot-ldap
dovecot-mysql
dovecot-pgsql
dovecot-sieve
dovecot-sqlite
E: Sub-process /usr/bin/dpkg returned an error code (1)
==================================================

(2)
==================================================
# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
10 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up dovecot-core (1:2.1.7-7) ...
You already have ssl certs for dovecot.
However you should move them out of /etc/ssl
and into /etc/dovecot and update the configuration
in /etc/dovecot/conf.d/10-ssl.conf accordingly.
See /usr/share/doc/dovecot-core/README.Debian.gz for details.
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: protocols=managesieve has been renamed to protocols=sieve
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: 'pop3s' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:54: mail_process_size has been replaced by service { vsz_limit }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:72: login_process_per_connection has been replaced by service { service_count }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:115: ssl_key_file has been replaced by ssl_key = dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: protocols=managesieve has been renamed to protocols=sieve
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: 'pop3s' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:54: mail_process_size has been replaced by service { vsz_limit }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:72: login_process_per_connection has been replaced by service { service_count }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:115: ssl_key_file has been replaced by ssl_key = failed.
dpkg: error processing dovecot-core (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of dovecot-gssapi:
dovecot-gssapi depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-gssapi (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-imapd:
dovecot-imapd depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-imapd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-ldap:
dovecot-ldap depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-ldap (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-mysql:
dovecot-mysql depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-mysql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-pgsql:
dovecot-pgsql depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-pgsql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-pop3d:
dovecot-pop3d depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-pop3d (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-sieve:
dovecot-sieve depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-sieve (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-sqlite:
dovecot-sqlite depends on dovecot-core (= 1:2.1.7-7); however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-sqlite (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-common:
dovecot-common depends on dovecot-core; however:
Package dovecot-core is not configured yet.

dpkg: error processing dovecot-common (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
dovecot-core
dovecot-gssapi
dovecot-imapd
dovecot-ldap
dovecot-mysql
dovecot-pgsql
dovecot-pop3d
dovecot-sieve
dovecot-sqlite
dovecot-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
==================================================

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Upgrade

Debian 6 ships Dovecot-1.2, but Debian 7 ships Dovecot-2.x. Dovecot-2.x changes some parameters, that's why old config file doesn't work after upgrading.

Here's my personal suggestion:

*) BACKUP, BACKUP, BACKUP! Backup everything.
*) Get a working Dovecot-2 config file in a new virtual machine by following this solution: http://www.iredmail.org/forum/topic4493 … tos-5.html
*) Compare Dovecot-2 and old config files, if you have different mailbox locations, sync to Dovecot-2 config file.
*) Remove dovecot packages before upgrading, then install them (dovecot-2.x).
*) Copy the new Dovecot-2 config file (generated by following above steps) to right place, then try to start Dovecot service and monitor its log file to make sure everything is ok.

3 (edited by aniyan.rajan6 2013-10-18 22:37:35)

Re: Upgrade

Zhang,

I have taken a backup of the entire server already.

I didn't set up a new virtual machine, but copied the sample dovecot2.conf from the URL. I made the changes as specified in the URL (mail_uid,mail_gid,first_valid_uid,last_valid_uid etc.). I hope it is fine.

Now I did an apt-get dist-upgrade again and got the following error. Don't know which package has sieve in it.

doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: protocols: Unknown protocol: sieve
[....] Starting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: protocols: Unknown protocol: sieve
failed!

4

Re: Upgrade

On Debian 7, please make sure you have below packages installed:

- dovecot-imapd
- dovecot-pop3d
- dovecot-managesieved
- dovecot-sieve

5

Re: Upgrade

ZhangHuangbin wrote:

On Debian 7, please make sure you have below packages installed:

- dovecot-imapd
- dovecot-pop3d
- dovecot-managesieved
- dovecot-sieve

Yes, they are installed installed automatically, when I manually installed dovecot-managesieved. Please see the following:

# apt-get install dovecot-managesieved
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libbind9-60 libboost-iostreams1.42.0 libdb4.7 libdns69 libgmp3c2 libisc62 libisccc60 libisccfg62
  libjpeg62 liblwres60 librpmio1 libssl0.9.8 libt1-5 lzma
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  dovecot-managesieved
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
10 not fully installed or removed.
Need to get 393 kB of archives.
After this operation, 489 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ wheezy/main dovecot-managesieved amd64 1:2.1.7-7 [393 kB]
Fetched 393 kB in 0s (5,751 kB/s)        
Selecting previously unselected package dovecot-managesieved.
(Reading database ... 49733 files and directories currently installed.)
Unpacking dovecot-managesieved (from .../dovecot-managesieved_1%3a2.1.7-7_amd64.deb) ...
Setting up dovecot-core (1:2.1.7-7) ...
You already have ssl certs for dovecot.
However you should move them out of /etc/ssl
and into /etc/dovecot and update the configuration
in /etc/dovecot/conf.d/10-ssl.conf accordingly.
See /usr/share/doc/dovecot-core/README.Debian.gz for details.
[....] Starting IMAP/POP3 mail server: dovecotWarning: Corrected permissions for login directory /var/run/dovecot/login
. ok 
Setting up dovecot-gssapi (1:2.1.7-7) ...
Setting up dovecot-imapd (1:2.1.7-7) ...

Creating config file /etc/dovecot/conf.d/20-imap.conf with new version
[ ok ] Restarting IMAP/POP3 mail server: dovecot.
Setting up dovecot-ldap (1:2.1.7-7) ...

Creating config file /etc/dovecot/dovecot-ldap.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-ldap.conf.ext with new version
[ ok ] Restarting IMAP/POP3 mail server: dovecot.
Setting up dovecot-mysql (1:2.1.7-7) ...
Setting up dovecot-pgsql (1:2.1.7-7) ...
Setting up dovecot-pop3d (1:2.1.7-7) ...

Creating config file /etc/dovecot/conf.d/20-pop3.conf with new version
[ ok ] Restarting IMAP/POP3 mail server: dovecot.
Setting up dovecot-sieve (1:2.1.7-7) ...

Creating config file /etc/dovecot/conf.d/90-sieve.conf with new version
[ ok ] Restarting IMAP/POP3 mail server: dovecot.
Setting up dovecot-sqlite (1:2.1.7-7) ...
Setting up dovecot-common (1:2.1.7-7) ...
Setting up dovecot-managesieved (1:2.1.7-7) ...

Creating config file /etc/dovecot/conf.d/20-managesieve.conf with new version
[ ok ] Restarting IMAP/POP3 mail server: dovecot.

6

Re: Upgrade

aniyan.rajan6 wrote:

[....] Starting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: protocols: Unknown protocol: sieve

This won't happen if you have package "dovecot-managesieved" installed. Show us output of "dovecot -n" please.

7

Re: Upgrade

That error is gone (Unknown protocol: sieve). apt-get dist-upgrade went successfully. The present issues are continued in this thread:
http://www.iredmail.org/forum/post25097.html#p25097

Thanks.