Enjoy Slackware 15.0!

Welcome to the Slackware Documentation Project

Instalar OpenWebMail en Slackware64 14.0

Este artículo explica cómo instalar OpenWebmail y configurarlo para que pueda acceder a su buzón utilizando una interfaz web desde cualquier lugar con acceso a Internet y un navegador web disponible.
Estas instrucciones se probaron en el sistema operativo Slackware64 14.0 de 64 bits y en la última versión de openwebmail-current.tar.gz (en realidad, la versión 2.53)
Esto significa que usted está configurado y ejecutando el servidor web Apache y el servidor de correo Sendmail.

Instalar bibliotecas y paquetes necesarios

Utilizando CPAN a través de CPAN.pm:

perl -MCPAN -e shell                    [as root]
o conf prerequisites_policy ask

entonces:

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

Instalar OpenWebMail

  1. Primero, descargue la última versión de openwebmail: openwebmail-current.tar.gz
  2. Cree un directorio donde lo desee, que diga “ / ADISKS / openwebm_inst ” y mueva el archivo descargado “ openwebmail-current.tar.gz ” a ese directorio.
  3. Extraer todos los archivos usando el comando.
    tar -zxvBpf openwebmail-current.tar.gz

    Use la opción “tar” con “-zxvBpf”, debido a los permisos de archivos extraños dentro de ese archivo. Traté de descomprimirlo a través de las herramientas de archivo integradas midnight comander, y el script wrapsuid no funcionaría debido a esto …

  4. Mueva el directorio extraído “ cgi-bin/openwebmail ” a “ /var/www/cgi-bin/openwebmail
  5. Mueva el directorio extraído “ data/openwebmail ” a DocumentRoot de su servidor web (en una configuración de Apache predeterminada, que será “ /var/www/openwebmail ”)
  6. Cambie el directorio a “ /var/www/openwebmail ”, elimine el archivo index.html y ejecute el comando
    ln -s redirect.html index.html
  7. Cambie el directorio a “ /var/www/cgi-bin/openwebmail ” y ejecute el comando
    perl misc/tools/wrapsuid/wrapsuid.pl /var/www/cgi-bin/openwebmail

    Deberías ver el siguiente resultado:

    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
  8. Then go to “/var/www/cgi-bin/openwebmail/etc” and edit the configuration files:
    1. Change “openwebmail.conf” according to:
      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     
    2. Cambie el directorio a “ /var/www/cgi-bin/openwebmail/etc/defaults ”, edite auth_unix conf para que se convierta en
      passwdfile_plaintext    /etc/passwd                                                                                                                         
      passwdfile_encrypted    /etc/shadow                                                                                                                         
      passwdmkdb              none
    3. En el directorio “ /var/www/cgi-bin/openwebmail/etc/defaults ”, edite db.conf de la siguiente manera:
      dbm_ext                 .db                                                                                                                                 
      dbmopen_ext             .db                                                                                                                                 
      dbmopen_haslock         no
    4. Luego, cambie el directorio a “ /var/www/cgi-bin/openwebmail ” y ejecute
      ./openwebmail-tool.pl --init
  9. Después de eso, vaya a “ /var/www/cgi-bin/openwebmail ”, verifique que haya archivos que empiecen con un punto (como “ .openwebmail.pl ”) y nombres de archivos de estilo antiguo ( como “ openwebmail.pl) ”. Establezca el suid bit para estos scripts:
    chmod u+s openwebmail*.pl
    chmod u+s .openwebmail*.pl

Configuración adicional de Apache

  • Agregue una opción AddHandler cgi-script .cgi .pl en /etc/httpd/httpd.conf en la sección “Directory /srv/httpd /” httpd.conf como ser:
    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
    
    

Links

Fuentes

  • With help of user phenixia2003 from LinuxQuestions.org Forums
  • Thanks for editing Eric Hameleers
  • Escrito originalmente por John Ciemgals
  • Traducido por: Victor 2019/02/14 18:10 (UTC)


En otros idiomas
Traducciones de esta página?:
QR Code
QR Code es:howtos:network_services:install_openwebmail (generated for current page)