是否有必要手动重buildsendmail.cf文件,或者这是在服务重启时自动完成的?

CentOS 5.x | 发送邮件

我注意到有关推送来自sendmail.mc的更改的不一致的信息

一些文档build议对sendmail.mc文件进行更改需要两个步骤:

  1. 重buildcf文件: m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
  2. 重新启动sendmail服务

其他文档build议重build过程已经完成作为服务重新启动的一部分。

如果需要步骤1,我可以得到确认吗?


更新:如果我在初始化脚本中grep make,输出显示:

 [root@foo ~]# grep make /etc/init.d/sendmail if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then make all -C /etc/mail -s > /dev/null makemap hash /etc/mail/$i < /etc/mail/$i if [ -x /usr/bin/make -a -f /etc/mail/Makefile ]; then make all -C /etc/mail -s > /dev/null makemap hash /etc/mail/$i < /etc/mail/$i 

在CentOS中你可以:

 /etc/mail/make service sendmail restart 

你还需要安装sendmail-cf软件包。 简单的重新启动不会从.mc重build.cf。

但是(我正在看一台CentOS 6机器)init脚本在启动sendmail时调用例程updateconf ,所以在6.x中只能重启。 什么是输出

 grep make /etc/init.d/sendmail 

在你的机器?

在Debian中,如果需要, sendmailconfig在重新启动之前重新生成.cf文件。

您需要重新生成新的configuration并重新启动以应用configuration。