平時裝了個linux虛擬機,因爲是作測試用,因此也不怎麼用sendmail,一裝完就把相應的服務給關掉了,可是最近因爲本身要作個測試用sendmail發送郵件,因而啓動sendmail服務,可是感受啓動的時候特別特別的慢,重啓sendmail服務也特別的慢,因而感受確定那裏設置有問題,由於以前作測試改了不少的東西,因而上網查找相應的資料,都未很好的說明緣由,偶爾看見說sendmail啓動慢的問題多是因爲host主機名形成的,因而查看/etc/hosts文件,內容以下:linux
[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 localhost6dom
個人主機名在/etc/resolv.conf裏面改爲了gfs1,本機ip地址爲:192.168.1.181,根據網上的提示在主機名配置裏作了以下設置:ide
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後面有個小數點(.)ui
從新啓動sendmail服務,速度飛快,得以解決,看樣子仍是主機名形成的啊!!!spa