[Dovecot] imap dump-capability fails Dovecot 1.1.6
Hi Timo,
Dovecot fails to start after upgrading from 1.1.4 to 1.1.6:
Fatal: userdb didn't return a home directory, but mail location used it (%h): %h/mail:CONTROL=%h/control:INDEX=%h/index Error: imap dump-capability process returned 89 Fatal: Invalid configuration in /etc/dovecot/dovecot.conf
Adding a fake home directory to args in master-settings.c:get_imap_capability solved the problem for me, but there may be a more correct fix.
Regards, Thorsten
# 1.1.6: /etc/dovecot/dovecot.conf # OS: Linux 2.6.9-023stab048.4-enterprise i686 Gentoo Base System version 1.6.14 protocols: imaps ssl_ca_file: /etc/dovecot/ca.crt ssl_cert_file: /etc/dovecot/server.crt ssl_key_file: /etc/dovecot/server.key ssl_parameters_regenerate: 48 login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/imap-login login_process_size: 32 login_processes_count: 4 login_max_processes_count: 32 max_mail_processes: 32 mail_location: maildir:%h/mail:CONTROL=%h/control:INDEX=%h/index mail_process_size: 128 mail_plugins: expire antispam auth default: mechanisms: plain login user: nobody worker_max_count: 8 process_size: 128 passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: static args: uid=vmail gid=vmail home=/var/userdata/%Lu socket: type: listen client: path: /var/run/dovecot/auth-client mode: 384 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail group: vmail plugin: expire: SPAM 30 expire_dict: proxy:/var/run/dovecot/dict-server:expire auth_socket_path: /var/run/dovecot/auth-master antispam_dspam_binary: /usr/bin/dspam antispam_dspam_args: --user;%Lu antispam_signature: X-DSPAM-Signature antispam_spam: SPAM dict: expire: mysql:/etc/dovecot/dovecot-dict.conf
On Fri, 2008-10-31 at 08:32 +0100, Thorsten Vollmer wrote:
Hi Timo,
Dovecot fails to start after upgrading from 1.1.4 to 1.1.6:
Fatal: userdb didn't return a home directory, but mail location used it (%h): %h/mail:CONTROL=%h/control:INDEX=%h/index Error: imap dump-capability process returned 89 Fatal: Invalid configuration in /etc/dovecot/dovecot.conf
Adding a fake home directory to args in master-settings.c:get_imap_capability solved the problem for me, but there may be a more correct fix.
Yes, that's the correct fix: http://hg.dovecot.org/dovecot-1.1/rev/2fbd36039526
One workaround is to use ~ instead of %h. It'll log errors, but it still works.
Wonder how many people will have this problem.. Perhaps I'll have to release 1.1.7 just because of it.
On 31.10.2008, Timo Sirainen wrote:
On Fri, 2008-10-31 at 08:32 +0100, Thorsten Vollmer wrote: [...]
Adding a fake home directory to args in master-settings.c:get_imap_capability solved the problem for me, but there may be a more correct fix.
Yes, that's the correct fix: http://hg.dovecot.org/dovecot-1.1/rev/2fbd36039526
With the corresponding fix in dovecot-1.2 dovecot doesn't start anymore for me: setgid(65534) failed with euid=1001, gid=1001, egid=1001: Operation not permitted Error: imap dump-capability process returned 89 It turns out that rev 2fbd36039526 changed the indices in the args array that some other code get_imap_capability relied on so that the uid and gid are not overwritten properly when dovecot is not started as root. See this patch: diff -r 281ef8e9863f src/master/master-settings.c --- a/src/master/master-settings.c Fri Oct 31 18:03:39 2008 +0200 +++ b/src/master/master-settings.c Fri Oct 31 17:22:06 2008 +0100 @@ -636,8 +636,8 @@ static bool get_imap_capability(struct s uid = geteuid(); if (uid != 0) { /* use the current user */ - args[0] = t_strdup_printf("uid=%s", dec2str(uid)); - args[1] = t_strdup_printf("gid=%s", dec2str(getegid())); + args[1] = t_strdup_printf("uid=%s", dec2str(uid)); + args[2] = t_strdup_printf("gid=%s", dec2str(getegid())); } if (pipe(fd) < 0) { The Patch is not an attachment this time to avoid mailman breaking the openpgp signature. Regards, Bernhard -- Bernhard Herzog | ++49-541-335 08 30 | http://www.intevation.de/ Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998 Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
On Fri, 2008-10-31 at 17:32 +0100, Bernhard Herzog wrote:
On 31.10.2008, Timo Sirainen wrote:
On Fri, 2008-10-31 at 08:32 +0100, Thorsten Vollmer wrote: [...]
Adding a fake home directory to args in master-settings.c:get_imap_capability solved the problem for me, but there may be a more correct fix.
Yes, that's the correct fix: http://hg.dovecot.org/dovecot-1.1/rev/2fbd36039526
With the corresponding fix in dovecot-1.2 dovecot doesn't start anymore for me:
setgid(65534) failed with euid=1001, gid=1001, egid=1001: Operation not permitted Error: imap dump-capability process returned 89
It turns out that rev 2fbd36039526 changed the indices in the args array that some other code get_imap_capability relied on so that the uid and gid are not overwritten properly when dovecot is not started as root. See this patch:
Oh. Right. It didn't give that error with me, so I assumed it worked. Well, I fixed it just by moving home to last: http://hg.dovecot.org/dovecot-1.1/rev/cbde69815b8a
The Patch is not an attachment this time to avoid mailman breaking the openpgp signature.
Hmm. It does that?
Timo Sirainen a =E9crit :
On Fri, 2008-10-31 at 08:32 +0100, Thorsten Vollmer wrote:
Hi Timo,
Dovecot fails to start after upgrading from 1.1.4 to 1.1.6:
Fatal: userdb didn't return a home directory, but mail location used i= t (%h): %h/mail:CONTROL=3D%h/control:INDEX=3D%h/index Error: imap dump-capability process returned 89 Fatal: Invalid configuration in /etc/dovecot/dovecot.conf
Adding a fake home directory to args in master-settings.c:get_imap_capability solved the problem for me, but there may be a more correct fix. =20 Yes, that's the correct fix: http://hg.dovecot.org/dovecot-1.1/rev/2fbd36039526 =20 One workaround is to use ~ instead of %h. It'll log errors, but it stil= l works. =20 Wonder how many people will have this problem.. Perhaps I'll have to release 1.1.7 just because of it. =20 I did too... (but found the workaround at first try)
--=20
___________________________________________________________
/ Geoffroy DESVERNAY |
/\ Service info
| Tel: (+33|0)4 91 05 45 24 /
\/ Ecole Centrale de Marseille | Fax: (+33|0)4 91 05 45 98 \/
\ (ex-EGIM) | Mail: dgeo@ec-marseille.fr /
-----------------------------------------------------------
participants (4)
-
Bernhard Herzog
-
geoffroy desvernay
-
Thorsten Vollmer
-
Timo Sirainen