那麼這種 webmail 的地位是甚麼呢?是否只要有 webmail 就不需要 mail server 了呢?當然不是這樣!webmail 其實可以被當成是一種 MUA 來看待,也就是說,您可以將他想成與 outlook express 同等級的應用軟體;而透過這個 webmail 我們可以對 mail serve r進行電子郵件的存取。也就是說, webmail 要能夠使用,必須要架構在具有 WWW 及 Mail Server 的服務上面才行!這幾者之間的關係可以簡單的這樣看:
[root@test openwebmail]# cd etc
[root@test etc]# vi dbm.conf
# 找到並修改成底下幾行:
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock yes
[root@test etc]# cd ..
[root@test openwebmail]# ./openwebmail-tool.pl --init
Welcome to the Open WebMail!
This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:
OS: Linux 2.4.22-1.2199.nptl i686
Perl: 5.008003
WebMail: Open WebMail 2.40 20040816
Send the site report?(Y/n)
sending report...
Thank you.
3. 進一步設定:
[root@test openwebmail]# cd etc
[root#test etc]# vi openwebmail.conf
# 找到這一行:
default_language en
# 改成這樣子:
default_language zh_TW.Big5
一般來說,設定成這樣就足夠您運作 openwebmail 了,不過,您的 WWW 主機必須要能提供 perl 的執行環境,因為 openwebmail 就是以 perl 寫成的啊!以 apache 為例,您必須要知道如何啟動 perl 的 CGI 執行環境: [root@test root]# vi /etc/httpd/conf/httpd.conf
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
AddHandler cgi-script .cgi .pl
至少上面的設定要設定妥當才行啊!好了,那麼如何使用 openwebmail 呢?直接在您的瀏覽器上面輸入: http://your.linux.server/cgi-bin/openwebmail/openwebmail.pl
就可以使用 openwebmail 囉!很簡單吧!不過,如果萬一您的認證一直無法成功的話,可以指定一下認證機制看看: [root@test root]# cd /var/www/cgi-bin/openwebmail/auth
[root@test auth]# vi auth_unix.pl
# 找到底下:
my $passwdfile_plaintext = $conf{'passwdfile_plaintext'} || '/etc/passwd';
my $passwdfile_encrypted = $conf{'passwdfile_encrypted'} || '/etc/master.passwd';
# 改成這樣:
my $unix_passwdfile_plaintext="/etc/passwd";
my $unix_passwdfile_encrypted="/etc/shadow";
creating db /var/www/cgi-bin/openwebmail/etc/maps/b2g ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/g2b ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/lunar ...done.
Welcome to the Open WebMail!
This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:
OS: Linux 2.6.3-14mdk i686
Perl: 5.008003
WebMail: Open WebMail 2.40 20040816
Send the site report?(Y/n) y
sending report...
Thank you.
# 2. 修訂認證機制:
[root@test root]# vi /var/www/cgi-bin/openwebmail/auth/auth_unix.pl
# 找到:
my $passwdfile_encrypted = $conf{'passwdfile_encrypted'} || '/etc/master.passwd';
# 修改成:
my $passwdfile_encrypted = '/etc/shadow';