Recherche


imprimer pdf
Installation de Sqwebmail sur un serveur dédié

Obtention des sources

Le site officiel de http://www.courier-mta.org/sqwebmail/ vous permettra d'obtenir les sources. Ensuite il vous suffit de les télécharger via un simple wget de votre serveur. Vous pouvez télécharger directement la version désirée via cette url : http://prdownloads.sourceforge.net/courier/

Quelques liens utiles :

Installation

Pour cette partie nous prendrons comme exemple l'installation de sqwebmail-4.0.7 (dernière version lors de l'écriture du guide) sur un dédié.

  • Mise en place des sources sur le serveur

Connectons-nous tous d'abord sur le serveur en ssh (voir SshSurServeurDedie) :

$ ssh root@nsXXXX.ovh.net
Password:
Last login: Fri Dec 12 10:18:19 2003 from XXXXXXXXXX
Red Hat Linux release 7.2 (Enigma)
Linux nsXXXX.ovh.net 2.4.23 #1 lun déc 1 21:20:36 CET 2003 i686 unknown

machine : XXX
release : 1.45
ip : 213.186.XX.X
hostname : nsXXXX.ovh.net
[root@nsXXXX root]# wget http://ovh.dl.sourceforge.net/sourceforge/courier/sqwebmail-4.0.7.tar.bz2 -O /home/ovh/src/soft/sqwebmail-4.0.7.tar.bz2
[root@nsXXXX root]# cd /home/ovh/src
[root@nsXXXX src]# tar -xjf soft/sqwebmail-4.0.7.tar.bz2


Donc la mise en place des sources a été faite en plaçant les données dans le répertoire /home/ovh/src, répertoire contenant tous les softs compilés sur le dédié.

Passons à la compilation....

  • Compilation

Pour commencer, regardons la configuration que nous avions dans la version de sqwebmail précédente en regardant dans le fichier config.status.

[root@nsXXXX src]# ls -ld sqwebmail*
drwxrwxrwx 24 alias users 4096 sep 12 10:48 sqwebmail-3.5.1.20030319
drwxrwxrwx 24 alias users 4096 déc 12 17:26 sqwebmail-4.0.7


Nous éditons le fichier "config.status" avec notre éditeur favori :

[root@nsXXXX src]# vi sqwebmail-3.5.1.20030319/config.status


ou

[root@nsXXXX src]# pico sqwebmail-3.5.1.20030319/config.status


...

De la nous pourrons récupérer la configuration de base pour sqwebmail, de notre coté nous avons trouvé :


exec /bin/sh ./configure '--enable-cgibindir=/home/ovh/cgi-bin/' '--enable-imagedir=/home/ovh/www/webmail' '--with-authvchkpw' '--without-authpam' '--without-authuserdb' '--without-authpwd' '--without-authshadow' '--without-authldap' '--without-authdaemon' --with-db=gdbm --with-userdb=/etc/userdb --with-formdata --enable-utf7-folder-encoding --enable-unicode=iso-8859-1,utf-8 --prefix=/usr/local/share/sqwebmail --with-makedatprog=${prefix}/libexec/sqwebmail/makedatprog-with-authchangepwdir=${prefix}/libexec/authlib --with-authdaemonvar=/usr/local/share/sqwebmail/var/authdaemon --sysconfdir=/usr/local/share/sqwebmail --with-package=sqwebmail --with-version=3.5.1.20030319 --without-socks --no-create --no-recursion


On va adapter notre commande ./configure par rapport à ça, ce qui donne :

[root@nsXXXX src]# cd sqwebmail-4.0.7
[root@nsXXXX sqwebmail-4.0.7]# ./configure --enable-cgibindir=/home/ovh/cgi-bin/ --enable-imagedir=/home/ovh/www/webmail --with-authvchkpw --without-authpam --without-authuserdb --without-authpwd --without-authshadow --without-authldap --without-authdaemon --with-db=gdbm --with-userdb=/etc/userdb --with-formdata --enable-utf7-folder-encoding --enable-unicode=iso-8859-1,utf-8 --prefix=/usr/local/share/sqwebmail --with-makedatprog=/usr/local/share/sqwebmail/libexec/sqwebmail/makedatprog-with-authchangepwdir=/usr/local/share/sqwebmail/libexec/authlib --with-authdaemonvar=/usr/local/share/sqwebmail/var/authdaemon --sysconfdir=/usr/local/share/sqwebmail --with-package=sqwebmail --with-version=4.0.7 --without-socks


Cela peut mettre jusqu'à quelques minutes, c'est tout à fait normal.

Ensuite nous testons la configuration :

[root@nsXXXX sqwebmail-4.0.7 ]# make configure-check
SqWebMail? CGI will be installed in /home/ovh/cgi-bin/
Images will be installed in /home/ovh/www/webmail
make[1]: Entre dans le répertoire `/home/ovh/src/sqwebmail-4.0.7/sqwebmail'
URL to the image directory is /webmail
make[1]: Quitte le répertoire `/home/ovh/src/sqwebmail-4.0.7/sqwebmail'


Voilà ça m'a l'air bien configuré tout ca :-) on peut lancer la compilation:

[root@nsXXXX sqwebmail-4.0.7 ]# make


Cela peut mettre jusqu'à quelques minutes, c'est tout à fait normal.

Quand la compilation est terminée on vérifie le tout en tapant ceci :

[root@nsXXXX sqwebmail-4.0.7 ]# make check
[root@nsXXXX sqwebmail-4.0.7 ]# make install
[root@nsXXXX sqwebmail-4.0.7 ]# make install-configure
[root@nsXXXX sqwebmail-4.0.7 ]# chown vpopmail.vchkpw /home/ovh/cgi-bin/sqwebmail
[root@nsXXXX sqwebmail-4.0.7 ]# chmod 755 /home/ovh/cgi-bin/sqwebmail


Attention !!! NE PAS OUBLIER DE RELANCER LE DAEMON SQWEBMAILD pour prendre en compte le nouvelle version sinon vous aurez l'erreur :

''Internal Error
The webmail system is temporarily unavailable. An error occured in function write: Transport endpoint is not connected''


[root@nsXXXX sqwebmail-4.0.7 ]# /usr/local/share/sqwebmail/libexec/sqwebmaild.rc stop
[root@nsXXXX sqwebmail-4.0.7 ]# /usr/local/share/sqwebmail/libexec/sqwebmaild.rc start


Vérification

On test de suite l'accès au webmail : http://nsXXXX.ovh.net/cgi-bin/sqwebmail.

Connectez-vous sur un compte pop pour tester et bonheur ça marche :-).