FS#20809 - [dovecot] Copying example config files into /etc is causing problems

Attached to Project: Arch Linux
Opened by Pierre Schmitz (Pierre) - Saturday, 11 September 2010, 08:05 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 27 February 2012, 18:20 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The example config files shouldn't be copied to /etc/dovecot. There is probably no sane default config and every user has to setup their own config according to their needs.

Some files are really just examples and cannot be used directly; e.g. they are referring to other non-existing files etc.. One also need to add all those files to NoExtract in pacmn.conf to make sure they are not added on an update when deleted; especially if you automatically include all conf files that are found in /etc/dovecot/conf.d/

My suggestion: Please keep the upstream default and remove the following lines from the PKGBUILD:

# install example conf files and ssl.conf
install -d -m755 ${pkgdir}/etc/dovecot/conf.d
install -m 644 ${pkgdir}/usr/share/doc/dovecot/example-config/conf.d/*.conf ${pkgdir}/etc/dovecot/conf.d
install -m 644 ${pkgdir}/usr/share/doc/dovecot/example-config/conf.d/*.conf.ext ${pkgdir}/etc/dovecot/conf.d
install -m 644 ${pkgdir}/usr/share/doc/dovecot/example-config/dovecot.conf ${pkgdir}/etc/dovecot/
install -d -m755 ${pkgdir}/etc/ssl
install -m 644 ${srcdir}/$pkgname-$pkgver/doc/dovecot-openssl.cnf ${pkgdir}/etc/ssl/

You could provide a very small dovecot.conf and add a hint to /usr/share/doc/dovecot/example-config/ (I did something similar with lighttpd)
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Monday, 27 February 2012, 18:20 GMT
Reason for closing:  Fixed
Additional comments about closing:  sample conf files removed, two main files renamed to be safe and not break future updates.
Comment by Andreas Radke (AndyRTR) - Saturday, 11 September 2010, 11:03 GMT
It seems to be a matter of taste if you want it all empty and have to decide yourself what to cp over to /etc or to have everything as defaults and examples aready present and under pacman control. Fedora is also cp'ing all example conf files. Upstream doesn't install anything into /etc which is also not very helpful and we currently don't have a proper documentation in our wiki. Let's keep it for now and watch how upstream and major other distro will solve this in the future.
Comment by Pierre Schmitz (Pierre) - Monday, 27 February 2012, 14:28 GMT
This broke my update again. The package installed the new file /etc/dovecot/conf.d/15-mailboxes.conf Those example settings overrode my config and resulted in a broken setup:

Feb 27 15:16:08 server dovecot: master: Dovecot v2.1.1 starting up
Feb 27 15:16:16 server postfix/postfix-script[5459]: starting the Postfix mail system
Feb 27 15:16:16 server postfix/master[5460]: daemon started -- version 2.9.1, configuration /etc/postfix
Feb 27 15:16:38 server dovecot: auth: Warning: sql: Ignoring changed iterate_query in /etc/dovecot/conf.d/dovecot-sql.conf.ext, because userdb sql not used. (If this is intentional, set userdb_warning_disable=yes)
Feb 27 15:16:38 server dovecot: auth-worker(5502): mysql(/var/run/mysqld/mysqld.sock): Connected to database vmail
Feb 27 15:16:38 server dovecot: imap-login: Login: user=<pierre@archlinux.de>, method=PLAIN, rip=::1, lip=::1, mpid=5504, secured
Feb 27 15:16:38 server dovecot: imap(pierre@archlinux.de): Error: user pierre@archlinux.de: Initialization failed: namespace configuration error: inbox=yes namespace missing
Feb 27 15:16:38 server dovecot: imap(pierre@archlinux.de): Error: Invalid user settings. Refer to server log for more information.

So please reconsider this.

Loading...