Some resource limits for sendmail cannot be changed by systemd configuration
Issue
-
Some resource limits to sendmail cannot be changed by systemd configuration.
Output example:
# cat /etc/systemd/system/sendmail.service.d/limits.conf [Service] LimitNOFILE=50000 # systemctl daemon-reload # systemctl show sendmail.service |grep LimitNOFILE LimitNOFILE=50000 # systemctl status sendmail ● sendmail.service - Sendmail Mail Transport Agent Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/sendmail.service.d └─filelimit.conf Active: active (running) since Mon 2018-02-05 10:26:39 JST; 3min 1s ago Process: 12287 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=0/SUCCESS) Process: 12281 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS) Process: 12279 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS) Main PID: 12289 (sendmail) CGroup: /system.slice/sendmail.service └─12289 sendmail: accepting connections Feb 05 10:26:39 rhel7 systemd[1]: Starting Sendmail Mail Transport Agent... Feb 05 10:26:39 rhel7 sendmail[12289]: starting daemon (8.14.7): SMTP+queueing@01:00:00 Feb 05 10:26:39 rhel7 systemd[1]: PID file /run/sendmail.pid not readable (yet?) after start. Feb 05 10:26:39 rhel7 systemd[1]: Started Sendmail Mail Transport Agent. # cat /proc/12289/limits |grep open Max open files 1024 1024 filesIn this example, systemd tries to set NOFILE to 50000. But the actual resource limit stays 1024 from process's limit information.
Environment
- Red Hat Enterprise Linux 7
- sendmail
- systemd
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
