/ 中存储网

解决Linux系统sendmail服务启动慢的问题

2014-11-05 23:35:41 来源:中存储网

平时装了个linux虚拟机,由于是做测试用,所以也不怎么用sendmail,一装完就把相应的服务给关掉了,但是最近由于自己要做个测试用sendmail发送邮件,于是启动sendmail服务,但是感觉启动的时候特别特别的慢,重启sendmail服务也特别的慢,于是感觉肯定那里设置有问题,因为之前做测试改了很多的东西,于是上网查找相应的资料,都未很好的说明原因,偶尔看见说sendmail启动慢的问题可能是由于host主机名造成的,于是查看/etc/hosts文件,内容如下:
[root@gfs1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1         localhost.localdomain localhost
::1  localhost6.localdomain6 localhost6

我的主机名在/etc/resolv.conf里面改成了gfs1,本机ip地址为:192.168.1.181,根据网上的提示在主机名配置里做了如下设置:
root@gfs1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1         localhost.localdomain localhost
::1  localhost6.localdomain6 localhost6
192.168.1.181   gfs1.    gfs1

注意:第一个gfs1后面有个小数点(.)
重新启动sendmail服务,速度飞快,得以解决,看样子还是主机名造成的啊!!!