原始連結

http://openwebmail.acatysmoof.com/archive/html/owm-users/owm-users.201011/txt23vScJxEN_.txt

Overview
========
Fedora 14 ships with perl 5.12.2, which no longer directly supports
setuid. OpenWebMail can still run on this operating system with the
use of simple c wrappers to enable setuid, even under SELinux.

Check Mimimum Requirements
==========================
- gcc or cc      (which gcc)
- iconv          (iconv --version)
- Text::Iconv    (perl -MText::Iconv -e '{1}')
- HTML::Template (perl -MHTML::Template -e '{1}')

Quick Install for Fedora 14
==========================
# become root
su -

# make tmp dir to unpack openwebmail
mkdir /tmp/openwebmail
cd /tmp/openwebmail

# download -current version
wget http://openwebmail.acatysmoof.com/download/current/openwebmail-current.tar.gz

# unpack it
tar -xvzBpf openwebmail-current.tar.gz

# put it in the apache area
mv cgi-bin/openwebmail /var/www/cgi-bin/
mv data/openwebmail /var/www/html

# cleanup
cd /var/www/cgi-bin/openwebmail
rm -rf /tmp/openwebmail

# wrap the perl code for setuid
chmod 777 ./misc/tools/wrapsuid/wrapsuid.pl
./misc/tools/wrapsuid/wrapsuid.pl /var/www/cgi-bin/openwebmail/openwebmail*.pl
chmod 660 ./misc/tools/wrapsuid/wrapsuid.pl

# perl code has now been moved to hidden files of the same name
# original perl file: .openwebmail-abook.pl
# c-wrapper file: openwebmail-abook.pl

# make the wrappers setuid
chmod 4755 openwebmail*.pl

# create the logfile
touch /var/log/openwebmail.log
chown root:mail /var/log/openwebmail.log

# update all the openwebmail files to run safely under SELinux
# skip this step if SELinux is disabled on your system
chcon -u system_u /var/log/openwebmail.log
chcon -t httpd_sys_script_rw_t /var/log/openwebmail.log
restorecon -R /var/www/{html,cgi-bin}/openwebmail
chcon -R -t httpd_sys_content_t auth etc lib misc modules quota shares
chcon -t httpd_unconfined_script_exec_t /var/www/cgi-bin/openwebmail/openwebmail*

# ONLY if you do not have an index file - use the provided redirect file
cp -p /var/www/html/openwebmail/redirect.html /var/www/html/index.html

# update openwebmail.conf
vi etc/openwebmail.conf
change:
ow_cgidir               /usr/local/www/cgi-bin/openwebmail
ow_cgiurl               /cgi-bin/openwebmail
ow_htmldir              /usr/local/www/data/openwebmail
ow_htmlurl              /openwebmail

to:
ow_cgidir               /var/www/cgi-bin/openwebmail
ow_cgiurl               /cgi-bin/openwebmail
ow_htmldir              /var/www/html/openwebmail
ow_htmlurl              /openwebmail

# create an auth_unix.conf config file for Fedora
cp etc/defaults/auth_unix.conf etc/

# update the auth_unix.conf file
vi etc/auth_unix.conf
change:
passwdfile_plaintext    /etc/passwd
passwdfile_encrypted    /etc/master.passwd
passwdmkdb              /usr/sbin/pwd_mkdb

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

# create a dbm.conf file for Fedora
cp etc/defaults/dbm.conf etc/

# update the dbm.conf config file
vi etc/dbm.conf
change:
dbm_ext           .db
dbmopen_ext       none
dbmopen_haslock   no

to:
dbm_ext           .pag
dbmopen_ext       none
dbmopen_haslock   no

# initialize openwebmail
./openwebmail-tool.pl --init

# go to the openwebmail page in your browser
http://your.domain/cgi-bin/openwebmail/openwebmail.pl

Questions?
==========
http://openwebmail.acatysmoof.com/archive
arrow
arrow
    全站熱搜

    ben88168 發表在 痞客邦 留言(0) 人氣()