Is there a graceful way to pick up new changes in sendmail?
sendmail relies on the retry mechanisms in the SMTP protocol for reliability of delivery and does not need to depend on a clever server implementation. Which is why that doesn't exist as far as I know.
When you restart sendmail simply aborts any incoming connections with a temporary error and sends a 421 response expecting the delivery to be retried later as per RFC 5321 section 3.8 and Section 4.2.5.
Any interrupted and undelivered outgoing messages will be processed from the queue sendmail maintains after a restart as well.
It is not sendmail.mc
changes that you need to track, but sendmail.cf
. Sendmail reads sendmail.cf
. sendmail.mc
is written in m4 and the output is sendmail.cf
. So you need to produce it first and then kill -HUP
the sendmail process ID.
In Debian / Ubuntu systems running sendmailconfig
is enough. In CentOS you need something like:
cd /etc/mail
/etc/mail/make
service sendmail restart
And you are done. These produce an up-to-date sendmail.cf
and restart sendmail afterwards.