dovecot-postfix always overwrites main.cf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dovecot (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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/
-rw-r--r-- 1 root root 1219 2011-06-10 09:00 /var/backups/
-rw-r--r-- 1 root root 708 2010-03-06 15:52 /var/backups/
-rw-r--r-- 1 root root 934 2010-07-06 21:14 /var/backups/
-rw-r--r-- 1 root root 1166 2011-03-06 05:22 /var/backups/
-rw-r--r-- 1 root root 1219 2011-06-09 21:24 /var/backups/
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/
if [ -e "$POSTFIX_BCKFILE" ]; then
fi
if [ -z "$2" -o ! -e "$POSTFIX_BCKFILE" ]; then
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: dovecot-postfix 1:1.2.9-1ubuntu6.4
ProcVersionSign
Uname: Linux 2.6.32-
Architecture: i386
Date: Fri Jun 10 08:55:25 2011
PackageArchitec
ProcEnviron:
LANG=en_AU.UTF-8
SHELL=/bin/bash
SourcePackage: dovecot