Openwebmail-2.40 instala

07.09.2004 20:30 | blackhole

Pri inslacii openwebmailu som sa stretol s paar chybami, no nakoniec sa mi ho podarilo rozbehnut a kedze instalacia nebola velmi jednoducha rozhodol som sa napisat navod pre ostatnych, ktory by si ho chceli nahodit.

Na instalaciu budeme potrebovat:

Apache web server s podporou perly vo verzii 5.005 a viac

CGI.pm-3.05.tar.gz
MIME-Base64-3.01.tar.gz
libnet-1.19.tar.gz
Digest-1.08.tar.gz
Digest-MD5-2.33.tar.gz
Text-Iconv-1.2.tar.gz
libiconv-1.9.1.tar.gz
a openwebmail-2.40.tar.gz
bez tychto aplikacii openwebmail nerozbehneme

Konfiguracia:

mkdir /home/openwebmail
cd /home/openwebmail
wget http://openwebmail.org/openwebmail/download/release/openwebmail-2.40.tar...

tar zxvf openwebmail-2.40.tar.gz
rozpakuju sa nam 2 adresare, cgi-bin a data

Pre jednoduchy pristup k webmailu si mozme vytvorit 2 subdomeny a to
mail a webmail.
Vi /etc/bind/domena.sk

mail IN A ns
webmail IN A ns

restartneme dns... killall -HUP named

domeny mame hotove pokracovat budeme vytvorenim aliasov v httpd.conf
doporucujem pripajat sa na webmail cez https.
Edtineme /etc/apache/mod_ssl.conf

<VirtualHost mail.domena.sk:443>

DocumentRoot \"/home/openwebmail/\"
ServerName mail.domena.sk
ServerAlias webmail.domena.sk
ServerAdmin alwarez@domena.sk
ScriptAlias /cgi-bin/ \"/home/openwebmail/\"
ErrorLog /var/log/apache/error_log
TransferLog /var/log/apache/access_log

SSLEngine on

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache/ssl.crt/server.crt
SSLCertificateKeyFile /etc/apache/ssl.key/server.key
<Files ~ \".(cgi|shtml|phtml|php3?)$\">
SSLOptions +StdEnvVars
</Files>
<Directory \"/home/openwebmail/\">
SSLOptions +StdEnvVars
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory \"/home/openwebmail/\">
SSLOptions +StdEnvVars
AllowOverride All
Options MultiViews -Indexes Includes FollowSymLinks +ExecCGI
Order allow,deny
Allow from all
</Directory>

SetEnvIf User-Agent \".*MSIE.*\"
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0

CustomLog /var/log/apache/ssl_request_log
\"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b\"

</VirtualHost>

editneme /etc/apche.conf a do riadku DirectoryIndex index.pl

presunieme subory z adresara /home/openwebmail/cgi-bin/openwebmail do adresara /home/openwebmail

a adresar /home/openwebmail/data/openwebmail presunieme do /home/openwebmail.

Vi /home/openwebmail/etc/openwebmail.conf a editujeme

domainnames domena.sk
auth_module auth_unix.pl #podla toho aku autentifikaciu userov pouzivame

mailspooldir /var/mail
ow_cgidir /home/openwebmail
ow_cgiurl /cgi-bin
ow_htmldir /home/openwebmail/openwebmail
ow_htmlurl /openwebmail
logfile /var/log/openwebmail.log

enable_viruscheck no
enable_spamcheck no
enable_learnspam no

dalej potrebujeme editnut subor auth_unix.conf

passwdfile_plaintext /etc/passwd
passwdfile_encrypted /etc/shadow
passwdmkdb none
check_nologin no
check_shell no
check_cobaltuser no

Editneme /etc/logrotate.d/syslog a pridame tam nieco taketo, aby nam vytvaralo openwebmail.log

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

Nasleduje prve spustenie openwebmailu.
/home/openwebmail/openwebmail-tool.pl –init

Pokracujeme krokmi ktore doporuci tento script, vecsinou treba do perly dopisat jeden riadok a editnut
a subor dbm.conf

dbm_ext .db
dbmopen_ext .db
dbmopen_haslock yes
#zalezi podla operacneho systemu

nastavime prava suborom podla nasledujucej tabulky:

~/openwebmail*.pl - owner=root, group=mail, mode=4755
~/vacation.pl - owner=root, group=mail, mode=0755
~/etc - owner=root, group=mail, mode=755
~/etc/sessions - owner=root, group=mail, mode=771
~/etc/users - owner=root, group=mail, mode=771

/var/log/openwebmail.log - owner=root, group=mail, mode=660

ak je perla prekonfigurovana s podporou suidperl ak uz by nam to malo ist. Ak nie tak stiahneme perlu a instalujeme.

./configure
make
make suidperl
make install

To by malo byt vsetko,dufam ze som na nic nezabudol. Openwebmail podpruje vela inych veci ako quotu, spamasassin, antivirak clamav atd atd.

Po uspesnej instalacii a konfiguracii si mozme vyskusat co sme vytvorili.
Do www browsera zadame adresu https://mail.domena.sk.
Dufam ze vam vsetko funguje, ak nie piste do komentarov alebo na alwarez@dalnet.skalwarez