Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howtos:network_services:install_openwebmail [2013/02/14 13:15 (UTC)]
wisedraco created
howtos:network_services:install_openwebmail [2015/06/26 08:39 (UTC)]
didierspaier [Install OpenWebMail] Removed spaces generating a blank line before " passwdfile_plaintext /etc/passwd "
Line 1: Line 1:
-<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> 
 ====== Installing OpenWebMail in Slackware64 14.0 ====== ====== Installing OpenWebMail in Slackware64 14.0 ======
-Topic about openwebmail installation and setup for can use mail over web. 
-try to write down all my movings until i forget it - finish in 2-3 days, i think. 
  
-First, download ​latest ​openwebmail:​ [[http://​openwebmail.org/​openwebmail/​download/​current/​]]openwebmail-current.tar.gz +This article explains how to install OpenWebmail and configure it so that you can access your mailbox using a web interface from any place with internet access and a webbrowser available.\\  
 +These instructions were tested on Slackware64 14.0 64-bit OS and the latest openwebmail-current.tar.gz ​(actually version 2.53)\\  
 +It means, you are configured and running Apache web server and Sendmail mailserver.
  
  
 +====== Install libraries and required packages ======
  
 +Using CPAN via CPAN.pm: <​code>​
 +perl -MCPAN -e shell                    [as root]
 +o conf prerequisites_policy ask
 +</​code>​
 +then:
 +<​code>​
 +install CGI
 +install Compress:​Zlib
 +install Convert::​ASN1
 +install Digest
 +install Digest::MD5
 +install IO::​Socket::​SSL
 +install MIME::​Base64
 +install Net::SSLeay
 +install Text::Iconv
 +
 +quit
 +</​code>​
 +
 +====== Install OpenWebMail ======
 +
 +  - First, download latest openwebmail:​ [[http://​openwebmail.org/​openwebmail/​download/​current/​|openwebmail-current.tar.gz]]
 +  - Create a directory wherever you want it, say "''/​ADISKS/​openwebm_inst''"​ and move the downloaded file "''​openwebmail-current.tar.gz''"​ into that directory.
 +  - Extract all files using the command <code bash>
 +tar -zxvBpf openwebmail-current.tar.gz
 +</​code>​ **Use "​tar"​ with "​-zxvBpf"​ option, due to strange file permissions inside that archive. I tried to untar it via midnight comander built-in archive tools, ans the //​wrapsuid//​ script would not work because of this... **
 +  - Move the extracted directory "''​cgi-bin/​openwebmail''"​ to "''/​var/​www/​cgi-bin/​openwebmail''"​
 +  - Move the extracted directory "''​data/​openwebmail''"​ to your webserver'​s //​DocumentRoot//​ (in a default Apache configuration,​ that will be "''/​var/​www/​openwebmail''"​)
 +  - Change directory to "''/​var/​www/​openwebmail''",​ delete the file ''​index.html''​ and run the command <code bash>
 +ln -s redirect.html index.html
 +</​code>​
 +  - Change directory to "''/​var/​www/​cgi-bin/​openwebmail''"​ and run the command <​code>​
 +perl misc/​tools/​wrapsuid/​wrapsuid.pl /​var/​www/​cgi-bin/​openwebmail
 +</​code>​ You should see the following output: <​code>​
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-folder.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-main.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-read.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-send.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-cal.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-webdisk.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-advsearch.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-abook.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-viewatt.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-vdomain.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-saprefs.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-prefs.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-tool.pl
 +Fixing /​tmp/​openwebmail/​cgi-bin/​openwebmail/​openwebmail-spell.pl
 +</​code>​
 +  - Then go to "''/​var/​www/​cgi-bin/​openwebmail/​etc''"​ and edit the configuration files: ​
 +    - Change "''​openwebmail.conf''"​ according to: <​code>​
 +domainnames ​            ​auto ​                                                                                                                               ​
 +auth_module ​            ​auth_unix.pl ​                                                                                                                       ​
 +mailspooldir ​           /​var/​spool/​mail ​                                                                                                                    
 +ow_cgidir ​              /​var/​www/​cgi-bin/​openwebmail ​                                                                                                       ​
 +ow_cgiurl ​              /​cgi-bin/​openwebmail ​                                                                                                               ​
 +ow_htmldir ​             /​var/​www/​openwebmail ​                                                                                                               ​
 +ow_htmlurl ​             /                                                                                                                                   
 +logfile ​                /​var/​log/​openwebmail.log ​    
 +</​code>​
 +    - Change directory to "''/​var/​www/​cgi-bin/​openwebmail/​etc/​defaults''",​ edit ''​auth_unix conf''​ to become<​code>​
 +passwdfile_plaintext ​   /​etc/​passwd ​                                                                                                                        
 +passwdfile_encrypted ​   /​etc/​shadow ​                                                                                                                        
 +passwdmkdb ​             none
 +</​code>​
 +    - In directory "''/​var/​www/​cgi-bin/​openwebmail/​etc/​defaults''",​ edit ''​db.conf''​ as follows: <​code>​
 +dbm_ext ​                ​.db ​                                                                                                                                
 +dbmopen_ext ​            ​.db ​                                                                                                                                
 +dbmopen_haslock ​        ​no</​code>​
 +    - Then, change directory to "''/​var/​www/​cgi-bin/​openwebmail''"​ and run <code bash>
 +./​openwebmail-tool.pl --init
 +</​code>​
 +  - After that, go to "''/​var/​www/​cgi-bin/​openwebmail''",​ check that there are files starting with a dot (like "''​.openwebmail.pl''"​) and old-style filenames (like "''​openwebmail.pl)''"​. Set the //suid// bit for these scripts: <code bash>
 +chmod u+s openwebmail*.pl
 +chmod u+s .openwebmail*.pl
 +</​code>​
 +
 +
 +====== Apache additional configuration ======
 +
 +  * Add a  AddHandler cgi-script .cgi .pl option in ''/​etc/​httpd/​httpd.conf''​ in section "​Directory /​srv/​httpd/"​ httpd.conf like be: <​code>​
 +
 +ServerRoot "/​usr"​
 +Listen 80
 +
 +LoadModule authn_file_module lib64/​httpd/​modules/​mod_authn_file.so
 +LoadModule authn_core_module lib64/​httpd/​modules/​mod_authn_core.so
 +LoadModule authz_host_module lib64/​httpd/​modules/​mod_authz_host.so
 +LoadModule authz_groupfile_module lib64/​httpd/​modules/​mod_authz_groupfile.so
 +LoadModule authz_user_module lib64/​httpd/​modules/​mod_authz_user.so
 +LoadModule authz_core_module lib64/​httpd/​modules/​mod_authz_core.so
 +LoadModule access_compat_module lib64/​httpd/​modules/​mod_access_compat.so
 +LoadModule auth_basic_module lib64/​httpd/​modules/​mod_auth_basic.so
 +LoadModule reqtimeout_module lib64/​httpd/​modules/​mod_reqtimeout.so
 +LoadModule filter_module lib64/​httpd/​modules/​mod_filter.so
 +LoadModule mime_module lib64/​httpd/​modules/​mod_mime.so
 +LoadModule log_config_module lib64/​httpd/​modules/​mod_log_config.so
 +LoadModule env_module lib64/​httpd/​modules/​mod_env.so
 +LoadModule headers_module lib64/​httpd/​modules/​mod_headers.so
 +LoadModule setenvif_module lib64/​httpd/​modules/​mod_setenvif.so
 +LoadModule version_module lib64/​httpd/​modules/​mod_version.so
 +LoadModule proxy_module lib64/​httpd/​modules/​mod_proxy.so
 +LoadModule proxy_connect_module lib64/​httpd/​modules/​mod_proxy_connect.so
 +LoadModule proxy_ftp_module lib64/​httpd/​modules/​mod_proxy_ftp.so
 +LoadModule proxy_http_module lib64/​httpd/​modules/​mod_proxy_http.so
 +LoadModule proxy_fcgi_module lib64/​httpd/​modules/​mod_proxy_fcgi.so
 +LoadModule proxy_scgi_module lib64/​httpd/​modules/​mod_proxy_scgi.so
 +LoadModule proxy_ajp_module lib64/​httpd/​modules/​mod_proxy_ajp.so
 +LoadModule proxy_express_module lib64/​httpd/​modules/​mod_proxy_express.so
 +LoadModule lbmethod_byrequests_module lib64/​httpd/​modules/​mod_lbmethod_byrequests.so
 +LoadModule lbmethod_bytraffic_module lib64/​httpd/​modules/​mod_lbmethod_bytraffic.so
 +LoadModule lbmethod_bybusyness_module lib64/​httpd/​modules/​mod_lbmethod_bybusyness.so
 +LoadModule mpm_event_module lib64/​httpd/​modules/​mod_mpm_event.so
 +LoadModule unixd_module lib64/​httpd/​modules/​mod_unixd.so
 +LoadModule status_module lib64/​httpd/​modules/​mod_status.so
 +LoadModule autoindex_module lib64/​httpd/​modules/​mod_autoindex.so
 +##​openwebmail!
 +LoadModule cgi_module lib64/​httpd/​modules/​mod_cgi.so
 +LoadModule dir_module lib64/​httpd/​modules/​mod_dir.so
 +LoadModule alias_module lib64/​httpd/​modules/​mod_alias.so
 +
 +<​IfModule unixd_module>​
 +User apache
 +Group apache
 +
 +</​IfModule>​
 +
 +# '​Main'​ server configuration
 +#
 +# The directives in this section set up the values used by the '​main'​
 +# server, which responds to any requests that aren't handled by a
 +# <​VirtualHost>​ definition. ​ These values also provide defaults for
 +# any <​VirtualHost>​ containers you may define later in the file.
 +ServerAdmin webmaster@sten.lv
 +
 +ServerName elephant.org
 +
 +
 +<​Directory />
 +    AllowOverride None
 +</​Directory>​
 +
 +DocumentRoot "/​srv/​httpd/"​
 +<​Directory "/​srv/​httpd/">​
 +
 +    Options Indexes FollowSymLinks Includes MultiViews ExecCGI
 +
 +    AllowOverride All
 +    #None
 +
 +    #
 +    # Controls who can get stuff from this server.
 +    #
 +##    Require all granted
 +Order allow,deny
 +Allow from all
 +###Need! otherwise "save as binary...."​ appear...
 +AddHandler cgi-script .cgi .pl
 +
 +</​Directory>​
 +
 +#
 +# DirectoryIndex:​ sets the file that Apache will serve if a directory
 +# is requested.
 +#
 +<​IfModule dir_module>​
 +    DirectoryIndex index.html index.shtml index.php
 +</​IfModule>​
 +
 +#
 +# The following lines prevent .htaccess and .htpasswd files from being
 +# viewed by Web clients.
 +#
 +<Files "​.ht*">​
 +    Require all denied
 +</​Files>​
 +
 +
 +
 +ErrorLog "/​var/​log/​httpd/​error_log"​
 +
 +LogLevel warn
 +
 +<​IfModule log_config_module>​
 +
 +    LogFormat "%h %l %u %t \"​%r\"​ %>s %b \"​%{Referer}i\"​ \"​%{User-Agent}i\""​ combined
 +    LogFormat "%h %l %u %t \"​%r\"​ %>s %b" common
 +
 +    <​IfModule logio_module>​
 +      # You need to enable mod_logio.c to use %I and %O
 +      LogFormat "%h %l %u %t \"​%r\"​ %>s %b \"​%{Referer}i\"​ \"​%{User-Agent}i\"​ %I %O" combinedio
 +    </​IfModule>​
 +
 +    #
 +    ##CustomLog "/​var/​log/​httpd/​access_log"​ common
 +
 +    #
 +    CustomLog "/​var/​log/​httpd/​access_log"​ combined
 +</​IfModule>​
 +
 +<​IfModule alias_module>​
 +  #
 +    ScriptAlias /cgi-bin/ "/​srv/​httpd/​cgi-bin/"​
 +
 +</​IfModule>​
 +
 +<​IfModule cgid_module>​
 +    #
 +#    Scriptsock cgisock
 +</​IfModule>​
 +
 +#
 +# "/​srv/​httpd/​cgi-bin"​ should be changed to whatever your ScriptAliased
 +# CGI directory exists, if you have that configured.
 +#
 +##<​Directory "/​srv/​httpd/​cgi-bin">​
 +##    AllowOverride None
 +##    Options None
 +##    Require all granted
 +##</​Directory>​
 +#for openwebmail
 +<​Directory "/​srv/​httpd/​cgi-bin">​
 +    AllowOverride All
 +    Options ExecCGI
 +    Order Allow,deny
 +    Allow from all
 +</​Directory>​
 +
 +
 +<​IfModule mime_module>​
 +    #
 +    TypesConfig /​etc/​httpd/​mime.types
 +
 +    #
 +    AddType application/​x-compress .Z
 +    AddType application/​x-gzip .gz .tgz
 +
 +    #
 +##    AddHandler cgi-script .cgi .pl
 +    # for openwebmail
 +##    AddHandler cgi-script .pl
 +    ​
 +#test openwebmail
 +##​AddHandler server-parsed ​ .html
 +###​AddHandler server-parsed ​ .pl
 +
 +</​IfModule>​
 +
 +
 +
 +# Virtual hosts
 +Include /​etc/​httpd/​httpd-vhosts.conf
 +
 +# Various default settings
 +Include /​etc/​httpd/​extra/​httpd-default.conf
 +
 +# Configure mod_proxy_html to understand HTML4/​XHTML1
 +<​IfModule proxy_html_module>​
 +Include /​etc/​httpd/​extra/​proxy-html.conf
 +</​IfModule>​
 +
 +<​IfModule ssl_module>​
 +SSLRandomSeed startup builtin
 +SSLRandomSeed connect builtin
 +</​IfModule>​
 +
 +# Deal with user agents that deliberately violate open standards
 +#
 +<​IfModule setenvif_module>​
 +BrowserMatch "MSIE 10.0;" bad_DNT
 +</​IfModule>​
 +<​IfModule headers_module>​
 +RequestHeader unset DNT env=bad_DNT
 +</​IfModule>​
 +
 +
 +# Uncomment the following line to enable PHP:
 +#
 +Include /​etc/​httpd/​mod_php.conf
 +
 +
 +</​code>​
 +
 +====== Links ======
 +
 +  * [[http://​www.linuxquestions.org/​questions/​slackware-14/​suidperl-in-slack-14-a-4175450139/​]]
 +  * [[http://​openwebmail.org/​openwebmail/​doc/​faq.txt]]
 +  * [[http://​openwebmail.org/​openwebmail/​doc/​readme.txt]]
 +  * [[http://​www.unixresources.net/​linux/​lf/​45/​archive/​00/​00/​01/​69/​16969.html]]
 +  * [[http://​mail.savs.hcc.edu.tw/​~chuavv/​articles/​openwebmail-en.html]]
 +  * [[http://​search.cpan.org/​search?​query=CGI&​mode=all]]
 +  * [[http://​svn.apache.org/​repos/​asf/​spamassassin/​branches/​3.3/​INSTALL]]
  
 ====== Sources ====== ====== Sources ======
 +
 <!-- If you are copying information from another source, then specify that source --> <!-- If you are copying information from another source, then specify that source -->
 <!-- * Original source: [[http://​some.website.org/​some/​page.html]] --> <!-- * Original source: [[http://​some.website.org/​some/​page.html]] -->
Line 15: Line 309:
 <!-- * Originally written by [[wiki:​user:​xxx | User X]] --> <!-- * Originally written by [[wiki:​user:​xxx | User X]] -->
 <!-- * Contributions by [[wiki:​user:​yyy | User Y]] --> <!-- * Contributions by [[wiki:​user:​yyy | User Y]] -->
- --- //[[wiki:​user:​wisedraco|John Ciemgals]] ​2013/02/14 05:12//+  * With help of user phenixia2003 from LinuxQuestions.org Forums ​  
 +  * Thanks for editing ​ [[wiki:​user:​alienbob|Eric Hameleers]] 
 +  * Originally written by [[wiki:​user:​wisedraco|John Ciemgals]] 
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
-<!-- You must remove the tag-word "​template"​ below before saving your new page --> +{{tag>​howtos ​author_wisedraco}}
-{{tag>​howtos ​template}}+

In Other Languages
QR Code
QR Code howtos:network_services:install_openwebmail (generated for current page)