Latest News

Home » Linux主機伺服器 » 在Linux主機上安裝Open WebMail與設定

在Linux主機上安裝Open WebMail與設定

在Linux主機上安裝Open WebMail與設定

設定 Open WebMail

在 cgi-bin/openwebmail/etc 可以發現有 openwebmail.conf.default, openwebmail.conf.help 和 openwebmail.conf 這三個檔, 其中
openwebmail.conf.default     內定的設定檔, 包含所有 Open WebMail 可以頂的選項
openwebmail.conf.help     openwebmail.conf.default 所有選項的說明檔
openwebmail.conf

主要的設定檔, 管理者要設定的選項, 應該都寫在這個檔案裡頭, 而不應該直接去改 openwebmail.conf.default

 

openwebmail.conf 的內容

# Open WebMail configuration file
#
# This file contains just the overrides from openwebmail.conf.default
# please make all changes to this file.
#
# This file sets options for all domains and all users.
# To set options on per domain basis, please put them in sites.conf/domainname
# To set options on per user basis, please put them in users.conf/username
#

domainnames auto
auth_module auth_unix.pl
mailspooldir /var/mail
dbm_ext .db
dbmopen_ext none
dbmopen_haslock no
ow_cgidir /usr/local/www/cgi-bin/openwebmail
ow_cgiurl /cgi-bin/openwebmail
ow_htmldir /usr/local/www/data/openwebmail
ow_htmlurl /openwebmail
logfile /var/log/openwebmail.log
spellcheck /usr/local/bin/ispell
default_language en

<default_signature>

Open WebMail Project (http://openwebmail.org)
</default_signature>

以上的內容可能隨著您系統而有所不同, 不過在您完成前述的安裝後, 您可以修改以下幾個選項

domainnames

一般情況下, openwebmail 應該能正確地判斷出您 server 的 domainname, 進而正確地設定使用者的預設 Email address, 但如果發生 openwebmail 判斷錯誤或是您希望設定成其他的 domainname, 你可以將這個選項由 auto 改成您所要的 domainname, 如 mail.myserver.com.tw

spellcheck

設定拼字檢查程式所在的路徑, 一般而言, 可能是以下其中之一, 您可以用 ls -l filename 方式檢查看看

/usr/bin/apsell
/usr/bin/ispell
/usr/local/bin/aspell
/usr/local/bin/ispell

default_language

內定的語言, 我們把它由 en(英文) 改成 zh_TW.Big5 (繁體中文)

註: 自 2.0 版 20030416 以後, 已經不需要在 openwebmail.conf 中設定 default_language 這個選項了, openwebmail 會根據使用者所用的瀏覽器設定, 自動選擇適合的內定的語言

default_signature

設定預設的簽名檔, 設在這裡的值會成為每個新使用者的預設簽名檔, 不過使用時每個使用者可以依自己的需求, 設定成其他的內容

初始化 Open WebMail

在前面的安裝步驟裡頭, 最後一個步驟是

cd the_direcotry_of_openwebmail_cgi_scripts
./openwebmail-tool.pl –init

這個動作會建立一些 Open WebMail 在執行時會用到的對應表, 如簡繁轉換, 陰陽曆轉換等. 如果這個動作沒有做的話, 使用者將無法透過 Web 介面使用 Open WebMail

而由於在各種不同作業系統上的 perl 版本的差異, 其所使用的 dbm 種類也不盡相同, 有的可能需要特殊的設定後才能使用, –init 在建立上述對應表之前, 會測試系統上 perl 的 dbm 種類, 並且提供一些必要的建議事項

1. 首先會檢查 openwebmail.conf 中的 dbm_ext, dbmopen_ext 和 dbmopen_haslock 三個選項的設定是否正確, 如果設定有誤的話, 您會看到如下的畫面

Please change the following 3 options in openwebmail.conf

from

dbm_ext .db
dbmopen_ext none
dbmopen_haslock no

to

dbm_ext .db
dbmopen_ext %dbm_ext%
dbmopen_haslock yes

2. 其次是檢查系統上的 dbm 是否內定使用 DB_File.pm 這個模組, 如果是而且有需要的話, 會建議您對 DB_File.pm 作一些必要的修改 (這個修改是由 DB_File.pm 作者所提供的), 您會看到如下畫面

Please modify /usr/libdata/perl/5.00503/mach/DB_File.pm by adding

$arg[3] = 0666 unless defined $arg[3];

before the following text (about line 247)

# make recno in Berkeley DB version 2 work like recno in version 1

請務必依照以上的建議作修改, 否則您的 Open WebMail 可能會無法完全正常動作, 也請記得在做完修改之後, 別忘了重新執行一次 ‘./openwebmail-tool.pl –init’

測試 Open WebMail

在完成上面的步驟後, 您可以連線到

http://your_server_hostname/cgi-bin/openwebmail/openwebmail.pl

並且登入看看是否一切正常

About

發佈留言