Public bug reported: Binary package hint: dovecot-postfix
Every upgrade of dovecot-postfix overwrites the main.cf postfix configuration file removing some of the users customisations. It is expected on initial install for this to occur (although a warning even then would be good), however according to the postinst it is not supposed to overwrite the config on upgrades. It was noticed on a previous upgrade as well as one done last night. Thankfully, as I use etckeeper I was able to rollback the changes it made without any problem. To confirm it was dovecot-postfix I did apt- get install --reinstall dovecot-postfix after restoring the correct config and it again overwrote the main.cf. The problem seems to be in the snippit of postinst below. The POSTFIX_BCKFILE's do exist, however the check for the file not existing occurs AFTER the backup file is moved to the dated version. It appears that maybe the mv should be a copy, or the test for not existing should be changed. $ ls -l /var/backups/dovecot-postfix/main.cf-backup* -rw-r--r-- 1 root root 1219 2011-06-10 09:00 /var/backups/dovecot-postfix/main.cf-backup -rw-r--r-- 1 root root 708 2010-03-06 15:52 /var/backups/dovecot-postfix/main.cf-backup-201007062114 -rw-r--r-- 1 root root 934 2010-07-06 21:14 /var/backups/dovecot-postfix/main.cf-backup-201103060521 -rw-r--r-- 1 root root 1166 2011-03-06 05:22 /var/backups/dovecot-postfix/main.cf-backup-201106092123 -rw-r--r-- 1 root root 1219 2011-06-09 21:24 /var/backups/dovecot-postfix/main.cf-backup-201106100859 snippit of postinst # Configure postfix either on new install # or if the postfix backup file is no longer there # (only deleted when the pkg is removed) if [ -f "/etc/postfix/main.cf" ]; then if [ -e "$POSTFIX_BCKFILE" ]; then mv $POSTFIX_BCKFILE ${POSTFIX_BCKFILE}-$(date +%Y%m%d%H%M) fi if [ -z "$2" -o ! -e "$POSTFIX_BCKFILE" ]; then ProblemType: Bug DistroRelease: Ubuntu 10.04 Package: dovecot-postfix 1:1.2.9-1ubuntu6.4 ProcVersionSignature: Ubuntu 2.6.32-30.59-generic-pae 2.6.32.29+drm33.13 Uname: Linux 2.6.32-30-generic-pae i686 Architecture: i386 Date: Fri Jun 10 08:55:25 2011 PackageArchitecture: all ProcEnviron: LANG=en_AU.UTF-8 SHELL=/bin/bash SourcePackage: dovecot ** Affects: dovecot (Ubuntu) Importance: Undecided Status: New ** Tags: apport-bug i386 lucid -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dovecot in Ubuntu. https://bugs.launchpad.net/bugs/795336 Title: dovecot-postfix always overwrites main.cf To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dovecot/+bug/795336/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs