Chinaunix首页 | 论坛 | 博客
  • 博客访问: 406571
  • 博文数量: 403
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -70
  • 用 户 组: 普通用户
  • 注册时间: 2016-09-05 12:45
文章分类

全部博文(403)

文章存档

2014年(3)

2013年(1)

2012年(3)

2011年(21)

2010年(13)

2009年(64)

2008年(9)

2007年(36)

2006年(253)

分类: LINUX

2011-05-24 09:33:33

在SUSE Linux安裝OpenWebMail的步驟

先安裝MTA (Mail Server) 套件:建議使用yast2管理套件 Software-->software management

必要套件: postfix  or sendmail
使用postfix 或 sendmail 當作SMTP server (用來寄信)

強化功能可再裝 sasl 及 dovecot

sasl 用來驗證, 是否幫 user 做 mail Relay
dovecot 用來收信 (支援 pop3,imap)

1. 啟動 smtp server

# service postfix restart  or service sendmail restart

# chkconfig postfix on   or  chkconfig sendmail on 

2. 檢查 smtp server 是否已啟動 (smtp port 25)

# telnet  localhost 25

3. 以wget 下載 openwebmail 及其他必要的 packages

最近版本網址 http://openwebmail.org/openwebmail/download/current/ (每週更新)

# wget http://openwebmail.org/openwebmail/download/current/openwebmail-current.tar.gz

#tar xvfz  openwebmail-....tar.gz  (解開會產生兩組目錄 data 及 cgi-bin都包括openwebmail)

4. 安裝其他重要套件

從  下載


安裝 Text-lconv (請參考 INSTALL)

# cd ./Text-Iconv-........
# perl Makefile.PL
# make
# make test
# make install

安裝 libiconv   (請參考 INSTALL.generic)

# cd ./libiconv
# ./configure
# make
# make check  (檢查安裝, 不一定要執行)
# make install

5. 配合apache安裝openwebmial 網頁 (請查閱openwebmail.conf相關設定說明)

# tar zxvf openwebmail-current.tar.gz
# mv ./data/openwebmail /srv/www/htdocs
# mv ./cgi-bin/openwebmail /srv/www/cgi-bin

# vi /etc/sysconfig/mail   (視需要修改mail內容)

6. 修改設定檔安裝路徑 (對apache2的設定要很清楚)

# vi /srv/www/cgi-bin/openwebmail/etc/openwebmail.conf

ow_cgidir               /srv/www/cgi-bin/openwebmail
ow_htmldir              /srv/www/htdocs/openwebmail


7. 修改Linux/Unix密碼認證 (解決無法登入的問題)
# vi /srv/www/cgi-bin/openwebmail/etc/defaults/auth_unix.conf
#passwdfile_encrypted   /etc/master.passwd
passwdfile_encrypted    /etc/shadow

8. 修改下列目錄權限, 讓openwebmail可以root的權限執行或建立所需的目錄及檔案

 

chown root.root /srv/www/cgi-bin/openwebmail
chown -R root.root /srv/www/htdocs/openwebmail
chown root.mail /srv/www/cgi-bin/openwebmail/*
chmod 4555 /srv/www/cgi-bin/openwebmail/openwebmail*.pl
chown root.mail /srv/www/cgi-bin/openwebmail/openwebmail*.pl
chmod 4555 /usr/bin/suidperl

9. 初始化 openwebmail

# /srv/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

Please change 'dbm.conf' from (出現什麼就改什麼)

dbm_ext                 .db
dbmopen_ext             none
dbmopen_haslock         no

to

dbm_ext                 .pag
dbmopen_ext             none
dbmopen_haslock         no

10. 修改  dbm.conf  之後,  再執行一次 openwebmail-tool.pl --init

# vi /srv/www/cgi-bin/openwebmail/etc/defaults/dbm.conf

# /srv/www/cgi-bin/openwebmail/openwebmail-tool.pl --init  (再執行一次)

如沒問題會出現...done.
Welcome to the OpenWebMail!

 在IE執行

若可以登入, 就算成功了....


PS. 有必要可修改Apache相對路徑或虛擬主機的目錄

# vi /etc/apache2/default-server.conf
================================================
Alias /openwebmail "/srv/www/htdocs/openwebmail"
ScriptAlias /webmail "/srv/www/cgi-bin/openwebmail/openwebmail.pl"
ScriptAlias /mail "/srv/www/cgi-bin/openwebmail/openwebmail.pl"
================================================

# rcapache2 restart

希望能做到類似 http://mail.pccu.edu.tw  可直接進入 openwebmail

 

阅读(1148) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~