This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 832742 - missing /etc/postfix/chroot-update
missing /etc/postfix/chroot-update
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: postfix (Show other bugs)
17
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Jaroslav Škarvada
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-16 22:47 EDT by Julian C. Dunn
Modified: 2012-11-22 06:25 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 19:03:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Julian C. Dunn 2012-06-16 22:47:15 EDT
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):

postfix-2.9.2-2.fc17.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Install postfix and start it
2. Examine /usr/lib/systemd/system/postfix.service, it contains a line like

ExecStartPre=-/etc/postfix/chroot-update

but no such file exists.
  
Actual results:

Jun 16 22:28:20 demeter systemd[5568]: Failed at step EXEC spawning /etc/postfix/chroot-update: No such file or directory

Expected results:

No such errors.

Additional info:
Comment 1 Morten Stevens 2012-07-16 07:12:50 EDT
Removing ExecStartPre=-/etc/postfix/chroot-update from systemd unit file should fix it.

/usr/lib/systemd/system/postfix.service

[Unit]
Description=Postfix Mail Transport Agent
After=syslog.target network.target
Conflicts=sendmail.service exim.service

[Service]
Type=forking
PIDFile=/var/spool/postfix/pid/master.pid
EnvironmentFile=-/etc/sysconfig/network
ExecStartPre=-/usr/libexec/postfix/aliasesdb
ExecStart=/usr/sbin/postfix start
ExecReload=/usr/sbin/postfix reload
ExecStop=/usr/sbin/postfix stop

[Install]
WantedBy=multi-user.target
Comment 2 Nils Philippsen 2012-08-27 12:04:27 EDT
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?
Comment 3 Jaroslav Škarvada 2012-08-28 04:15:02 EDT
(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.
Comment 4 Nils Philippsen 2012-09-03 10:19:22 EDT
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).
Comment 5 Jaroslav Škarvada 2012-09-06 06:25:50 EDT
I am going to use the following approach:

ExecStartPre=-/usr/libexec/postfix/chroot-update

$ cat /usr/libexec/postfix/chroot-update
#!/bin/bash

[ -x /etc/postfix/chroot-update ] && /etc/postfix/chroot-update
Comment 6 Fedora Update System 2012-09-06 09:46:19 EDT
postfix-2.9.4-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/postfix-2.9.4-3.fc18
Comment 7 Fedora Update System 2012-09-07 15:37:24 EDT
Package postfix-2.9.4-3.fc18:
* 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:
https://admin.fedoraproject.org/updates/FEDORA-2012-13552/postfix-2.9.4-3.fc18
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-09-17 19:03:45 EDT
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.
Comment 9 Vladislav Grigoryev 2012-11-22 04:54:50 EST
> # 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)
Comment 10 Jaroslav Škarvada 2012-11-22 06:25:01 EST
(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.

Note You need to log in before you can comment on or make changes to this bug.