Sendmail doesn't restart

I'm running latest Centos 7, Webmin/Virtualmin (Pro), and Sendmail on a new server, and migrating users to it.

I've been troubleshooting the Sendmail service stopping, and found that when Webmin tries to to a restart, the service stops but does not restart.

Manually restarting sendmail through the Webmin GUI or through the standard CLI ( systemctl restart sendmail.service ) works fine.

Here's what the sendmail logs look like when Webmin tries unsuccessfully to do a restart.

Jan 10 10:00:11 www4 sendmail[1127]: restarting /usr/sbin/sendmail due to signal
Jan 10 10:00:11 www4 sm-msp-queue[1145]: restarting /usr/sbin/sendmail due to signal
Jan 10 10:00:11 www4 sendmail[10413]: starting daemon (8.14.7): SMTP+queueing@01:00:00
Jan 10 10:00:11 www4 sendmail[10413]: STARTTLS: CRLFile missing
Jan 10 10:00:11 www4 sendmail[10413]: STARTTLS=server, Diffie-Hellman init, key=2048 bit (/)
Jan 10 10:00:11 www4 sendmail[10413]: STARTTLS=server, init=1
Jan 10 10:00:11 www4 sendmail[10413]: started as: /usr/sbin/sendmail -bd -q1h
Jan 10 10:00:11 www4 sendmail[10413]: NOQUEUE: stopping daemon, reason=signal
Jan 10 10:00:12 www4 sendmail[10421]: NOQUEUE: connect from root@localhost

Here is a manual start via Servers > Sendmail Mail Server > Start button:

Jan 10 10:00:40 www4 sendmail[10469]: starting daemon (8.14.7): SMTP+queueing@01:00:00
Jan 10 10:00:40 www4 sendmail[10469]: STARTTLS: CRLFile missing
Jan 10 10:00:40 www4 sendmail[10469]: STARTTLS=server, Diffie-Hellman init, key=2048 bit (/)
Jan 10 10:00:40 www4 sendmail[10469]: STARTTLS=server, init=1
Jan 10 10:00:40 www4 sendmail[10469]: started as: /usr/sbin/sendmail -bd -q1h
Jan 10 10:00:40 www4 sm-msp-queue[10486]: starting daemon (8.14.7): queueing@01:00:00
Jan 10 10:00:40 www4 sendmail[10490]: NOQUEUE: connect from root@localhost

Here is a manual restart via systemctl restart sendmail.service

Jan 10 10:14:42 www4 sendmail[10469]: NOQUEUE: stopping daemon, reason=signal
Jan 10 10:14:42 www4 sendmail[11372]: starting daemon (8.14.7): SMTP+queueing@01:00:00
Jan 10 10:14:42 www4 sendmail[11372]: STARTTLS: CRLFile missing
Jan 10 10:14:42 www4 sendmail[11372]: STARTTLS=server, Diffie-Hellman init, key=2048 bit (/)
Jan 10 10:14:42 www4 sendmail[11372]: STARTTLS=server, init=1
Jan 10 10:14:42 www4 sendmail[11372]: started as: /usr/sbin/sendmail -bd -q1h
Jan 10 10:14:42 www4 sm-msp-queue[11388]: starting daemon (8.14.7): queueing@01:00:00

I'm happy to look/experiment as to what is going on under the hood if you can point me in the right direction.

Thanks.

Comments

Howdy -- I don't have Sendmail installed, so I'm not able to see exactly what you're seeing.

However, you may want to try going into Webmin -> Servers -> Sendmail, click the gear icon (or click Module Config, depending on your theme) -- and there, see what command Webmin is using to restart Sendmail.

I'm wondering if there's something awry with what command it's attempting to use on your system.

Wow - thanks. It didn't occur to me that it would be that simple... and I've learned something that will be helpful in the future, I'm sure.

Sendmail was configured to use System V init scripts to start and stop via the 'system' command, and restart was configured to 'stop and start'. I changed restart to 'systemctl restart sendmail.service' and now when Webmin wants to restart Sendmail, it works flawlessly.

Thanks again. I've been a Virtualmin Pro user for over 8 years, and you folks never fail to impress on the rare occasions where I've needed to reach out for support.

Hey that's fantastic, thanks for letting us know that worked, and thanks as well for your kind words.

Let us know if you have any additional questions!

Oh and in the meantime, it sounds like we need to update our system to use a different restart command on CentOS 7.