简洁的想法

仁爱、喜乐、和平、忍耐、恩慈、良善、信实、温柔、节制

Starting Mail Transport Agent (MTA) Sendmail

| Comments

如果你那台安装了Sendmail的Ubuntu服务器在启动的时候卡在这行提示上很久:

1
Starting Mail Transport Agent (MTA) sendmail

那大概是因为你的/etc/hosts配置有问题.

1, 查看你的主机名, 发现我的机器叫 neten:
vi /etc/hostname

2, 然后把脉:
vi /var/log/mail.log

1
2
Aug 11 18:00:20 neten sm-msp-queue[1075]: My unqualified host name (neten) unknown; sleeping for retry
Aug 11 18:01:25 neten sm-msp-queue[1075]: unable to qualify my own domain name (neten) -- using short name

如果出现上面两句就可以对症下药了

3, 如果你的主机名为neten, 那把下面的代码覆盖写入/etc/hosts

1
2
3
4
5
6
7
8
9
10
127.0.0.1	localhost.localdomain	localhost
127.0.1.1	neten.localdomain neten

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

解决方法就是这么简单, 重启看看是不是快了很多?
参看: zyxware

Comments