Sendmail server 的啟動
sendmail Server 的啟動
sendmail Server 的啟動是相當(dāng)?shù)暮唵蔚?,?Red Hat 的系統(tǒng)當(dāng)中,你可以依序啟動 sendmail 以及 POP3 這個服務(wù)喔:
一、 啟動 sendmail
[root@test root]# /etc/rc.d/init.d/sendmail start
Starting sendmail:
[ OK ]
二、啟動 POP3 這個協(xié)定
[root@test root]# cd /etc/xinetd.d
[root@test xinetd.d]# vi ipop3
# 找到下面這一行:
disable = yes
# 將他改成
disable = no
# 儲存后離開!至于關(guān)于sendmail啟動 更詳細(xì)的說明,可以參考本文推薦的其他文章噢!
[root@test cf]# /etc/rc.d/init.d/xinetd restart
[root@test cf]# netstat -tl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:pop3 *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
看到了嗎?這樣我們的 sendmail Serve 就已經(jīng)啟動了!
他已經(jīng)可以進行收信與送信的工作啰!事實上,如果您曾經(jīng)以 vi 檢查過 /etc/rc.d/init.d/sendmail 這個檔案的話,你會發(fā)現(xiàn)他其實就是使用 /usr/sbin/sendmail 這支程序在工作的啦!
sendmail通常的指令下達(dá)方式為:
[root@test root]# /usr/sbin/sendmail -bd -q30m
參數(shù)說明:
-bd : 表示將 sendmail 以 daemon (可以想成常駐內(nèi)存的類型) 的類型啟動!
-q : queue 的意思,后面接的是時間參數(shù),時間參數(shù)有:
s (秒) m(分) h(小時) 及 d(天)
-q30m 表示每隔三十分鐘,會將放置在郵件隊列 ( 一般是在 /var/spool/mqueue )的sendmail郵件嘗試寄出一次!所以,上面的例子當(dāng)中,說的是將 sendmail 以 daemon 的類型啟動之后,并且每 30 分鐘去將sendmail郵件隊列(為寄出的郵件)嘗試寄出一次!
而 Red Hat 針對sendmail郵件隊列寄送郵件的時間,則是設(shè)定在 /etc/sysconfig/sendmail 這個檔案里面喔!
注:
如果您在啟動 sendmail 的時候,出現(xiàn)類似這段文字:
*** Warning: File `virtusertable.db' has modification time in the future (2003-01-13 11:57:26 > 2003-01-13 06:04:40)
make: warning: Clock skew detected. Your build may be incomplete.
這表示您在安裝 Linux 的時候,可能發(fā)生一些時間上面的錯誤判斷了!
導(dǎo)致于你的 sendmail 相關(guān)的設(shè)定檔竟然比目前的時間還要新,這個時候可以使用:
touch /etc/mail/*
來將檔案的時間更新為目前的時間,那就可以順利的啟動 Sendmail 啰! ^_^
【編輯推薦】