1

Topic: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Hi, all.

Tutorial of upgrading dovecot from 1.1.x to 1.2.x is available now:
http://www.iredmail.org/wiki/index.php? … 1.1.to.1.2

With dovecot-1.2, you can store real-time per-user quota usage in SQL, enable expire and ACL plugins, etc.

Hope you enjoy this upgrading smile

P.S. Dovecit-1.2 will be installed by default in next release of iRedMail, 0.7.0.

----

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

2 (edited by Adan0s 2010-10-24 20:34:37)

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Tutorial doesn't work under debian lenny. It doesn't install 1.2. Probably because of the missing "-t lenny-backports" after "sudo apt-get upgrade dovecot-imapd dovecot-pop3d".

3

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Adan0s wrote:

Tutorial doesn't work under debian lenny. It doesn't install 1.2. Probably because of the missing "-t lenny-backports" after "sudo apt-get upgrade dovecot-imapd dovecot-pop3d".

Fixed, added '-t lenny-backports'. Thanks very much for your feedback. smile

4

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

There's also another Problem which is stopping dovecot from starting up. In my dovecot.conf I had to comment out following lines under "protocol managesieve"

    sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
    sieve_storage = /var/vmail/sieve/%Ld/%Ln/

and those two lines had to be added into a plugin tag. There was already one with just "sieve=", so I just added sieve_storage to it.

# Per-user sieve mail filter.
plugin {
    # For maildir format.
    sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
    sieve_storage = /var/vmail/sieve/%Ld/%Ln/
}

After those fixes dovecot starts without a problem. smile

5

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Hi, @Adan0s.
Fixed in wiki, thanks for your feedback. smile

6

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Hi !

I have many problems with this. Look this erros in conf:

(root@mail)[~]# /etc/init.d/dovecot restart
Parando o Dovecot Imap:                                    [FALHOU]
Iniciando Dovecot Imap: Error: Error in configuration file /etc/dovecot.conf line 14: Unknown setting: umask
Fatal: Invalid configuration in /etc/dovecot.conf
                                                           [FALHOU]
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# /etc/init.d/dovecot restart
Parando o Dovecot Imap:                                    [FALHOU]
Iniciando Dovecot Imap: Error: Error in configuration file /etc/dovecot.conf line 101: Unknown setting: ssl_disable
Fatal: Invalid configuration in /etc/dovecot.conf
                                                           [FALHOU]
(root@mail)[~]# vi /etc/dovecot.conf.
dovecot.conf.2010.07.22.20.14.20  dovecot.conf.rpmsave
(root@mail)[~]# vi /etc/dovecot
dovecot-1.1.conf                  dovecot.conf                      dovecot.conf.rpmsave
dovecot-1.2.conf                  dovecot.conf.2010.07.22.20.14.20  dovecot-mysql.conf
(root@mail)[~]# vi /etc/dovecot-1.2.conf
(root@mail)[~]# rpm -e dovecot dovecot-sieve
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]#
(root@mail)[~]#
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# vi /etc/dovecot
dovecot-1.1.conf                  dovecot.conf                      dovecot.conf.rpmsave
dovecot-1.2.conf                  dovecot.conf.2010.07.22.20.14.20  dovecot-mysql.conf
(root@mail)[~]# vi /etc/dovecot-1.2.conf
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# /etc/init.d/dovecot restart
Parando o Dovecot Imap:                                    [FALHOU]
Iniciando Dovecot Imap: FPlugin zlib not found from directory /usr/lib64/dovecot/imap
Error: imap dump-capability process returned 89
Fatal: Invalid configuration in /etc/dovecot.conf
                                                           [FALHOU]

7

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

gondim wrote:

Hi !

I have many problems with this. Look this erros in conf:

(root@mail)[~]# /etc/init.d/dovecot restart
Parando o Dovecot Imap:                                    [FALHOU]
Iniciando Dovecot Imap: Error: Error in configuration file /etc/dovecot.conf line 14: Unknown setting: umask
Fatal: Invalid configuration in /etc/dovecot.conf
                                                           [FALHOU]
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# /etc/init.d/dovecot restart
Parando o Dovecot Imap:                                    [FALHOU]
Iniciando Dovecot Imap: Error: Error in configuration file /etc/dovecot.conf line 101: Unknown setting: ssl_disable
Fatal: Invalid configuration in /etc/dovecot.conf
                                                           [FALHOU]
(root@mail)[~]# vi /etc/dovecot.conf.
dovecot.conf.2010.07.22.20.14.20  dovecot.conf.rpmsave
(root@mail)[~]# vi /etc/dovecot
dovecot-1.1.conf                  dovecot.conf                      dovecot.conf.rpmsave
dovecot-1.2.conf                  dovecot.conf.2010.07.22.20.14.20  dovecot-mysql.conf
(root@mail)[~]# vi /etc/dovecot-1.2.conf
(root@mail)[~]# rpm -e dovecot dovecot-sieve
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]#
(root@mail)[~]#
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# vi /etc/dovecot
dovecot-1.1.conf                  dovecot.conf                      dovecot.conf.rpmsave
dovecot-1.2.conf                  dovecot.conf.2010.07.22.20.14.20  dovecot-mysql.conf
(root@mail)[~]# vi /etc/dovecot-1.2.conf
(root@mail)[~]# vi /etc/dovecot.conf
(root@mail)[~]# /etc/init.d/dovecot restart
Parando o Dovecot Imap:                                    [FALHOU]
Iniciando Dovecot Imap: FPlugin zlib not found from directory /usr/lib64/dovecot/imap
Error: imap dump-capability process returned 89
Fatal: Invalid configuration in /etc/dovecot.conf
                                                           [FALHOU]


Opssss sorry dont see another text. Its ok now!!!

8

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Hi,

when I follow the tutorial of upgrading dovecot under Debian lenny the upgrade process wants to upgrade several other packages.
Because there is no hint in the tutorial I aborted upgrade.
So my question is if it's ok to upgrade also all other packages?

root@mail:/var/vmail# apt-get -t lenny-backports upgrade dovecot-imapd dovecot-pop3d
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Lese Status-Informationen ein... Fertig
Die folgenden Pakete sind zurückgehalten worden:
  amavisd-new info libcompress-raw-zlib-perl libcompress-zlib-perl libio-compress-base-perl libio-compress-zlib-perl postgresql-client
Die folgenden Pakete werden aktualisiert:
  binutils cpp-4.3 dovecot-common dovecot-imapd dovecot-pop3d fontconfig-config g++-4.3 gcc-4.3 
gcc-4.3-base gnupg gpgv libapache2-mod-wsgi libapr1 libdigest-sha1-perl libfontconfig1 libgcc1 libgeoip1 
libgomp1 libmail-spf-perl libnet-dns-perl libpq5 libsqlite3-0 libstdc++6 libstdc++6-4.3-dev liburi-perl 
libxapian15 linux-libc-dev mysql-common postfix postfix-ldap postfix-pcre postgresql-client-common 
python-jinja2 python-netifaces python-support python-webpy rsyslog spamassassin spamc
39 aktualisiert, 0 neu installiert, 0 zu entfernen und 7 nicht aktualisiert.
Es müssen 33,2MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 8702kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren [J/n]? n

Thanks!

PS: and also thank you for this great mail solution!

9

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Can nobody answer the question of my previous post? I'd like to upgrade dovecot but I'm unsteady about the other packages.

10

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

It's safe to upgrade dovecot with other packages which apt-get recommend.

11

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Thanks for the answer.

I'll upgrade the system during the next hours and if I encounter some errors I'll be back ;-)



greets
Oliver

12 (edited by itsok 2010-12-13 19:13:17)

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

ok, I am back...

After the upgrade and the changes described in the wiki first all seem's ok, receiving mails is fine.
But then I tried mail sending and got the following error:

Dec 13 12:05:14 mail postfix/smtpd[23043]: warning: when SASL type is "dovecot", SASL path "dovecot-auth" should be a socket pathname

Sending mails fails. And I do not see the error because the authentification part was not touched...

Can you please help me again?



Finally I found another error:

Dec 13 11:59:44 deliver(www-data): Error: sieve: failed to stat user's sieve script: stat(/var/vmail/sieve//www-data/dovecot.sieve) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +x perm: /var/vmail) (using global script path in stead)
Dec 13 11:59:44 deliver(www-data): Error: sieve: main_script: failed to stat sieve script: lstat(/var/vmail/sieve/dovecot.sieve) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +x perm: /var/vmail)
Dec 13 11:59:44 deliver(www-data): Error: sieve: main_script: internal error occurred: refer to server log for more information. [2010-12-13 11:59:44]
Dec 13 11:59:44 deliver(www-data): Error: sieve: failed to open script /var/vmail/sieve/dovecot.sieve

This occurs when the awstats cron job tries to send mail to a mailaccount which had have working sieve rules before upgrade.

13

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

itsok wrote:

Dec 13 12:05:14 mail postfix/smtpd[23043]: warning: when SASL type is "dovecot", SASL path "dovecot-auth" should be a socket pathname

In Postfix main.cf, you have this setting:

smtpd_sasl_path = dovecot-auth

Change it to below setting and restart postfix will fix it:

smtpd_sasl_path = ./dovecot-auth

14

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

itsok wrote:

Dec 13 11:59:44 deliver(www-data): Error: sieve: failed to stat user's sieve script: stat(/var/vmail/sieve//www-data/dovecot.sieve) failed: Permission denied (euid=33(www-data) egid=33(www-data) missing +x perm: /var/vmail) (using global script path in stead)

Seems this mail is delivered to web server user (www-data).
Since 'www-data' is not a virtual mail user, there's not mailbox for it, and this is correct.

15 (edited by itsok 2010-12-13 19:49:12)

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

The dovecot-auth problem seems solved by your tip but I can not send mails anyway.

Dec 13 12:27:30 mail postfix/smtpd[23426]: warning: xxx.pool.mediaWays.net[77.181.ww.xx]: SASL LOGIN authentication failed: UGFzc3dvcmQ6

After enabling debug in dovecot.conf the logs revealed the following:

Dec 13 12:42:00 auth(default): Info: ldap(itsok@domain.de,77.181.xx.xx): bind search: base=o=domains,dc=domain,dc=de filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=smtpsecured)(|(mail=itsok@domain.de)(&(enabledService=shadowaddress)(shadowAddress=itsok@domain.de))))
Dec 13 12:42:00 auth(default): Info: ldap(itsok@domain.de,77.181.xx.xx): unknown user
Dec 13 12:42:02 auth(default): Info: client out: FAIL    2    user=itsok@domain.de

Seem's curious while receiving mails works...




I will analyze the other problem with www-data later.

16

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

itsok wrote:

After enabling debug in dovecot.conf the logs revealed the following:

Could you please post all related log in /var/log/dovecot.log?

17

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

itsok wrote:

The dovecot-auth problem seems solved by your tip but I can not send mails anyway.

Dec 13 12:27:30 mail postfix/smtpd[23426]: warning: xxx.pool.mediaWays.net[77.181.ww.xx]: SASL LOGIN authentication failed: UGFzc3dvcmQ6

After enabling debug in dovecot.conf the logs revealed the following:

Dec 13 12:42:00 auth(default): Info: ldap(itsok@domain.de,77.181.xx.xx): bind search: base=o=domains,dc=domain,dc=de filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=smtpsecured)(|(mail=itsok@domain.de)(&(enabledService=shadowaddress)(shadowAddress=itsok@domain.de))))
Dec 13 12:42:00 auth(default): Info: ldap(itsok@domain.de,77.181.xx.xx): unknown user
Dec 13 12:42:02 auth(default): Info: client out: FAIL    2    user=itsok@domain.de

Seem's curious while receiving mails works...

Found the problem: auth searchs for "enabledService=securesmtp" in LDAP but this service is not set anywhere. Seems that this was not used before. After adding this attribute sending mails works.

18

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Seems you didn't update your iRedMail to latest version. It's mentioned here: http://iredmail.org/wiki/index.php?titl … ing_values

19

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

Nope, I've done the update and the mentioned services are in place.
Also I've run the python script to update services (-rw-r--r--  1 root root    2045 12. Jun 2010  updateLDAPValues_051_to_060.py).

And by the way "smtpsecured" is not described in the update.

20

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

imapsecured, pop3secured are already present.

21

Re: [FAQ] Upgrade Dovecot from 1.1.x to 1.2.x

ZhangHuangbin wrote:

imapsecured, pop3secured are already present.

Yes