Package: dovecot-common
Version: 1:1.0.5-1
Severity: normal
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu ubuntu-patch hardy

If dovecot-ldap.conf or dovecot-sql.conf are removed, the post
installation script fails on upgrade.

Reported on launchpad:
https://bugs.launchpad.net/ubuntu/+source/dovecot/+bug/153161

The patch attached fixes the problem in the postinst script.

diff -u dovecot-1.0.5/debian/dovecot-common.postinst dovecot-1.0.5/debian/dovecot-common.postinst
--- dovecot-1.0.5/debian/dovecot-common.postinst
+++ dovecot-1.0.5/debian/dovecot-common.postinst
@@ -9,7 +9,7 @@
     # configuration file in /etc/dovecot.
     ucf --three-way /usr/share/dovecot/$conffile /etc/dovecot/$conffile
     ucfr dovecot-common /etc/dovecot/$conffile
-    if [ "$conffile" != "dovecot.conf" ]; then
+    if [ "$conffile" != "dovecot.conf" ] && [ -f "$conffile" ]; then
       chmod 0600 /etc/dovecot/$conffile
     fi
   done

Reply via email to