FreeBSD 研习课程讲义
Prev Next

设定 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

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


Prev Home Next
UP