NOTA: Antes de intentar hacer algo, leer TODO! No me hago responsable de NADA de lo que pueda pasarle a tu servidor, a tu computadora, a tu casa o a tu auto con esta guía.

Esta es una guía para instalar Openwebmail (2.30 es el que estoy usando yo) en Ensim (yo lo uso en el 3.5). Me basé en éste otro howto.

1. Instalar los módulos de Perl necesarios
CGI
MIME::Base64
libnet
Text::Iconv

Se pueden instalar utilizando el módulo CPAN:
CODE
perl -MCPAN -e 'install modulo'

ejemplo:
CODE
perl -MCPAN -e 'install CGI'

en el caso de no tener CPAN, instalarlos manualmente, bajandolos de CPAN (buscar por el nombre, y hacer click en el link con letra más chica, por ejemplo, buscar CGI, y en el primer resultado clickear sobre "CGI.pm-3.04", y ahi ir a "Download" (o copiar el link y hacer un wget desde el servidor). Y haciendo:
CODE
tar xvzf archivo.tar.gz

cd archivo

perl Makefile.PL

make

make install

ejemplo:
CODE
tar xvzf CGI.pm-3.04.tar.gz

cd CGI.pm-3.04

perl Makefile.PL

make

make install


Hacer esto con todos los módulos necesarios.

2. Instalar Openwebmail
CODE
cd /var/www

wget [url]http://openwebmail.org/openwebmail/download/openwebmail-current.tgz[/url]

tar -zxvBpf openwebmail-current.tgz

wget [url]http://www.bluecrow.net/files/auth_unix_ensim.v2.pl[/url]

sed s/openwebmail/ow/ auth_unix_ensim.v2.pl > auth_unix_ensim.pl

mv auth_unix_ensim.pl /var/www/cgi-bin/openwebmail/auth/

mv data/openwebmail html

rmdir data


3. Configurar
CODE
pico -w cgi-bin/openwebmail/etc/openwebmail.conf

Cambiar:
mailspooldir a /var/spool/mail
ow_cgidir a /var/www/cgi-bin/openwebmail
ow_htmldir a /var/www/html/openwebmail
spellcheck a /usr/bin/aspell
auth_module a auth_unix_ensim.pl

Agregar:
auth_withdomain yes
timeoffset +0800

4. (Opcional) Logrotate
Agregar
CODE
/var/log/openwebmail.log {



postrotate

/usr/bin/killall -HUP syslogd

endscript

}

a /etc/logrotate.d/syslog para habilitar logrotate para Openwebmail.

5. Configurar los dominios (para que las quotas funcionen correctamente):
CODE
cd cgi-bin/openwebmail/etc/sites.conf/

cat > DEFAULT << EOF

#

# Open WebMail configuration file

#

# This file contains just the overrides from openwebmail.conf.default

# please make all changes to this file.

#

# This file sets options for all domains and all users.

# To set options on per domain basis, please put them in sites.conf/domainname

# To set options on per user basis, please put them in users.conf/username

#

domainnames NEWDOMAIN

auth_module auth_unix_ensim.pl

mailspooldir /home/virtual/NEWDOMAIN/var/spool/mail

dbm_ext .db

dbmopen_ext none

dbmopen_haslock no

timeoffset +0800

ow_cgidir /var/www/cgi-bin/openwebmail

ow_cgiurl /cgi-bin/openwebmail

ow_htmldir /var/www/html/openwebmail

ow_htmlurl /openwebmail

logfile /var/log/openwebmail.log

spellcheck /usr/bin/aspell



# Virtual Space Configuration

use_homedirspools no

use_homedirfolders yes



enable_changepwd no

enable_autoreply no

enable_setforward yes

enable_setfromemail yes

getmail_from_pop3_authserver no

autopop3_at_refresh yes

auth_withdomain yes



default_language en_US

spellcheck_dictionaries english, american

default_dictionary english

default_dateformat mm/dd/yyyy

default_autoreplysubject This is an automatic response...[Re: $SUBJECT]



<default_autoreplytext>

Hello,

I will not be reading my mail for a while.

Your mail regarding '$SUBJECT' will be read when I return.

</default_autoreplytext>



<default_signature>

--

Open WebMail Project (http://openwebmail.org)

</default_signature>

EOF

cat > createdomainfiles.sh << EOF

#! /bin/sh

# Script written by Paulo Cardoso



DOMAINS=`/usr/local/bin/sitelookup -a domain`

SITERETVAL=$?

cd /var/www/cgi-bin/openwebmail/etc/sites.conf

if [ $SITERETVAL -eq 0 ]; then

for DOMAIN in $DOMAINS

do

sed -e 's/NEWDOMAIN/'$DOMAIN'/g'<DEFAULT >$DOMAIN

#->Optional!

# To redirect a site from www.domain.com/email to openwebmail

# just uncoment the next lines and change 'email' for whatever

# you want and SERVER for server IP or domain:



SITE=`/usr/local/bin/sitelookup -d $DOMAIN site_handle`

echo "Redirect /openwebmail https://`hostname -f`/cgi-bin/openwebmail/openwebmail.pl">>/etc/httpd/conf/$SITE/00openwebmail



done

fi

EOF

sh createdomains.sh


Esto de más arriba, simplemente crea dos archivos: DEFAULT y createdomains.sh, con todo el texto que sigue a las lineas que comienzan con cat hasta el EOF. Está puesto "a prueba de tontos" (me incluyo aquí icon_razz.gif), como para hacer un copy y paste. También se puede simplemente usar pico, copiar y pegar alli dentro y luego guardar con el nombre correspondiente, para ésto, hay que eliminar las secuencias de escape (son las barras invertidas ). La línea que dice echo "Redirect /openwebmail https://`hostname -f`/cgi-bin/openwebmail/openwebmail.pl">>/etc/httpd/conf/$SITE/00openwebmail,
cambiará "`hostname -f`" con el resultado de dicho comando (normalmente, el FQDN de nuestro servidor, que es el que utilizamos para SSL, si no es el caso, escribir manualmente el dominio o la ip correspondiente).

6. Probar la instalación
Abrir: https://suserver.com/cgi-bin/openwebmail/op.../openwebmail.pl
ingresar user@dominio y la contraseña. Al primer ingreso nos pedirá que configuremos algunos parámetros y listo, tendría que estar andando.

A mi personalmente me ha asombrado este software. Tiene una interfaz muy amena y además muchas "features" bastante buenas. Lo único malo es que utiliza JavaScript y no funciona en navegadores de texto, los cuales uso muchisimo y por ende mantengo una copia del squirrelmail que funciona 10 puntos (con el links especialmente).

NOTA: No me hago responsable de lo que puedas romper siguiendo este COMO. Si no estás seguro, no lo hagas, o pregunta antes de hacer algo, un error de tipeo (mio o tuyo) puede tener resultados bastante indeseables (lo digo por experiencia propia icon_biggrin.gif). Así que, lean con cuidado, fijense en los comandos y los PATH, y sólo hagan algo si están SEGUROS de lo que hacen y entienden el hecho de que es SU RESPONSABILIDAD y no la mia. icon_smile.gif

Suerte!