mail/opendkim does not restart with "service -R"

From: Andrea Venturoli <ml_at_netfence.it>
Date: Sat, 24 Jul 2021 15:14:09 UTC
Hello.

On all the systems where I have this installed (all jails), when issuing 
"service -R", opendkim stops but does not restart.
"service milter-opendkim restart" does the job, however.

> root@mail:~ # service -R
> /usr/sbin/service: DEBUG: checkyesno: apache24_configcheck_disable is set to NO.
> Stopping apache24.
> /usr/sbin/service: DEBUG: run_rc_command: doit: kill -TERM 81005
> Waiting for PIDS: 81005.
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/clamav_freshclam
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/clamav_freshclam
> Stopping clamav_freshclam.
> /usr/sbin/service: DEBUG: run_rc_command: doit: su -m mailnull -c 'sh -c "kill -TERM 79370"'
> Waiting for PIDS: 79370.
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/clamav_clamd
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/clamav_clamd
> Stopping clamav_clamd.
> /usr/sbin/service: DEBUG: run_rc_command: doit: su -m mailnull -c 'sh -c "kill -TERM 76373"'
> Waiting for PIDS: 76373.
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/cyrus_imapd
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/cyrus_imapd
> Stopping cyrus_imapd.
> /usr/sbin/service: DEBUG: run_rc_command: doit: kill -TERM 72343
> Waiting for PIDS: 72343.
> /usr/sbin/service: DEBUG: run_rc_command: stop_postcmd: cyrus_imapd_poststop 
> Stopping milteropendkim.
> /usr/sbin/service: DEBUG: run_rc_command: doit: kill -TERM 84032
> Waiting for PIDS: 84032.
> /usr/sbin/service: DEBUG: run_rc_command: stop_postcmd: dkim_postcmd 
> Stopping saslauthd.
> /usr/sbin/service: DEBUG: run_rc_command: doit: su -m cyrus -c 'sh -c "kill -TERM 67912"'
> /usr/sbin/service: DEBUG: pid file (/var/run/saslauthd/saslauthd.pid): not readable.
> /usr/sbin/service: DEBUG: checkyesno: saslauthd_enable is set to YES.
> Starting saslauthd.
> /usr/sbin/service: DEBUG: run_rc_command: doit:  limits -C daemon  su -m cyrus -c 'sh -c "/usr/local/sbin/saslauthd -a ldap "'
> /usr/sbin/service: DEBUG: pid file (/var/run/milteropendkim/pid): not readable.
> /usr/sbin/service: DEBUG: checkyesno: milteropendkim_enable is set to YES.
> /usr/sbin/service: DEBUG: run_rc_command: start_precmd: dkim_prepcmd 
> Starting milteropendkim.
> /usr/sbin/service: DEBUG: run_rc_command: doit:  limits -C daemon  /usr/local/sbin/opendkim  -l   -u mailnull:mailnull -P /var/run/milteropendkim/pid -x /usr/local/etc/mail/opendkim.conf    
> /usr/sbin/service: DEBUG: run_rc_command: start_postcmd: dkim_start_postcmd 
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/cyrus_imapd
> /usr/sbin/service: DEBUG: pid file (/var/run/cyrus-master.pid): not readable.
> /usr/sbin/service: DEBUG: checkyesno: cyrus_imapd_enable is set to YES.
> Starting cyrus_imapd.
> /usr/sbin/service: DEBUG: run_rc_command: doit:  limits -C daemon  /usr/local/cyrus/libexec/master -d 
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/clamav_clamd
> /usr/sbin/service: DEBUG: checkyesno: clamav_clamd_enable is set to YES.
> /usr/sbin/service: DEBUG: run_rc_command: start_precmd: clamav_clamd_precmd 
> Starting clamav_clamd.
> /usr/sbin/service: DEBUG: run_rc_command: doit:  limits -C daemon  su -m mailnull -c 'sh -c "/usr/local/sbin/clamd  "'
> /usr/sbin/service: DEBUG: Sourcing /usr/local/etc/rc.conf.d/clamav_freshclam
> /usr/sbin/service: DEBUG: pid file (/var/run/clamav/freshclam.pid): not readable.
> /usr/sbin/service: DEBUG: checkyesno: clamav_freshclam_enable is set to YES.
> /usr/sbin/service: DEBUG: run_rc_command: start_precmd: clamav_freshclam_precmd 
> Starting clamav_freshclam.
> /usr/sbin/service: DEBUG: run_rc_command: doit:  limits -C daemon  su -m mailnull -c 'sh -c "/usr/local/bin/freshclam  --daemon -p /var/run/clamav/freshclam.pid"'
> /usr/sbin/service: DEBUG: checkyesno: apache24_http_accept_enable is set to NO.
> /usr/sbin/service: DEBUG: checkyesno: apache24_configcheck_disable is set to NO.
> /usr/sbin/service: DEBUG: pid file (/var/run/httpd.pid): not readable.
> /usr/sbin/service: DEBUG: checkyesno: apache24_enable is set to YES.
> /usr/sbin/service: DEBUG: run_rc_command: start_precmd: apache24_prestart 
> /usr/sbin/service: DEBUG: checkyesno: apache24_configcheck_disable is set to NO.
> Performing sanity check on apache24 configuration:
> Syntax OK
> /usr/sbin/service: DEBUG: checkyesno: apache24limits_enable is set to NO.
> Starting apache24.
> /usr/sbin/service: DEBUG: run_rc_command: doit:  limits -C daemon  /usr/local/sbin/httpd  -DNOHTTPACCEPT 
> root@mail:~ # ps ax|grep milter
> 35762  1  S+J  0:00.00 grep milter
> root@mail:~ # service milter-opendkim restart
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: pid file (/var/run/milteropendkim/pid): not readable.
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: checkyesno: milteropendkim_enable is set to YES.
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: pid file (/var/run/milteropendkim/pid): not readable.
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: checkyesno: milteropendkim_enable is set to YES.
> milteropendkim not running? (check /var/run/milteropendkim/pid).
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: pid file (/var/run/milteropendkim/pid): not readable.
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: checkyesno: milteropendkim_enable is set to YES.
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: run_rc_command: start_precmd: dkim_prepcmd 
> Starting milteropendkim.
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: run_rc_command: doit:  limits -C daemon  /usr/local/sbin/opendkim  -l   -u mailnull:mailnull -P /var/run/milteropendkim/pid -x /usr/local/etc/mail/opendkim.conf    
> /usr/local/etc/rc.d/milter-opendkim: DEBUG: run_rc_command: start_postcmd: dkim_start_postcmd 
> root@mail:~ # ps ax | grep milter
> 37977  -  SsJ  0:00.00 /usr/local/sbin/opendkim -l -u mailnull:mailnull -P /var/run/milteropendkim/pid -x /usr/local/etc/mail/opendkim.conf
> 38348  1  S+J  0:00.00 grep milter


Any hint about this?

I was about opening a bug report, but I thought to ask, before...

  bye & Thanks
	av.