WEBMAIL

Forums: 

Hola Amigos

Estoy instalando un server con Centos 4.4 y quiero instalar el webmail, la pregunta es la siguiente que me sugieren que utilice horde o squirremail, cual de los dos es mejor en seguridad y es facil de usar.

Saludos

Re: Ayudame - Paso 4.1

Paso 4.1 Compilando mcrypt para PHP

Ten cuidado de mantener el orden de compilacion: libmcrypt, mhash y finalmente mcrypt.
Es importante porque mcrypt requiere de las otras dos librerias y de poder localizarlas,
primero lee detenidamente todo el proceso y luego aplicalo.

Nos colocamos en el directorio src
# cd /home/src
Descomprimir libmcrypt-2.5.8.tar.gz
# tar zxvf libmcrypt-2.5.8.tar.gz
Cambiamos a directorio libmcrypt-2.5.8
#cd libmcrypt-2.5.8
Generamos archivo Makefile ejecutando
# ./configure
Si no aparece ningun mensaje de error al final deberias tener las siguientes lineas
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libmcrypt.spec
config.status: creating lib/Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating modules/Makefile
config.status: creating modules/modes/Makefile
config.status: creating modules/algorithms/Makefile
config.status: creating lib/mcrypt.h
config.status: creating lib/libmcrypt-config
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing default-1 commands

Iniciamos compilacion de las librerias ejecutando
# make
Si no existen mensajes de error procedemos a verificar que las librerias pasen algunos test.
Para eso ejecutamos
# make check
En este punto deberian pasar sin problemas los test. Finalmente instalamos
# make install
Al momento de instalar, si prestas atencion, podras ver un mensaje que te indica donde se
instalaron las librerias. Toma nota del nombre de ese directorio para evitar problemas de
localizacion de librerias.
Por omision libmcrypt-2.5.8 instalan sus librerias en /usr/local/lib
Para estar seguros que PHP o cualquier otro programa que requiere estas librerias pueda
localizarlas mira el contenido de /etc/ld.so.conf , ejecutando
# more /etc/ld.so.conf
En alguna parte del archivo, al final o inicio, deberia existir una entrada con el nombre del
directorio donde se instalaron las librerias de libmcrypt-2.5.8, en nuestro caso /usr/local/lib
Si no existe este nombre el archivo ld.so.conf debemos incluirlo, ejecutamos
# echo /usr/local/lib >> /etc/ld.so.conf

*Ojo* con el signo > debe ser doble, si cometes el error de poner solo un > lo que lograras es
sobreescribir su contenido y cualquier informacion que existia antes se perdera.

Si deseas por precaucion usa nano para editar el archivo e ingresa una linea con el texto /usr/local/lib
# nano /etc/ld.so.conf
Luego debemos estar seguros que la informacion del archivo ld.so.conf este actualizada de manera que
otros programas que usan esta libreria la puedan localizar.
# ldconfig

Estos pasos se repiten para mhash y mcrypt, resumiendo.

# cd /home/src
Descomprimir mhash-0.9.8.1.tar.gz
# tar zxvf mhash-0.9.8.1.tar.gz
Cambiamos a directorio mhash-0.9.8.1
#cd mhash-0.9.8.1
Generamos archivo Makefile y luego compilamos e instalamos ejecutando
# ./configure
# make
# make check
# make install

Si el nombre del directorio donde mhash instala las librerias es el mismo que libmcrypt,
es decir /usr/local/lib solo es necesario ejecutar
# ldconfig
Si es diferente, debes incluir ese nombre de directorio en el archivo ld.so.conf y ejecutar
ldconfig

La siguiente libreria siempre se compila-instala al final pues requiere de las dos anteriores.

# cd /home/src
Descomprimir mcrypt-2.6.5.tar.gz
# tar zxvf mcrypt-2.6.5.tar.gz
Cambiamos a directorio mcrypt-2.6.5
#cd mcrypt-2.6.5
Generamos archivo Makefile y luego compilamos e instalamos ejecutando
# ./configure
# make
# make check
# make install

Si el nombre del directorio donde mcrypt instala las librerias es el mismo que libmcrypt,
es decir /usr/local/lib solo es necesario ejecutar
# ldconfig
Si es diferente, debes incluir ese nombre de directorio en el archivo ld.so.conf y ejecutar
ldconfig

Si llegaste hasta este punto sin mensajes de error, tienes instalado el soporte de las librerias
para criptografia que usa Horde y que son mas eficientes en terminos de velocidad que las que
ofrece PHP.
Cuando estes listo continuamos con el paso 4.2 que es configurando-instalando las librerias imap.

Listo Paso 4.1

Que tal Hacking ya se realizao el paso 4.1, todo ok, lo revisé y se creo en el directorio /usr/local/bin, y lo incluí en el archivo ld.so.conf.

Saludos

Re: Ayudame - Paso 4.2

Paso 4.2 Compilando libreria imap para PHP.

Desde el directorio /home/src procedemos a descomprimir imap-2004g.tar.Z
# gunzip imap-2004g.tar.Z
# tar xvf imap-2004g.tar

Nos cambiamos al directorio imap-2004g para iniciar el proceso de configuracion

# cd imap-2004g

Configuramos para Red Hat Linux, para otras distros revisar el archivo Makefile,
pero primero vamos a editar Makefile para hacer un cambio.

# nano Makefile

Buscamos la variable EXTRACFLAGS= que seguramente esta en blanco y le agregamos -fPIC
de manera que debe quedarnos asi:

EXTRACFLAGS=-fPIC

Guardamos el cambio y salimos de nano, ahora si ejecutamos

# make lrh

Luego debemos crear dos carpetas para la libreria (lib) y los archivos .h (include), algunos
sugieren copiar los archivos luego de crear las carpetas con mkdir. Pero por sugerencia de
un usuario en el manual de php es mejor hacer lo siguiente.

# ln -s c-client include
# ln -s c-client lib

Esto crea enlaces a la carpeta donde esta la libreria y los archivos .h, luego necesitamos
tener una libreria con el nombre libc-client.a en el directorio lib, que de acuerdo al parrafo
anterior es un enlace a la carpeta c-client. Entonces libc-client.a debemos crearla en c-client
# cd c-client
# ln -s c-client.a libc-client.a

Con esto terminamos y podemos continuar con el paso 4.3 que es la instalacion de la libreria de
graficos GD para PHP, cuando estes listo!

Error

Que tal hacking, mira estaba realizando el paso 4.2 con respecto a imap y al momento de ejecutar # make lrh me sale al final el siguiente mensaje
cc: fPIC: No such file or directory
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/home/src/imap-2004g/c-client'
make[2]: *** [lnp] Error 2
make[2]: Leaving directory `/home/src/imap-2004g/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/home/src/imap-2004g'
make: *** [lrh] Error 2

a que se refiere?

Saludos

Ayudame: Paso 4.3

Paso 4.3 Compilando libreria GD para php

Nos ubicamos en /home/src y procedemos a descomprimir gd-2.0.34.tar.gz
# tar zxvf gd-2.0.34.tar.gz

Cambiamos al directorio gd-2.0.34
# cd gd-2.0.34

Configuramos el archivo Makefile
# ./configure

Luego compilamos
# make

Verificamos que las librerias generadas esten correctas
# make check

Finalmente instalamos las librerias GD
# make install

Cuando estes listo continua con el paso 5, compilando PHP con las librerias de soporte
para Horde

Re: Ayudame - Paso 5

Paso 5. Compilando PHP

Nos ubicamos en el directorio /home/src y descomprimimos php
# tar jxvf php-5.2.1.tar.bz2

Nos cambiamos al directorio php-5.2.1
# cd php-5.2.1

Vamos a crear un script para que lo uses en tus futuras intalaciones, ejecutando
# nano /root/configs/cfg.php en este archivo copia el siguiente contenido:

./configure --prefix=/opt/php \
--with-config-file-path=/opt/php \
--with-apxs=/opt/apache/bin/apxs \
--with-openssl \
--with-gettext \
--with-zlib \
--enable-mime-magic \
--with-dom \
--with-iconv \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--with-mysql=/usr/local/mysql \
--with-imap=/home/src/imap/imap-2004g \
--with-imap-ssl \
--with-mcrypt \
--with-mhash \
--enable-xml \
--with-gd=/home/src/gd-2.0.34 \
--without-sqlite

Estoy asumiendo que tienes un directorio opt con suficiente espacio para instalar php, puedes cambiar el nombre del directorio por /usr/local/php que es mas comun.
Guardas la informacon y sales de nano.
Para que el script sea ejecutable, haces
# chmod 700 /root/configs/cfg.php
Ahora copias el script a la carpeta actual (/home/src/php-5.2.1), ejecutando
# cp /root/configs/cfg.php .
Configuramos para crear el archivo Makefile, ejecutando
# ./cfg.php
Si el script se ejecuta sin ningun error continuamos la compilacion, ejecutando
# make
De la misma manera si se completa el comando sin error continuamos con la instalacion, ejecutando
# make install

Si llegaste aqui sin ningun mensaje de error has completado la configuracion, compilacion e instalacion de PHP.
Felicitaciones
Cuando estes listo continuamos con la postinstalacion!

error cfg.php

Disculapa hacking pero al momento de ejecutar ./cfg.php me sale el siguiente error:

[root@electro php-5.2.1]# ./cfg.php
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking whether ln -s works... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... no
configure: warning: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for bison... bison -y
checking for bison version... 1.875 (ok)
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for working const... yes
checking for flex version... 2.5.4 (ok)
checking whether to force non-PIC code in shared modules... yes
checking whether /dev/urandom exists... yes
checking for pthreads_cflags... -pthread
checking for pthreads_lib...

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... yes
checking for mod_charset compatibility option... no
checking for member fd in BUFF *... yes
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support... no
checking for mod_charset compatibility option... no
checking for Caudium support... no
checking for CLI build... yes
checking for Continuity support... no
checking for embedded SAPI library support... no
checking for Zeus ISAPI support... no
checking for Milter support... no
checking for NSAPI support... no
checking for PHTTPD support... no
checking for Pi3Web support... no
checking for Roxen/Pike support... no
checking for thttpd... no
checking for TUX... no
checking for webjames... no
checking for chosen SAPI module... apache

Running system checks
checking for sendmail... /usr/sbin/sendmail
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... no
checking for socket... yes
checking for socketpair... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... yes
checking for yp_get_default_domain... no
checking for __yp_get_default_domain... no
checking for yp_get_default_domain in -lnsl... yes
checking for dlopen... no
checking for __dlopen... no
checking for dlopen in -ldl... yes
checking for sin in -lm... yes
checking for res_search... no
checking for __res_search... no
checking for res_search in -lresolv... yes
checking for inet_aton... yes
checking for dn_skipname... no
checking for __dn_skipname... yes
checking for ANSI C header files... yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for inttypes.h... yes
checking for stdint.h... yes
checking for dirent.h... yes
checking for ApplicationServices/ApplicationServices.h... no
checking for sys/param.h... yes
checking for sys/types.h... yes
checking for sys/time.h... yes
checking for netinet/in.h... yes
checking for alloca.h... yes
checking for arpa/inet.h... yes
checking for arpa/nameser.h... yes
checking for assert.h... yes
checking for crypt.h... yes
checking for fcntl.h... yes
checking for grp.h... yes
checking for ieeefp.h... no
checking for langinfo.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for monetary.h... yes
checking for mach-o/dyld.h... no
checking for netdb.h... yes
checking for pwd.h... yes
checking for resolv.h... yes
checking for signal.h... yes
checking for stdarg.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for syslog.h... yes
checking for sysexits.h... yes
checking for sys/ioctl.h... yes
checking for sys/file.h... yes
checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/poll.h... yes
checking for sys/resource.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking for sys/sysexits.h... no
checking for sys/varargs.h... no
checking for sys/wait.h... yes
checking for sys/loadavg.h... no
checking for termios.h... yes
checking for unistd.h... yes
checking for unix.h... no
checking for utime.h... yes
checking for sys/utsname.h... yes
checking for sys/ipc.h... yes
checking for dlfcn.h... yes
checking for assert.h... (cached) yes
checking for fopencookie... yes
checking for broken getcwd... no
checking for broken libc stdio... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... yes
checking for missing declarations of reentrant functions... done
checking for fclose declaration... ok
checking for tm_gmtoff in struct tm... yes
checking for struct flock... yes
checking for socklen_t... yes
checking size of intmax_t... 0
checking size of size_t... 4
checking size of ssize_t... 0
checking size of ptrdiff_t... 0
checking size of long long... 8
checking size of long long int... 8
checking size of long... 4
checking size of int... 4
checking for st_blksize in struct stat... yes
checking for st_blocks in struct stat... yes
checking for st_rdev in struct stat... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for struct sockaddr_storage... yes
checking for field sa_len in struct sockaddr... no
checking for IPv6 support... yes
checking for vprintf... yes
checking for alphasort... yes
checking for asctime_r... yes
checking for chroot... yes
checking for ctime_r... yes
checking for cuserid... yes
checking for crypt... no
checking for flock... yes
checking for ftok... yes
checking for funopen... no
checking for gai_strerror... yes
checking for gcvt... yes
checking for getloadavg... yes
checking for getlogin... yes
checking for getprotobyname... yes
checking for getprotobynumber... yes
checking for getservbyname... yes
checking for getservbyport... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for gmtime_r... yes
checking for getpwnam_r... yes
checking for getgrnam_r... yes
checking for getpwuid_r... yes
checking for grantpt... yes
checking for inet_ntoa... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for isascii... yes
checking for link... yes
checking for localtime_r... yes
checking for lockf... yes
checking for lchown... yes
checking for lrand48... yes
checking for memcpy... yes
checking for memmove... yes
checking for mkstemp... yes
checking for mmap... yes
checking for nl_langinfo... yes
checking for perror... yes
checking for poll... yes
checking for ptsname... yes
checking for putenv... yes
checking for realpath... yes
checking for random... yes
checking for rand_r... yes
checking for regcomp... yes
checking for res_search... (cached) yes
checking for scandir... yes
checking for setitimer... yes
checking for setlocale... yes
checking for localeconv... yes
checking for setenv... yes
checking for setpgid... yes
checking for setsockopt... yes
checking for setvbuf... yes
checking for shutdown... yes
checking for sin... yes
checking for snprintf... yes
checking for srand48... yes
checking for srandom... yes
checking for statfs... yes
checking for statvfs... yes
checking for std_syslog... no
checking for strcasecmp... yes
checking for strcoll... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... yes
checking for strptime... yes
checking for strstr... yes
checking for strtok_r... yes
checking for symlink... yes
checking for tempnam... yes
checking for tzset... yes
checking for unlockpt... yes
checking for unsetenv... yes
checking for usleep... yes
checking for nanosleep... yes
checking for utime... yes
checking for vsnprintf... yes
checking for getaddrinfo... yes
checking for strlcat... no
checking for strlcpy... no
checking for getopt... yes
checking whether utime accepts a null argument... yes
checking for working alloca.h... (cached) yes
checking for alloca... yes
checking for declared timezone... yes
checking for type of reentrant time-related functions... POSIX
checking for readdir_r... yes
checking for type of readdir_r... POSIX
checking for in_addr_t... yes
checking for crypt_r... no

General settings
checking whether to include gcov symbols... no
checking whether to include debugging symbols... no
checking layout of installed files... PHP
checking path to configuration file... /usr/local/php
checking where to scan for configuration files... DEFAULT
checking whether to enable safe mode by default... no
checking for safe mode exec dir... /usr/local/php/bin
checking whether to enable PHP's own SIGCHLD handler... no
checking whether to enable magic quotes by default... no
checking whether to enable runpaths... yes
checking whether to explicitly link against libgcc... no
checking whether to enable short tags by default... yes
checking whether to enable dmalloc... no
checking whether to enable IPv6 support... yes
checking how big to make fd sets... using system default
checking whether to enable versioning... no

Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking for DSA_get_default_method in -lssl... yes
checking for pkg-config... /usr/bin/pkg-config
checking for PCRE support... yes
checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... no
checking for gzgets in -lz... yes
checking whether to enable bc style precision math functions... no
checking for BZip2 support... no
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... no
checking if we should use cURL for url streams... no
checking size of long... (cached) 4
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking whether to enable DBA... no
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable dbase support... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/bin/xml2-config
checking whether libxml build works... (cached) yes
checking whether to enable EXIF (metadata from images) support... no
checking for FrontBase SQL92 (fbsql) support... no
checking for FDF support... no
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... no
checking OpenSSL dir for FTP... no
checking for GD support... yes
checking for the location of libjpeg... no
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-jpeg-dir=
If configure fails try --with-png-dir= and --with-zlib-dir=
If configure fails try --with-xpm-dir=
If configure fails try --with-freetype-dir=
configure: error: Unable to find libgd.(a|so) anywhere under /home/src/gd-2.0.34

La ùltima lìnea me indica que no encuentra el archivo libgd.a pero el archivo si se encuentra en la carpeta. /home/src/gd-2.0.34

Saludos

Re: error cfg.php

Disculpa en el paso de configuracion de la libreria GD omiti un comando.

Por favor ubicate en la carpeta /home/src/gd-2.0.34
# ln -s .libs/libgd.a libgd.a

Luego regresa al directorio /home/src/php-5.2.1 y ejecuta nuevamente
# ./cfg.php

Si persiste el mensaje, te sugiero borrar la carpeta php-5.2.1, descomprimirla
nuevamente copiar cfg.php y proceder a ejecutar cfg.php. Esto en caso de que persista el
problema, suele suceder en ocasiones que ciertos parametros de la configuracion
se quedan guardados en el archivo config.cache y a pesar de que corrigues situaciones
como estas el mensaje de error persiste, en esos casos es recomendable borrar la
carpeta y empezar con un directorio "fresco".

Saludos,

Error libc-client.a

Que tal hacking, disculpa la demora pero se daño el enlace al internet, seguì tus pasos se arreglò pero ahora me da otro error:

hecking for crypt in -lcrypt... yes
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

Elimino la carpeta php-5.2.1, y hago lo demàs que me indicas o se trata de otra cosa.

Saludos

Re: Error libc-client.a

Revisa en el script cfg.php la siguiente linea

--with-imap=/home/src/imap/imap-2004g \

nuevamente fue mi error, pues si seguiste mis instrucciones lo correcto seria

--with-imap=/home/src/imap-2004g \

Modifica esto en tus dos cfg.php el que esta en el root y el que esta en el directorio
de php. Y nuevamente ejecuta ./cfg.php

Mil disculpas, suelo tener dentro de /home/src subdirectorios para las bases
de datos (db), para los archivos de horde (webmail) y tambien para librerias
de imap (imap). De ahi mi descuido, pues en las instrucciones tu tienes todo
en /home/src no tienes otras carpetas.

Saludos,

Páginas