Bug 1465910 - systemd unit could malfunction if "mta" in alternatives set to a different MTA
systemd unit could malfunction if "mta" in alternatives set to a different MTA
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sendmail (Show other bugs)
7.4
Unspecified Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Jaroslav Škarvada
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-28 08:39 EDT by Roman Žilka
Modified: 2017-10-05 06:29 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 Roman Žilka 2017-06-28 08:39:49 EDT
If multiple MTAs (incl. sendmail) are installed and the "mta" group in alternatives is set to an MTA other than sendmail, then systemctl calls against the "sendmail" service could malfunction, possibly because sendmail's systemd unit calls /usr/sbin/sendmail which is controlled by alternatives. E.g.:

********** Steps to Reproduce:

1. sendmail and postfix are installed, neither is running
2. alternatives --set mta /usr/sbin/sendmail.postfix
3. systemctl start sendmail

********** Actual results:

The systemctl call hangs and eventually fails. If interrupted, "systemctl status sendmail" reveals postfix got started:

● sendmail.service - Sendmail Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/sendmail.service; disabled; vendor preset: disabled)
   Active: activating (start) since Wed 2017-06-28 03:37:14 EDT; 12s ago
  Process: 10719 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=0/SUCCESS)
  Process: 10711 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
  Process: 10710 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/sendmail.service
           ├─10793 /usr/libexec/postfix/master -w
           ├─10794 pickup -l -t unix -u
           └─10795 qmgr -l -t unix -u

Jun 28 03:37:14 hostname systemd[1]: Starting Sendmail Mail Transport Agent...
Jun 28 03:37:14 hostname systemd[1]: PID file /run/sendmail.pid not readable...t.
Jun 28 03:37:14 hostname postfix/master[10793]: daemon started -- version 2.1...x
Hint: Some lines were ellipsized, use -l to show in full.

********** Expected results:

systemctl works with the service it's called for.

********** Version-Release number of selected component (if applicable):

sendmail-8.14.7-5.el7
postfix-2.10.1-6.el7
chkconfig-1.7.4-1.el7
Comment 3 bill 2017-10-05 05:20:30 EDT
After updating Scientific Linux 7.3 to 7.4 on a mail server using postfix, systemd started sendmail instead of postfix. Is this related to this bug?

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