Translated message

A translation of this page exists in English.

sendmail に対するいくつかのリソース制限が、systemd 設定によって変更することができません

Solution Verified - Updated -

Issue

  • systemd による sendmail サービスに対するリソース制限は利用できません。

    出力例:

    # 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                 files   
    

    この例では、systemd は NOFILE を 50000 に設定しようとしています。しかし、実際のリソース制限は、プロセスの制限情報からは 1024 のままとなっています。

Environment

  • Red Hat Enterprise Linux 7
  • sendmail
  • systemd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content