sm-msp-queue 说:无法限定我自己的域名 (xxx) -- 使用短名称

Bac*_*ach 4 cron hostname syslog sendmail

每隔 20 分钟,连续几天,sm-msp-queuesendmail我猜是与 相关的)在我的里面写了一条ubun这样的消息:

无法限定我自己的域名 (ubun) -- 使用短名称

哪里ubun是网络节点主机名( 的输出uname -n和内容/etc/hostname)。

的内容/etc/mail/local-host-names包括两行:localhostubun

该文件/etc/hosts以两行开头:

127.0.0.1 localhost
127.0.0.1 ubun
Run Code Online (Sandbox Code Playgroud)

该文件/etc/cron.d/sendmail包含一个设置为每 20 分钟运行一次的 cronjob:

*/20 *    *    *    *   smmsp test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp
Run Code Online (Sandbox Code Playgroud)

但是,我不知道该命令smmsp应该做什么;我不能单独运行它,也不能使用sudo(I get sudo: smmsp: command not found)。跑步sudo /usr/share/sendmail/sendmail cron-msp好像什么都没做。

有任何想法吗?

Ben*_*oit 11

如果您的服务器具有完全限定的域名,则此消息应该会消失。在 中/etc/hosts,您可以定义一个 FQDN,如ubun.somedomain.tld

127.0.0.1 localhost
127.0.0.1 ubun.example.com ubun
Run Code Online (Sandbox Code Playgroud)

要在不重新启动系统的情况下应用新主机名(更改/etc/hosts文件后):

$ sudo hostname ubun.example.com
Run Code Online (Sandbox Code Playgroud)

然后检查你有 FQDN :

$ hostname -f
Run Code Online (Sandbox Code Playgroud)

smmsp在您显示它的地方(/etc/cron.d/sendmail不是命令名称,而是用于运行后面命令的用户名。该行的其余部分是命令(测试是否sendmail存在且可执行,然后使用特定选项运行它以执行)要在 crontab 中执行的操作)。

如果在终端上运行该命令似乎什么都不做(在屏幕上什么也不打印),这并不意味着她什么都不做。

顺便说一下,这个命令是定期运行的,用于提交在 Sendmail 队列中等待的邮件。因此,如果您禁用它,则永远不会发送邮件。

  • 如果您没有 FQDN 怎么办? (2认同)