installing sendmail enables service disregarding systems preset

Issues related to applications and software problems
Post Reply
jtc
Posts: 1
Joined: 2019/05/28 02:56:38

installing sendmail enables service disregarding systems preset

Post by jtc » 2019/05/28 03:15:19

I ran into this creating a chroot environment. Even with a systemd preset that disables services by default (see /usr/lib/systemd/system-preset/99-default-disable.preset), sendmail is enabled after it is installed.

I checked the sendmail rpm post install scriptlet, and it uses "systemctl preset sendmail.service sm-client.service" so one would expect it to be disabled, yet "systemctl status sendmail.service" reports the service is enabled.

Code: Select all

$ systemctl status sendmail.service
● sendmail.service - Sendmail Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
I've added an explicit "systemctl disable sendmail.service sm-client.service" to the automation that creates my chroot, so at this point I'm more curious why sendmail isn't behaving like other services that do honor the preset settings. One difference may be the "alternatives" setup, perhaps that's enabling the service counter to the preset configuration.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: installing sendmail enables service disregarding systems preset

Post by TrevorH » 2019/05/28 08:43:59

If you disable a service then it can still be started if another service requires it. If you want to stop it from starting completely then you need to mask it, not disable it.

Also, why on earth are you using sendmail? The 1990s called and want their MTA back! The default out of the box is to install postfix.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply