安裝
yum -y install perl-suidperl perl-Compress-Zlib解決不能安裝perl-Compress-Zlib 問題
cd /etc/yum.repos.d
lftpget http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repo
yum install openwebmail
google find perl-Text-Iconvrpm -ivh http://apt.sw.be/redhat/el5/en/i386/dag/RPMS/perl-Text-Iconv-1.4-1.2.el5.rf.i386.rpm
rpm -ivh perl-Text-Iconv-1.7-1.el5.rf.i386.rpm
wget perl-Text-Iconv-1.7-1.el5.rf.x86_64.rpm
rpm -ivh perl-Text-Iconv-1.7-1.el5.rf.x86_64.rpm
wget http://openwebmail.org/openwebmail/download/redhat/rpm/release/2.53/openwebmail-2.53-3.i386.rpm
wget http://openwebmail.org/openwebmail/download/redhat/rpm/release/2.53/openwebmail-data-2.53-3.i386.rpm
rpm -ivh openwebmail-2.53-3.i386.rpm openwebmail-data-2.53-3.i386.rpm
rm -rf openwebmail-2.53-3.i386.rpm
修改 openwebmail.conf
cp /var/www/cgi-bin/openwebmail/etc/openwebmail.conf /var/www/cgi-bin/openwebmail/etc/openwebmail.conf.bak
vim /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
57行 enable_pop3 yes 修改成--> enable_pop3 no76行 <default_signature>
64行 default_language en 修改成--> default_language zh_TW.Big5
87行 default_iconset Cool3D.English 修改成--> default_iconset Cool3D.Chinese.Traditional
77行 --
78行 梧棲國中 Taichung County WuChi Junior High School
79行 </default_signature>#此此四行是使用者寄信的預設簽名檔,請自行修改紅字部分204行 webdisk_rootpath /webdisk 修改成--> webdisk_rootpath /222#quota_module quota_du.pl 修改成--> quota_module quota_du.pl
************************************************************************************
#################################################
#################################################
加LDAP設定
#################################################################vim /var/www/cgi-bin/openwebmail/etc/openwebmail.confdomainnames www5.wcjs.tcc.edu.twauth_module auth_pam.pl另外再新增一行,這樣讓使用者登入時可以自動建立相關的目錄與檔案
create_syshomedir yes
vim /var/www/cgi-bin/openwebmail/auth/auth_pam.pl
18 use Authen::PAM;
29 my $servicename = $conf{'servicename'} || "login";
vim /etc/pam.d/login
4 auth sufficient pam_securetty.so no_warn
5 #auth sufficient /usr/local/lib/pam_ldap.so no_warn try_first_pass
6 auth sufficient pam_ldap.so no_warn try_first_pass
7 auth include system-auth
2 auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
3 auth include system-auth
#################################################################
yum install gcc pam-devel
安裝 Authen-PAM
cpan
install Authen::PAM
wget ftp://194.199.20.114/linux/dag/redhat/el5/en/x86_64/dag/RPMS/perl-Authen-PAM-0.16-1.2.el5.rf.x86_64.rpm
rpm -ivh perl-Authen-PAM-0.16-1.2.el5.rf.x86_64.rpm
rpm -ivh perl-Authen-PAM-0.16-1.2.el5.rf.x86_64.rpm
#################################################
[root@svrx2 defaults]# vi /var/www/cgi-bin/openwebmail/etc/defaults/auth_ldap.conf
ldaphost www2.wcjs.tcc.edu.tww # LDAP SERVER IP
ou Users # LDAP ORGANIZATIONAL UNIT
cn admin # LDAP USER
dc1 ldap # FIRST DC
dc2 wcjhs # SECOND DC
password f********* # LDAP PASSWORD
ldaphost www2.wcjs.tcc.edu.tww # LDAP SERVER IP
ou Users # LDAP ORGANIZATIONAL UNIT
cn admin # LDAP USER
dc1 ldap # FIRST DC
dc2 wcjhs # SECOND DC
password f********* # LDAP PASSWORD
####################################################
修改 dbm.conf
cp /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf.bak
vim /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no
使用 Open WebMail 變更密碼的時候,順便修改 samba 密碼
cp /var/www/cgi-bin/openwebmail/etc/auth_unix.conf /var/www/cgi-bin/openwebmail/etc/auth_unix.conf.bak
vim /var/www/cgi-bin/openwebmail/etc/auth_unix.conf
13行 change_smbpasswd no 修改成--> change_smbpasswd yes
################################################################
************************************************************************************************
初始化
************************************************************************************************
初始化
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init測試:https://IP/cgi-bin/openwebmail/openwebmail.pl
縮短 Open WebMail 連結網址:
vim /etc/httpd/conf/httpd.conf測試:https://IP/mail/
ScriptAlias /mail "/var/www/cgi-bin/openwebmail/openwebmail.pl"#在設定檔最後面加上這一行/etc/rc.d/init.d/httpd restart
註:
- 參考資料:http://turtle.ee.ncku.edu.tw/~tung/openwebmail/
- How to install Open WebMail on Red Hat Enterprise Linux 3 By Thomas Chung <tchung AT openwebmail.org>
- 官方安裝說明檔:/var/www/data/openwebmail/doc/readme.txt
- cd /var/www/cgi-bin/openwebmail/etc/
- openwebmail.conf - 主要的設定檔,管理者要設定的選項,應該都寫在這個檔案裡頭
- openwebmail.conf.help - openwebmail.conf 所有選項的說明檔