Red Hat Bugzilla – Bug 832742
Last modified: 2012-11-22 06:25:01 EST
Description of problem:
systemd script for postfix references /etc/postfix/chroot-update but this is not shipped with Postfix.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install postfix and start it
2. Examine /usr/lib/systemd/system/postfix.service, it contains a line like
but no such file exists.
Jun 16 22:28:20 demeter systemd: Failed at step EXEC spawning /etc/postfix/chroot-update: No such file or directory
No such errors.
Removing ExecStartPre=-/etc/postfix/chroot-update from systemd unit file should fix it.
Description=Postfix Mail Transport Agent
Hi Jaroslav. Can you explain this line? No package seems to provide this script(?), so what's the point of referencing it and let these warnings clutter up the logs?
(In reply to comment #2)
> Hi Jaroslav. Can you explain this line? No package seems to provide this
> script(?), so what's the point of referencing it and let these warnings
> clutter up the logs?
Hi, this is result of sysvinit -> systemd conversion. There is an option for user to use its own script for chroot preset, example is provided in /usr/share/doc/postfix*/examples/chroot-setup, thus the '-' in systemd unit file, because this script is loaded optionally. Systemd emmits warning if this file is not present (I am not sure if it behaved this way in the past). I agree it is annoying. As a workaround we could provide empty file with comment of purpose of this file and the warning should gone.
Hm, not sure what the best course of action is -- is this file only meant to be run once? Then it could simply be made an empty (comment-only), executable file and people could fill it, then restart the service to apply the changes. No need to mark it %config then, as its contents don't need to be preserved (should be mentioned in the comments then).
I am going to use the following approach:
$ cat /usr/libexec/postfix/chroot-update
[ -x /etc/postfix/chroot-update ] && /etc/postfix/chroot-update
postfix-2.9.4-3.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing postfix-2.9.4-3.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
postfix-2.9.4-3.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
> # rpm -q postfix
> # ls /etc/postfix/chroot-update
> ls: cannot access /etc/postfix/chroot-update: No such file or directory
> # /usr/libexec/postfix/chroot-update ; echo $?
Is this OK to exit with status 1?
As a result ExecStartPre reports FAILURE.
> # systemctl status postfix.service
> Process: 17728 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=1/FAILURE)
(In reply to comment #9)
> > # rpm -q postfix
> > postfix-2.9.4-3.fc17.x86_64
> > # ls /etc/postfix/chroot-update
> > ls: cannot access /etc/postfix/chroot-update: No such file or directory
> > # /usr/libexec/postfix/chroot-update ; echo $?
> > 1
> Is this OK to exit with status 1?
> As a result ExecStartPre reports FAILURE.
> > # systemctl status postfix.service
> > ...
> > Process: 17728 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=1/FAILURE)
AFAIK the original problem was that the failure pollutes system log. Now it should be only reported by sytemctl status. The failure is only there if user doesn't have setup for chroot.