sendmail 更新版本及設定檔

藍色泡泡 14 五月, 2008 12:08 常見伺服服務 靜態連結網址 引用 (0) 預覽列印

sendmail 更新版本

常有很多教學站台只說明安裝,都不說明如何更新版本了,
希望本站台不是這類的網站.Embarassed

sendmail 版本更新步驟 如下:
先備知識-版本判別

telnet 127.0.0.1 25
出現如下圖類似畫面, 紅色表示為主程式版本, 藍色則為設定檔版本.
sendmail 版本判別
此例 主程式和設定檔皆為 8.13.6 版.

(A) 更新主程式
cd /usr/ports/mail/sendmail/
make install
安裝完畢系統會在 /usr/local/etc/rc.d/ 新增兩個檔案 sendmail.sh.sample 及 sm-client.sh.sample 檔案
請將該兩個檔案更名,若有需要請自行備份舊有檔案.
cd /usr/local/etc/rc.d/
mv sendmail.sh.sample sendmail.sh
mv sm-client.sample sm-client.sh
啟動sendmail
前提是 rc.conf 已有 sendmail_enable="YES" 設定
由於本篇是更新sendmail , 故此部分省略
cd /usr/local/etc/rc.d/
./sendmail restart
此時再測試一次版本,就會發現主程式版本已經更新完畢 變更為 8.14.3
但設定檔仍維持 8.13.6 .
sendmail 主程式版本更新, 但設定檔維持原狀

(B) 更新設定檔 (sendmail.cf 及 submit.cf)
此部份動作請參照 work/版本/cf/README 及 work/版本/cf/cf/README 操作,
以下為可能的範例.
cd /usr/ports/mail/sendmail/work/sendmail-8.14.3/cf/cf
./Build generic-bsd4.4.cf
./Build install-cf CF=generic-bsd4.4
cd /usr/ports/mail/sendmail/
make clean

重新啟動sendmail 再次查看版號
sendmail主程式/設定檔版本 皆更新完畢

enjoy it!!

迴響

  1. 萬一您 make install 又 馬上接著 make clean 那麼您的設定暫存檔就會被清掉了,可以透過 make fetch 把這些檔案再次取得.

    panda 作者 panda — 14 五月 2008, 12:50

  2. 我照這方式做完重新啟動sendmail,為何系統預設的sendmail與從ports安裝的變成兩套一起啟動而且衝突了?

    作者 Alf — 17 七月 2008, 15:23

  3. 您用何種方式啟動?
    檢查一下路徑,用ports安裝後的路徑可以從 該port資料夾下的
    pkg-plist 得知.

    也可以檢查 /etc/default/rc.conf 或 /etc/rc.conf , 及 /usr/local/etc/rc.d/ 內的相關sendmail 路徑.

    panda 作者 panda — 18 七月 2008, 11:18

  4. 我在rc.conf裡有sendmail_enable="YES"的描述,rc.d裡面有那兩支啟動sendmail的sh檔之後我有去把rc.conf的描述拿掉,但升級設定檔之後兩邊還是不能配合好,現在我把rc.d裡的sh檔取消改回rc.conf,變成新版的設定檔+舊版的sendmail了。

    PS:我的freebsd是5.4,近期該要升級了。

    作者 Alf — 22 七月 2008, 12:42

  5. 通常新安裝的會在 /usr/local/sbin/ 之下, 設定檔則會在 /etc/mail

    作者 panda — 22 七月 2008, 19:04


發表迴響

發表迴響
 authimage

©2008 - Post by 藍色泡泡 (some rights reserved)