postfix configuration failures should not let 'stop' fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postfix (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: postfix
Actual problem:
For some reason my /etc/mailname is empty. For another reason I'd like to install nullmailer instead of postfix. A simple 'sudo apt-get install nullmailer' should do the trick...
But:
eading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
postfix
The following NEW packages will be installed:
nullmailer
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B/109kB of archives.
After this operation, 3,064kB disk space will be freed.
Do you want to continue [Y/n]?
Preconfiguring packages ...
dpkg: postfix: dependency problems, but removing anyway as you requested:
bsd-mailx depends on postfix | mail-transport-
Package postfix is to be removed.
Package mail-transport-
Package postfix which provides mail-transport-
bsd-mailx depends on postfix | mail-transport-
Package postfix is to be removed.
Package mail-transport-
Package postfix which provides mail-transport-
(Reading database ... 16149 files and directories currently installed.)
Removing postfix ...
* Stopping Postfix Mail Transport Agent postfix postfix: fatal: myorigin file /etc/mailname is empty
invoke-rc.d: initscript postfix, action "stop" failed.
dpkg: error processing postfix (--remove):
subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
Manually stopping postfix using 'sudo /etc/init.d/postfix stop' gives the same '...mailname is empty' error.
The simplest and IMHO opinion cleanest way would be to enhance the postfix init script to use some force to stop postfix even when there's no working configuration. Other deamons like squid even kill the daemon process in their init scripts after some waiting...
tags: | added: kernel-series-unknown |
tags: | removed: kernel-series-unknown |
Changed in postfix (Ubuntu): | |
status: | Incomplete → Confirmed |
Could you try to put the hostname into /etc/mailname (ie make /etc/mailname not-empty)?