Bug 754544

Summary: Can't reload sendmail under systemd
Product: [openSUSE] openSUSE 12.1 Reporter: Erik Hensema <erik>
Component: NetworkAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fcrozat
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 12.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Erik Hensema 2012-03-28 14:02:21 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0

Under systemd it's not possible to reload sendmail. Reloading is necessary for example after updating /etc/mail/local-host-names.

A restart is no alternative. Active smtp sessions will block the smtp network port, therefore making it impossible for a newly created daemon to bind to the smtp port. 

Reproducible: Always

Steps to Reproduce:
1. service sendmail reload
Actual Results:  
redirecting to systemctl
Failed to issue method call: Job type reload is not applicable for unit sendmail.service.


Expected Results:  
SIGHUP delivered to the main sendmail proces

reload in system-v init:

        echo -n "Reload service sendmail"
        killproc  -p $msppid -i $srvpid -TERM /usr/sbin/sendmail
        rc_status
        startproc -p $msppid -i $srvpid /usr/sbin/sendmail $SENDMAIL_CLIENT_ARGS
        rc_status
        killproc  -p $srvpid -i $msppid -HUP  /usr/sbin/sendmail
        rc_status -v
Comment 1 Kun Kun Zhang 2012-04-05 02:31:01 UTC
Hi,could you please have a look at this?I am not sure whether it is right to assign it to you.Feel free to reassign it.Thank you.
Comment 2 Frederic Crozat 2012-05-25 12:23:50 UTC
bug in the sendmail package, its units should have an "ExecReload" line, for instance:
ExecReload=/bin/kill -HUP $MAINPID
Comment 3 Dr. Werner Fink 2012-05-25 15:32:42 UTC
What is wrong with

  PIDFile=/var/spool/clientmqueue/sm-client.pid

or

  PIDFile=/var/run/sendmail.pid

why does systemctl not use them?
Comment 4 Frederic Crozat 2012-05-25 15:38:42 UTC
Nothing wrong there but dy default systemd doesn't bind any action to reload, so the ExecReload line need to be added to the service file.
Comment 5 Dr. Werner Fink 2012-05-25 15:44:31 UTC
added
Comment 6 Bernhard Wiedemann 2012-05-25 16:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (754544) was mentioned in
https://build.opensuse.org/request/show/122425 Factory / sendmail