No longer need to run m4 to rebuild under CentOS 7

When I was running Sendmail on a CentOS 5 server, I needed to use the m4 command after modifying /etc/ to rebuild /etc/ from that file, i.e., m4 /etc/mail/ > /etc/mail/ E.g., see Configuring Sendmail to Use a Smart Host, but that is no longer needed with CentOS 7 and, though I went from CentOS 5 to 7, may have gone away as a needed step in CentOS 6. Now, if you modify /etc/, when you restart sendmail, e.g., with service sendmail restart, the file is automatically rebuilt.

If you issue the command service sendmail restart, you will see Redirecting to /bin/systemctl restart sendmail.service.

# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service

If you examine /usr/lib/systemd/system/sendmail.service, you will see that the make command, i.e., /etc/mail/make, is run.

# locate sendmail.service
# cat /usr/lib/systemd/system/sendmail.service
Description=Sendmail Mail Transport Agent
Conflicts=postfix.service exim.service

ExecStartPre=-/etc/mail/make aliases
ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG


You can also verify that is recreated when you restart Sendmail by modifying and then restarting Sendmail as shown below:

# ls -l /etc/mail/sendmail.??
-rw-r--r--. 1 root root 61060 Sep  2 19:44 /etc/mail/
-rw-r--r--. 1 root root  8226 Sep  2 20:03 /etc/mail/
[root@moonpoint bin]# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
[root@moonpoint bin]# ls -l /etc/mail/sendmail.??
-rw-r--r--. 1 root root 60494 Sep  2 20:03 /etc/mail/
-rw-r--r--. 1 root root  8226 Sep  2 20:03 /etc/mail/


TechRabbit ad 300x250

Justdeals Daily Electronics Deals1x1 px