Centos下yum安裝配置OpenWebMail

來源:互聯網
上載者:User

OpenWebMail 2.53 配置

檢查perl版本是否大於5.8.5-9

perl -version

yum的安裝方法

先修改後rpmforge.repo,Centos5執行yum更新有有一些?突,先避開掉

vi /etc/yum.repos.d/rpmforge.repo

exclude = perl-Compress*,perl-IO-Compress*

串連國外網路,下載安裝速度更快!

proxy = http://proxy.edu.tw:3128
timeout = 300

cd /etc/yum.repos.d
lftpget http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repo

yum -y install perl-suidperl perl-Compress-Zlib perl-Text-Iconv openwebmail

預設路徑

主程式:/var/www/cgi-bin/openwebmail
資料夾:/var/www/data/openwebmail

最新openwebmail軟體

http://openwebmail.org/openwebmail/download/current/openwebmail-current.tar.gz
http://openwebmail.org/openwebmail/download/redhat/rpm/packages/centos5/
 

tar的安裝方法

cd /var/www(www.111cn.net)
tar -zxvf openwebmail-X.XX.tar.gz
mv data/openwebmail html/
rmdir data

vi /var/www/cgi-bin/openwebmail/etc/auth_unix.conf (由 etc/defaults/auth_unix.conf copy 過來改)
passwdfile_encrypted 設成 /etc/shadow
passwdmkdb 設成 none

vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
mailspooldir 設成 /var/spool/mail
ow_htmldir 設成 /var/www/html/openwebmail
ow_cgidir 設成 /var/www/cgi-bin/openwebmail
spellcheck 設成 /usr/bin/ispell


/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init


將下列文字加到 /etc/logrotate.d/syslog 讓系統定期砍掉過去的 log
/var/log/openwebmail.log {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
 
openwebmail相關設定

cp /var/www/cgi-bin/openwebmail/etc/openwebmail.conf /var/www/cgi-bin/openwebmail/etc/openwebmail.conf.bak
vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf

ow_htmldir /var/www/html/openwebmail
ow_htmlurl /openwebmail


default_language zh_TW.Big5
#default_language zh_TW.utf8 網路建議
#default_language zh_TW.UTF-8 我自己研究111cn.Net
default_iconset Cool3D.Chinese.Traditional
default_fontsize 12pt
default_msgformat both
newmailsound YouGotMail.English.wav

202行 webdisk_rootpath /webdisk 修改成--> webdisk_rootpath /

修改dbm.conf

cp /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf.bak
vi /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
vi /var/www/cgi-bin/openwebmail/etc/auth_unix.conf

change_smbpasswd yes

執行安裝

/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

簡化網址

vi /etc/httpd/conf/httpd.conf

ScriptAlias /mail "/var/www/cgi-bin/openwebmail/openwebmail.pl"

openwebmail 自動建立目錄參數

vi /var/www/cgi-bin/openwebmail/openwebmail.pl
if (mkdir($homedir, 0700)) 改成 if (mkdir($homedir, 0755))

重新啟用httpd

service httpd restart
 
perl-CGI-SpeedyCGI 加速效能
yum -y install perl-CGI-SpeedyCGI
從speedy主程式再??一份,root-suid執行許可權的執行檔speedy_suid

cd /usr/bin
cp speedy speedy_suidperl
chmod u+s speedy_suidperl
將/var/www/cgi-bin/openwebmail/底下所有的執行檔中的第一行,將suidperl改成speedy_suid

vi chspeedy.sh

for name in open*.pl ; do
cp -a $name ${name}.old
sed -e "s/suidperl -T/speedy_suidperl/" < ${name}.old > ${name}
done

執行 ./chspeedy.sh
 
公用規則 filter.book
先刪除公用帳號global個人信件管理檔案www.111Cn.nEt

cd /home/global/.openwebmail/webmail/
rm filter.book

在公用帳號global底下建立與共用信件管理檔案filter.book的連結,許可權為640

ln -s /var/www/cgi-bin/openwebmail/etc/filter.book filter.book
chown global.group /var/www/cgi-bin/openwebmail/etc/filter.book
chmod 640 /var/www/cgi-bin/openwebmail/etc/filter.book


 
公用通訊錄 addressbooks
公用通訊錄


在公用帳號global底下建立與共用信件管理檔案連結,許可權為640


將檔案/var/www/cgi-bin/openwebmail/etc/addressbooks/global改為公用帳號

接下來,就用公用帳號stxxxxx登入openwebmail,就可以新增聯絡人在共用通訊錄了。

cd /var/www/cgi-bin/openwebmail/etc/addressbooks/
chown user.group global
chmod 640 global

新增多個公用通訊錄

在/var/www/cgi-bin/openwebmail/etc/addressbooks/目錄底下新增一個檔案,,該檔案就是共用通訊錄名稱。

範例:singsong社團群組專用的通訊錄

touch singsong
chown stxxxxx.st singsong
chmod 640 singsong

完成後,登入到openwebmail後就會在通訊錄?面看到一個 singsong *
 
過濾偽造 EXE 附件型態的信件: (fakedexecontenttype filter)
電子郵件病毒原本只有在使用者開啟信件中屬於可執行檔的附件時,才會感染病毒。但是新近出現的一些電子郵件病毒卻能作到只要使用者開啟這封郵件就會中毒,讓使用者聞毒色變 . 這個 filter 會過濾這類的信件, 將其移到垃圾桶.
vi /var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf

四個 filter 在 defaults/openwebmail.conf 中內定是關閉的, 分別是

default_filter_badformatfrom no
default_filter_fakedsmtp no
default_filter_fakedfrom no
default_filter_fakedexecontenttype no


建議開啟 default_filter_fakedexecontenttype 以過濾掉大部分的郵件病毒

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.