Sunday, August 15, 2010

openwebmail on centos 5.5




Installing required packages for open-webmail

Required packages - download all packages and install on cnetos 5.5. To install you need gcc, gcc-c++, gcc-cpp. To install those you can call yum.

yum install gcc*

Above command will install all gcc packages. after that, you cam install all below packages.

1). FCGI-0.67
2). CGI.pm
3). FCGI-0.67
4). MIME-Base64-3.09
5). Libnet-1.22
6). Digest-1.16
7). Digest-MD5-2.39
8). Text-Iconv-1.7
9). perl-suidperl-5.8.8-10.el5_0.2.i386.rpm

cd FCGI-0.67
perl Makefile.PL
make – All goes fine
make test – All goes fine
make install

cd CGI.pm-3.49
perl Makefile.PL
make – All goes fine
make test – All goes fine
make install

cd MIME-Base64-3.09
perl Makefile.PL
make – All goes fine
make test – All goes fine
make install

cd libnet-1.22
make – All goes fine
make test – All goes fine
make install

cd Digest-1.16
make – All goes fine
make test – All goes fine
make install


cd Digest-MD5-2.39
make – All goes fine
make test – All goes fine
make install

cd Text-Iconv-1.7
make – All goes fine
make test – All goes fine
make install

Install perl-suidperl-5.8.8-10.el5_0.2.i386.rpm

chmod 4555 /usr/bin/suidperl
cp openwebmail-2.53.tar.gz /var/www/

cd /var/www/
tar -zxvBpf openwebmail
mv data/openwebmail html/

rmdir data

cd /var/www/cgi-bin/openwebmail/etc/defaults

modify auth_unix.conf from defaults/auth_unix.conf
a. set passwdfile_encrypted to '/etc/shadow'
b set passwdmkdb to 'none'

modify openwebmail.conf
a. set mailspooldir to '/var/spool/mail'
b. set ow_htmldir to '/var/www/html/openwebmail'
set ow_cgidir to '/var/www/cgi-bin/openwebmail'
c. change default_signature for your need

cd /etc/logrotate.d/
vi syslog

add
/var/log/openwebmail.log {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}

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



Cd /var/www/cgi-bin/openwebmail/etc/
vi dbm.conf

add

dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no

save

then,

chown root:mail dbm.conf

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

Then,

Welcome to the OpenWebMail!

This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:

OS: Linux 2.6.18-164.15.1.el5xen i686
Perl: 5.008008
WebMail: OpenWebMail 2.53 20080123

Send the site report?(Y/n) Y
sending report...

Thank you.


Then,

cd /etc/httpd/conf/


vi httpd.conf

add this lines to bottom


ServerAdmin root@localhost.com
ServerName 10.72.88.241
#Alias /cgi-bin/ "/var/www/cgi-bin/"
Alias /openwebmail "/var/www/html/openwebmail"

Options ExecCGI
AllowOverride All
Order allow,deny
Allow from all



service httpd restart

go to

http://localhost/cgi-bin/openwebmail/openwebmail.pl

we should get
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Hahahaha… Don’t worry…


chmod 4555 openwebmail*.pl
chown root:mail openwebmail*.pl

http://localhost/cgi-bin/openwebmail/openwebmail.pl

Done

No comments:

Post a Comment