openwebmail 安裝小抄

先由 http://openwebmail.org/ 下載 openwebmail

到 tmp 下 tar zxvf openwebmail.xxx.tar.gz

然後 

mv  ~xxx/WWW/data/openwebmail ~xxx/WWW/openwebmai.bak  #備份一下

mv data/openwebmail ~xxx/WWW/data/openwebmail  #放入新的 html

mv  ~xxx/cgi-bin/openwebmail ~xxx/openwebmail.bak

mv cgi-bin/lopenwebmail ~xxx/cgi-bin/openwebmail

cd  ~xxx/service/cgi-bin/openwebmail/etc

vi  openwebmail.conf

修改:

mailspooldir            /var/spool/mail

ow_cgidir               /home/xxx/cgi-bin/openwebmail

ow_htmldir              /home/xxx/WWW/data/openwebmail

default_ctrlposition_folderview top
default_ctrlposition_msgread    top

default_language                zh_TW.utf8

default_iconset                 Cool3D.Chinese.Traditional
<default_signature>

WebMail Service of fhl (http://wmail.fhl.net)
</default_signature>

然後

cp defaults/auth_unix.conf .

vi auth_unix.conf 

修改

passwdfile_plaintext    /etc/passwd
passwdfile_encrypted    /etc/shadow
passwdmkdb              none

新增

/home/xxxx/cgi-bin/openwebmail/etc/dbm.conf 

裡面放入

dbm_ext             .db
dbmopen_ext         .db
dbmopen_haslock     no


 最後

/home/xxxx/cgi-bin/openwebmail/openwebmail-tool.pl –init

如何允許使用者scp但是不許使用者ssh進入帳號?

以前我們都是透過assign一個不能登入的shell(如passwd)來防止使用者進入帳號中執行程式,這種舉動可以阻止使用者用ssh、telnet等工具登入,但是還可以允許使用者用 ftp登入。無奈這樣的行為也會阻擋使用者用scp或winscp這類保密的檔案傳輸工具登入系統。我多次閱讀 ssh 與 scp的說明書還是無法解決問題,最後終於找到解決方案,就是使用 scponly 這套工具 。正好 fedora 7也有這套件,所以就

 yum install scponly

然後修改 /etc/shells 加入

 /usr/bin/scponly

,再修改 /etc/passwd,把使用者的 shell設定改成 /usr/bin/scponly 即可