<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JoPa.Fr &#187; Configurations</title>
	<atom:link href="http://www.jopa.fr/index.php/category/configurations/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jopa.fr</link>
	<description>001100010BIDOUILLE11101010111100010LIBRE1000100111100101</description>
	<lastBuildDate>Tue, 10 Jan 2012 21:59:31 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Démonstration de Proxmox VE</title>
		<link>http://www.jopa.fr/index.php/2011/08/15/virtualisation-proxmox/</link>
		<comments>http://www.jopa.fr/index.php/2011/08/15/virtualisation-proxmox/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 21:47:20 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Réseau]]></category>
		<category><![CDATA[Système]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Logiciels Libres]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[Vidéo]]></category>
		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=2482</guid>
		<description><![CDATA[Proxmox Virtual Environnement est un environnement de virtualisation (hyperviseur)  libre, développé et maintenu par la société Autrichienne Proxmox Solutions Server. Proxmox VE s&#8217;installe sur un serveur nu, à partir d&#8217;une image iso téléchargeable sur le site officiel. Etant donné qu&#8217;il repose sur une distribution Debian Lenny, il est tout à fait possible de l&#8217;installer, sur [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><a href="http://www.jopa.fr/wp-content/uploads/2011/08/logo_proxmox.png"><img class="alignright size-full wp-image-2495" title="logo_proxmox" src="http://www.jopa.fr/wp-content/uploads/2011/08/logo_proxmox.png" alt="" width="197" height="120" /></a><a title="Proxmox VE" href="http://www.proxmox.com/">Proxmox Virtual Environnement</a></em> est un environnement de virtualisation (<em><a title="Wikipedia Hyperviseur" href="http://fr.wikipedia.org/wiki/Hyperviseur">hyperviseur</a></em>)  libre, développé et maintenu par la société Autrichienne <em><a href="http://www.proxmox.com/about-us">Proxmox Solutions Server</a></em>.</p>
<p style="text-align: justify;"><em>Proxmox VE</em> s&#8217;installe sur un serveur nu, à partir d&#8217;une image iso téléchargeable sur <a title="Téléchargement Proxmox" href="http://www.proxmox.com/downloads/proxmox-ve">le site officiel</a>. Etant donné qu&#8217;il repose sur une distribution <em><a href="http://www.debian.org">Debian Lenny</a></em>, il est tout à fait possible de l&#8217;installer, sur un système existant, à partir de paquets. La dernière version (1.8) utilise les extensions de virtualisation des processeurs 64 bits, elle n&#8217;est disponible que pour cette architecture, inutile donc,  de tenter une installation sur une machine 32 bits.</p>
<p style="text-align: justify;">Une interface web d&#8217;administration offre une surveillance et une gestion simplifiée des machines virtuelles <a title="Wikipedia KVM" href="http://fr.wikipedia.org/wiki/Kernel-based_Virtual_Machine">KVM (kernel-based Virtual Machine)</a> et para-virtuelles <a title="Wikipedia OpenVZ" href="http://fr.wikipedia.org/wiki/OpenVZ">OpenVZ </a>. Nous pouvons en quelques clics, créer, modifier, supprimer, démarrer, arrêter, suspendre ou visualiser l&#8217;état d&#8217;une machine.</p>
<p style="text-align: justify;">Des outils, en lignes de commandes, permettent des fonctionnalités plus poussées, telles que la sauvegarde à chaud par <em>snapshot</em> ou la restauration.  Enfin, des fonctions de <a title="Clustering" href="http://fr.wikipedia.org/wiki/Grappe_de_serveurs">clustering</a> permettent, par exemple, la migration à chaud de machines virtuelles d&#8217;un serveur physique à un autre.</p>
<p style="text-align: justify;">Je vous propose ci-dessous, trois petites démonstrations en <em>screencast</em>. La première montre l&#8217;utilisation de l&#8217;interface Web pour la création et l&#8217;installation d&#8217;un serveur virtuel <em>kvm</em> sous <em>Debian Squeeze</em>, la deuxième, le clonage de ce serveur à l&#8217;aide des outils de <em>snapshot</em> et de restauration et enfin, la troisième, la création d&#8217;un cluster de deux serveurs <em>Proxmox VE</em> ainsi que la migration d&#8217;une machine virtuelle d&#8217;un serveur vers l&#8217;autre.</p>
<p><span id="more-2482"></span></p>
<h4>Démo n°1 &#8211; Installation d&#8217;un serveur virtuel Debian.</h4>
<p>&nbsp;</p>
<p><a href="http://www.youtube.com/watch?v=tE-tR_iQ6kM"><img src="http://img.youtube.com/vi/tE-tR_iQ6kM/2.jpg"></a></p>
<p><a href="http://www.youtube.com/watch?v=tE-tR_iQ6kM">Click here</a> to view the video on YouTube.</p>

<p>&nbsp;</p>
<h4>Démo n°2 &#8211; Utilisation des outils de sauvegarde et de restauration pour le clonage d&#8217;une VM.</h4>
<p>&nbsp;</p>
<p><a href="http://www.youtube.com/watch?v=GD8MPg27Mu4"><img src="http://img.youtube.com/vi/GD8MPg27Mu4/2.jpg"></a></p>
<p><a href="http://www.youtube.com/watch?v=GD8MPg27Mu4">Click here</a> to view the video on YouTube.</p>

<p>&nbsp;</p>
<h4>Démo n°3 &#8211; Création d&#8217;un cluster Proxmox VE et migration à chaud.</h4>
<p>&nbsp;</p>
<p><a href="http://www.youtube.com/watch?v=HHZLpBTMGCs"><img src="http://img.youtube.com/vi/HHZLpBTMGCs/2.jpg"></a></p>
<p><a href="http://www.youtube.com/watch?v=HHZLpBTMGCs">Click here</a> to view the video on YouTube.</p>

<p>&nbsp;</p>
<h4>Sources :</h4>
<ul>
<li><a title="Proxmox" href="http://www.proxmox.com/">Site officiel Proxmox</a>,</li>
<li><a title="Proxmox sur Wikipedia" href="http://fr.wikipedia.org/wiki/Proxmox">Wikipedia</a>.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2011/08/15/virtualisation-proxmox/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>A &#171;&#160;Tor&#160;&#187; et à travers (d&#8217;Internet)&#8230;</title>
		<link>http://www.jopa.fr/index.php/2010/06/26/tor_privoxy_anonymat/</link>
		<comments>http://www.jopa.fr/index.php/2010/06/26/tor_privoxy_anonymat/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 20:33:19 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Réseau]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sécurité]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1986</guid>
		<description><![CDATA[En quelques mots, Tor (The Onion Router) est un réseau permettant la transmission anonyme de paquets TCP au travers d&#8217;internet&#8230; &#8230;Au lieu d&#8217;emprunter un itinéraire direct entre la source et la destination, les paquets de données suivent une trajectoire aléatoire à travers plusieurs relais&#8230; La suite de ce billet donne une brève introduction à Tor [...]]]></description>
			<content:encoded><![CDATA[<h2><a href="http://www.jopa.fr/wp-content/uploads/2010/06/Tor-logo.png"><img class="size-full wp-image-1988 alignleft" title="Tor-logo" src="http://www.jopa.fr/wp-content/uploads/2010/06/Tor-logo.png" alt="" width="300" height="236" /></a>En quelques mots,</h2>
<p style="text-align: justify;"><a href="http://www.torproject.org/index.html.fr">Tor</a> (The Onion Router) est un réseau permettant la transmission anonyme de paquets TCP au travers d&#8217;internet&#8230;</p>
<blockquote>
<p style="text-align: justify;">&#8230;Au lieu d&#8217;emprunter un itinéraire direct entre la source et la destination, les paquets de données suivent une trajectoire aléatoire à travers plusieurs relais&#8230;</p>
</blockquote>
<p style="text-align: justify;">La suite de ce billet donne une brève introduction à <em>Tor</em> et à son principe de fonctionnement, pour finir par un exemple pratique d&#8217;installation et d&#8217;utilisation.</p>
<p style="text-align: justify;"><span id="more-1986"></span></p>
<h2>Comment ça marche ?</h2>
<p style="text-align: justify;">Après interrogation d&#8217;un serveur <em>Tor</em>, le client reçoit une liste de noeuds. Il construit alors un chemin aléatoire au travers, de telle sorte que chaque relais ne connaisse que l&#8217;adresse de son prédécesseur et de son successeur. Aucun noeud ne connait à lui seul le chemin complet.</p>
<p style="text-align: justify;">
<p style="text-align: center;"><a href="http://www.jopa.fr/wp-content/uploads/2010/06/reseau_tor.png"><img class="aligncenter size-full wp-image-1994" title="reseau_tor" src="http://www.jopa.fr/wp-content/uploads/2010/06/reseau_tor.png" alt="" width="560" height="470" /></a></p>
<p style="text-align: justify;">Un nouveau chemin sera recalculé régulièrement.</p>
<p style="text-align: justify;">Pour garantir sa confidentialité dès le départ, un paquet tcp est chiffré &laquo;&nbsp;en couches&nbsp;&raquo; successives avec la clef publique de chaque noeud, en commençant par le dernier&#8230;</p>
<p style="text-align: center;"><a href="http://www.jopa.fr/wp-content/uploads/2010/06/chiffrement.png"><img class="aligncenter size-full wp-image-1997" title="chiffrement" src="http://www.jopa.fr/wp-content/uploads/2010/06/chiffrement.png" alt="" width="322" height="233" /></a></p>
<p style="text-align: justify;">Lorsque le paquet parcours son chemin, chaque couche de chiffrement sera enlevée par son noeud respectif, jusqu&#8217;au dernier, qui transmettra alors le paquet en clair au serveur destinataire. Je vous laisse faire l&#8217;analogie avec l&#8217;oignon&#8230; Même si mon schéma est un peu &laquo;&nbsp;carré&nbsp;&raquo;.</p>
<p style="text-align: justify;">Il faut être conscient, cependant, que <em>Tor</em> a ses limites : Il gère seulement le transport des paquets TCP et n&#8217;assure pas de protection en <em>UDP</em>. Protocole utilisé entre autres pour les requêtes DNS. De plus, une page <em>web</em> peut récolter directement des informations privées (dont l&#8217;adresse IP), directement auprès du navigateur, par l&#8217;utilisation de Javascript ou la lecture de cookies.</p>
<p style="text-align: justify;">Pour la navigation Web, on va généralement coupler Tor  à un serveur mandataire (<em>proxy</em>) tel que <em>privoxy</em>. Ce dernier va faire l&#8217;interface entre le navigateur et Tor, tout en fournissant un filtrage anonymisant supplémentaire (gestion des cookies, des accès, suppression des pubs, etc&#8230;).</p>
<p style="text-align: center;"><a href="http://www.jopa.fr/wp-content/uploads/2010/06/proxy.png"><img class="size-full wp-image-2000  aligncenter" title="proxy" src="http://www.jopa.fr/wp-content/uploads/2010/06/proxy.png" alt="" width="265" height="163" /></a></p>
<h2>En pratique</h2>
<p style="text-align: justify;"><em>Tor</em> est disponible sous licence BSD et facilement installable pour la majorité des distributions Linux et BSD. Il est également disponible pour de nombreuses plateformes telles que Windows, OSX ou Androïd&#8230; si si !).</p>
<p style="text-align: justify;"><strong>Sous Ubuntu 10.4 :</strong></p>
<pre><span style="color: #800000;"> # echo "deb http://deb.torproject.org/torproject.org lucid main" &gt;
         /etc/apt/sources.list.d/tor.list
 # gpg --keyserver keys.gnupg.net --recv 886DDD89
 # gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
 # apt-get update
 # apt-get install tor privoxy
. </span></pre>
<p>Un (tout) petit peu de configuration&#8230;</p>
<pre>/etc/privoxy/config/</pre>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1986code2'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p19862"><td class="code" id="p1986code2"><pre class="config" style="font-family:monospace;">...
#  Décommenter la ligne suivante pour connecter Privoxy à Tor
forward-socks5   /               127.0.0.1:9050 .
...
# Il peut être judicieux de commenter la ligne suivante pour
# que les logs ne soient pas écrits.
# logfile logfile
...</pre></td></tr></table></div>

<p style="text-align: justify;">On redémarre tout ça :</p>
<pre><span style="color: #800000;"> # /etc/init.d/tor restart
 # /etc/init.d/privoxy restart</span></pre>
<p style="text-align: justify;">Privoxy doit ensuite être déclaré comme proxy dans les préférences du navigateur ou directement dans les préférences réseaux de Gnome. Dans l&#8217;exemple, nous avons bien une installation locale (127.0.0.1) et le port laissé par défaut (8118).</p>
<p style="text-align: justify;">
<p style="text-align: center;"><a href="http://www.jopa.fr/wp-content/uploads/2010/06/Capture-Paramètres-de-connexion-1.png"><img class="size-medium wp-image-2032  aligncenter" title="Capture-Paramètres de connexion-1" src="http://www.jopa.fr/wp-content/uploads/2010/06/Capture-Paramètres-de-connexion-1-300x257.png" alt="" width="300" height="257" /></a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: center;">
<p style="text-align: justify;">Le premier indice permettant de conclure que la configuration est bonne est la lenteur de la navigation. Le passage au travers du réseau Tor ne se fait pas sans perte de performances&#8230;</p>
<p style="text-align: justify;">Le second peut se trouver sur la page : <em>http://www.monip.org,</em> qui ne devrait plus retourner notre adresse IP publique, mais celle du dernier relai traversé.</p>
<h2>Au delà de la navigation</h2>
<p style="text-align: justify;">Au delà de la navigation web et des services pris en charge par le proxy, TOR est capable de sécuriser les connexions d&#8217;autres services grâce à la commande &laquo;&nbsp;<strong>torify</strong>&laquo;&nbsp;. Par exemple, la commande suivante permet une connexion <em>ssh</em> à travers le réseau <em>Tor</em>.</p>
<p style="text-align: justify;"><span style="color: #800000;">$ torify ssh mon.serveur.public.et.fictif.com</span></p>
<p style="text-align: justify;">Voilà pour un petit tour rapide au pays de <em>Tor</em>&#8230; Pour (beaucoup) plus d&#8217;informations, je vous conseille de visiter le site officiel du projet et sa page Wikipédia.</p>
<p style="text-align: justify;">Liens :</p>
<ul>
<li><a href="http://www.torproject.org/overview.html.fr">Tor Project</a>,</li>
<li><a href="http://fr.wikipedia.org/wiki/Tor_(r%C3%A9seau)">Wikipedia &#8211; Tor (Réseau),</a></li>
<li><a href="http://www.privoxy.org/">Privoxy</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2010/06/26/tor_privoxy_anonymat/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SOGo&#8230;What else ?</title>
		<link>http://www.jopa.fr/index.php/2009/11/11/sogo-debian-install/</link>
		<comments>http://www.jopa.fr/index.php/2009/11/11/sogo-debian-install/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 12:38:41 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Groupware]]></category>
		<category><![CDATA[Messagerie]]></category>
		<category><![CDATA[Serveur]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1846</guid>
		<description><![CDATA[Dans la série groupware, je me suis mis en tête de tester SOGo (Scalable OpenGroupware.org).  Un outil collaboratif que j&#8217;avais complètement occulté lors de mes recherches, il y a maintenant quelques mois. J&#8217;ai eu l&#8217;agréable surprise de découvrir qu&#8217;il existait un paquet pour Squeeze, mais après une bonne soirée d&#8217;acharnement, je n&#8217;ai pas réussi à [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.sogo.nu/fr.html"><img class="size-full wp-image-1890 alignleft" title="sogo" src="http://www.jopa.fr/wp-content/uploads/2009/11/sogo.png" alt="sogo" width="264" height="261" /></a>Dans la série <em>groupware</em>, je me suis mis en tête de tester <a title="http://www.scalableogo.org/fr.html" href="http://www.sogo.nu/fr.html" target="_blank">SOGo (Scalable OpenGroupware.org)</a>.  Un outil collaboratif que j&#8217;avais complètement occulté lors de mes recherches, il y a maintenant quelques mois.</p>
<p style="text-align: justify;">J&#8217;ai eu l&#8217;agréable surprise de découvrir qu&#8217;il existait un paquet pour <a title="http://www.scalableogo.org/fr.html" href="http://www.debian.org" target="_blank">Squeeze</a>, mais après une bonne soirée d&#8217;acharnement, je n&#8217;ai pas réussi à obtenir quelque chose de vraiment fonctionnel. Une interface web pleine de bugs, des modules manquants, bref, pas génial génial.</p>
<p style="text-align: justify;">L&#8217;installation étant bien documentée, sur le site officiel, pour une distribution <em>RedHat</em>, je me suis finalement résigné à tenter le coup sur une <em>CentOS 5</em>.  Après tout, je n&#8217;avais pas mis le nez dans une <em>RedHat</em> depuis des lustres, c&#8217;était l&#8217;occasion.</p>
<p style="text-align: justify;">Heureux de cette expérience réussie sous <em>CentOS</em>, j&#8217;ai ressenti une pointe de frustration de n&#8217;avoir pas pu faire tourner le <em>binious</em> sous ma distribution préférée. J&#8217;ai finalement consacré une dernière soirée à une installation à partir des sources, sous <a title="www.debian.org" href="http://www.jopa.fr/index.php/2009/11/12/sogo-debian-install/www.debian.org"><em>Lenny</em></a>.</p>
<p style="text-align: justify;"><span id="more-1846"></span></p>
<h2 style="text-align: justify;">CentOS 5</h2>
<p style="text-align: justify;">La <a title="http://www.scalableogo.org/files/docs/SOGo%20Installation%20Guide.pdf" href="http://www.sogo.nu/files/docs/SOGo%20Installation%20Guide.pdf" target="_blank">documentation officielle</a> est très bien faite et ne justifie pas un article dédié à l&#8217;installation sous <em>CentOS</em>. Il faut veiller cependant à adapter la configuration du dépôt utilisée dans cette doc, en remplaçant <em>RHEL5</em> par <em>CentOS5</em>.</p>
<p style="text-align: justify;">
<p style="text-align: justify;"><em>/etc/yum.repos.d/inverse.repo</em></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1846code7'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p18467"><td class="code" id="p1846code7"><pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>RHEL5<span style="">&#93;</span></span>
&nbsp;
<span style="color: #000099;">name</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Inverse SOGo Repository</span>
&nbsp;
#baseurl<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">http://inverse.ca/downloads/SOGo/RHEL5/$basearch</span>
&nbsp;
<span style="color: #000099;">baseurl</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">http://inverse.ca/downloads/SOGo/CentOS5/nightly/$basearch</span>
&nbsp;
<span style="color: #000099;">gpgcheck</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">0</span></pre></td></tr></table></div>

<p style="text-align: justify;"><em>Note : J&#8217;ai utilisé la branche &laquo;&nbsp;nightly&nbsp;&raquo; après avoir rencontré des problèmes de dépendances avec la branche classique (inverse.ca/downloads/SOGo/CentOS5/$basearch). C&#8217;est évidemment peu recommandé pour une machine en production.</em></p>
<p style="text-align: justify;">A noter également que la doc est basée sur une utilisation avec <em>postgresql</em>, mais passe sous silence l&#8217;installation de ce dernier. Un petit coup de &laquo;&nbsp;yum&nbsp;&raquo; règle rapidement le problème :</p>
<p style="text-align: justify;"><span style="color: #800000;"># yum install postgresql-server</span></p>
<p>Enfin, j&#8217;ai bloqué un petit moment à cause du firewall <em>SeLinux</em> qui interdit par défaut les connexions sur le port <em>http</em>. Pour autoriser les connexions au port 80 :</p>
<p><span style="color: #800000;"># setsebool httpd_can_network_connect=1</span></p>
<h2><img class="aligncenter size-full wp-image-1887" title="sogo2" src="http://www.jopa.fr/wp-content/uploads/2009/11/sogo2.png" alt="sogo2" width="482" height="389" /></h2>
<h2>Debian Lenny</h2>
<h3>Pré-requis</h3>
<p>SOGo utilise un LDAP pour l&#8217;authentification et les annuaires mails centralisés, un serveur SMTP et IMAP pour la gestion des mails. Dans cet exemple, je vais me baser sur l&#8217;architecture décrite ici :</p>
<p id="post-1064"><a title="Lien Permanent : Installation d’un serveur mail brique par brique… (OpenLDAP, Postfix, Cyrus-imap, TLS, SASL, Spamassassin, Amavis, etc…)" rel="bookmark" href="../index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/">Installation d’un serveur mail brique par brique… (OpenLDAP, Postfix, Cyrus-imap, TLS, SASL, Spamassassin, Amavis, etc…)</a></p>
<p>Installation de quelques paquets nécessaires au fonctionnement et à la compilation de SOGo ( Apache2, GNUStep, Postgresql, etc&#8230;)</p>
<p><span style="color: #800000;"># aptitude install apache2 apache2-mpm-prefork apache2-prefork-dev<br />
# aptitude install postgresql<br />
# aptitude install make patch subversion monotone<br />
# aptitude install gobjc gnustep-make libgnustep-base1.16 libgnustep-base-dev libpq5 libpq-dev libldap2-dev libxml2-dev libmysqlclient15-dev gnustep-base-common gnustep-base-runtime</span></p>
<p>La compilation de SOGo nécessite la librairie <em>Memcached (libmemcached2 libmemcached-dev)</em>, non disponible par défaut sous <em>Lenny</em>. Les paquets peuvent cependant être empruntés à <em>Squeeze</em> :</p>
<p>- <a title="http://packages.debian.org/squeeze/libmemcached2   " href="http://packages.debian.org/squeeze/libmemcached2   ">http://packages.debian.org/squeeze/libmemcached2 </a><br />
- <a title="http://packages.debian.org/squeeze/libmemcached-dev   " href="http://packages.debian.org/squeeze/libmemcached-dev">http://packages.debian.org/squeeze/libmemcached-dev</a></p>
<p><span style="color: #800000;"># aptitude install memcached<br />
# dpkg -i libmemcached2_0.31-1_i386.deb libmemcached-dev_0.31-1_i386.deb<br />
</span></p>
<h3>Postgresql</h3>
<p>Création d&#8217;un utilisateur &laquo;&nbsp;<em>sogo</em>&nbsp;&raquo; dans postgresql et création d&#8217;un base &laquo;&nbsp;<em>sogo</em>&laquo;&nbsp;.</p>
<p><span style="color: #800000;"># su – postgres<br />
$ createuser &#8211;no-superuser &#8211;no-createdb &#8211;no-createrole &#8211;encrypted &#8211;pwprompt sogo<br />
$ createdb -O sogo sogo</span></p>
<p><em>Note : Pour l&#8217;exemple, j&#8217;ai utilisé &laquo;&nbsp;sogopasswd&nbsp;&raquo; comme mot de passe. </em></p>
<h3>Récupération des sources</h3>
<p>SOGo  ( monotone )</p>
<p><span style="color: #800000;">$ mtn db init &#8211;db=db.mtn<br />
$ mtn &#8211;db=db.mtn pull inverse.ca ca.inverse.sogo<br />
$ mtn &#8211;db=db.mtn checkout &#8211;branch ca.inverse.sogo SOGo</span></p>
<p>SOPE (Subversion)</p>
<p><span style="color: #800000;">$ svn export -r 1660 http://svn.opengroupware.org/SOPE/trunk/ SOPE<br />
</span></p>
<h3>Compilation</h3>
<p>SOPE</p>
<p><span style="color: #800000;">$ cd SOPE<br />
$ patch -p0 &lt; ../SOGo/SOPE/sope-patchset-r1660.diff<br />
$ patch -p0 &lt; ../SOGo/SOPE/sope-gsmake2.diff<br />
<span style="color: #800000;">$ source /usr/share/GNUstep/Makefiles/GNUstep.sh<br />
$ </span></span><span style="color: #800000;">./configure &#8211;with-gnustep &#8211;enable-strip &#8211;enable-debug<br />
$ make<br />
$ su<br />
# make install<br />
# exit</span></p>
<p>SOGo</p>
<p><span style="color: #800000;"><span style="color: #800000;">$ cd ../SOGo<br />
<span style="color: #800000;">$ source /usr/share/GNUstep/Makefiles/GNUstep.sh</span></span></span><span style="color: #800000;"><br />
$ ./configure &#8211;enable-strip &#8211;enable-debug<br />
$ make<br />
$ su<br />
# make install<br />
# cp Scripts/sogod-wrapper /usr/sbin/</span><br />
<span style="color: #800000;"> # cp debian/sogo.init /etc/init.d/sogo<br />
</span></p>
<p><span style="color: #800000;"># chmod +x /etc/init.d/sogo</span></p>
<p><span style="color: #800000;"> </span></p>
<p>Edition du fichier /etc/init.d/sogo pour affecter 3 à la variable PREFORK. Ce qui permet de lancer 3 <em>démons</em> Sogo simultanément.</p>
<p><em>/etc/init.d/sogo</em></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1846code8'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p18468"><td class="code" id="p1846code8"><pre class="ini" style="font-family:monospace;">...
&nbsp;
# specify more if you are using a load-balancer
&nbsp;
# PREFORK<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1</span>
&nbsp;
<span style="color: #000099;">PREFORK</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">3</span>
&nbsp;
<span style="color: #000099;">SOGO_ARGS</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">&quot;&quot;</span>
&nbsp;
<span style="color: #000099;">USER</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">sogo</span>
&nbsp;
...</pre></td></tr></table></div>

<h3>Configuration</h3>
<p>Création d&#8217;un utilisateur &laquo;&nbsp;sogo&nbsp;&raquo; :</p>
<p><span style="color: #800000;"># adduser sogo &#8211;home /var/lib/sogo</span></p>
<p>Création des répertoires :</p>
<p><span style="color: #800000;"># mkdir /var/spool/sogo /var/run/sogo /var/log/sogo<br />
# chown -R sogo /var/spool/sogo /var/run/sogo /var/log/sogo</span></p>
<p>Création du fichier de configuration :</p>
<p><span style="color: #800000;"># su &#8211; sogo<br />
$ mkdir -p GNUstep/Defaults<br />
$ vi GNUstep/Defaults/.GNUstepDefaults</span></p>
<p>/var/lib/sogo/GNUstep/Defaults/.GNUstepDefaults</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1846code9'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p18469"><td class="code" id="p1846code9"><pre class="ini" style="font-family:monospace;"><span style="">&#123;</span>
     <span style="color: #000099;">NSGlobalDomain</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#123;</span></span>
     <span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">gdnc</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#123;</span></span>
<span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span>
&nbsp;
<span style="color: #000099;">sogod</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#123;</span></span>
    <span style="color: #000099;">NGImap4DisableIMAP4Pooling</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
    <span style="color: #000099;">NGUseUTF8AsURLEncoding</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
    <span style="color: #000099;">OCSFolderInfoURL</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;postgresql://sogo:sogopasswd@localhost:5432/sogo/sogo_folder_info&quot;</span><span style="color: #666666; font-style: italic;">;</span>
    <span style="color: #000099;">SOGoACLsSendEMailNotifications</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
    <span style="color: #000099;">SOGoAppointmentSendEMailNotifications</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
    <span style="color: #000099;">SOGoAuthenticationMethod</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> LDAP</span><span style="color: #666666; font-style: italic;">;</span>
    <span style="color: #000099;">SOGoCalendarDefaultRoles</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#40;</span></span>
     PublicViewer
<span style="">&#41;</span><span style="color: #666666; font-style: italic;">;</span>
&nbsp;
<span style="color: #000099;">SOGoDefaultLanguage</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> French</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoDefaultMailDomain</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> linet.jopa.fr</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoDraftsFolderName</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> INBOX/Drafts</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoFallbackIMAP4Server</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> mail.linet.jopa.fr</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoFoldersSendEMailNotifications</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoLDAPSources</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#40;</span></span>
<span style="">&#123;</span>
     <span style="color: #000099;">CNFieldName</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> cn</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">IDFieldName</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> uid</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">UIDFieldName</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> uid</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">baseDN</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;dc=linet,dc=jopa,dc=fr&quot;</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">bindDN</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;cn=guest,dc=linet,dc=jopa,dc=fr&quot;</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">bindFields</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> uid</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">IMAPHostFieldName</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> site</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">bindPassword</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;MotDePasseGuestLDAP&quot;</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">canAuthenticate</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">displayName</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Adresses Jopa&quot;</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">hostname</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> localhost</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">id</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> public</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">isAddressBook</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">port</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 389</span><span style="color: #666666; font-style: italic;">;</span>
     <span style="color: #000099;">scope</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> SUB</span><span style="color: #666666; font-style: italic;">;</span>
<span style="">&#125;</span>
<span style="">&#41;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoMailingMechanism</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> smtp</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoOtherUsersFolderName</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Other Users&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoProfileURL</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;postgresql://sogo:sogopasswd@localhost:5432/sogo/sogo_user_profile&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoSMTPServer</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> mail.linet.jopa.fr</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoSentFolderName</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> INBOX/Sent</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoServerTimeZone</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Europe/Paris</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoSharedFolderName</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Shared Folders&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoTrashFolderName</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> INBOX/Trash</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WOApplicationRedirectURL</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;http://labo.linet.jopa.fr&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WOMessageUseUTF8</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WOParsersUseUTF8</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> YES</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WOPort</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 20000</span><span style="color: #666666; font-style: italic;">;</span>
&nbsp;
<span style="color: #000099;">WOUseRelativeURLs</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> NO</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoSuperUsernames</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#40;</span>joel<span style="">&#41;</span></span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">SOGoForceIMAPLoginWithEmail</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> NO</span><span style="color: #666666; font-style: italic;">;</span>
&nbsp;
<span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="">&#125;</span></pre></td></tr></table></div>

<p><em>Notes : </em></p>
<p><em>- J&#8217;utilise l&#8217;utilisateur Guest pour la lecture de l&#8217;annuaire LDAP. C&#8217;est utilisateur a des droits en lecture seule sur la branche contenant mes utilisateurs. Si l&#8217;annuaire autorise une lecture anonyme, la connexion à l&#8217;annuaire sous un utilisateur particulier n&#8217;est pas nécessaire.<br />
- labo.linet.jopa.fr est l&#8217;url de la machine sur laquelle est installée Sogo.</em></p>
<h3>Apache</h3>
<p>Création d&#8217;un fichier de configuration : <em>/etc/apache2/conf.d/sogo.conf</em></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1846code10'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p184610"><td class="code" id="p1846code10"><pre class="ini" style="font-family:monospace;">Alias /sogo.woa/WebServerResources/ \
        /usr/local/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo.woa/WebServerResources/ \
        /usr/local/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGO.woa/WebServerResources/ \
        /usr/local/lib/GNUstep/SOGo/WebServerResources/
&nbsp;
&lt;LocationMatch <span style="color: #933;">&quot;^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*jpg&quot;</span>&gt;
  SetHandler default-handler
&lt;/LocationMatch&gt;
&nbsp;
&lt;LocationMatch <span style="color: #933;">&quot;^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*png&quot;</span>&gt;
  SetHandler default-handler
&lt;/LocationMatch&gt;
&nbsp;
&lt;LocationMatch <span style="color: #933;">&quot;^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*gif&quot;</span>&gt;
  SetHandler default-handler
&lt;/LocationMatch&gt;
&nbsp;
&lt;LocationMatch <span style="color: #933;">&quot;^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*css&quot;</span>&gt;
  SetHandler default-handler
&lt;/LocationMatch&gt;
&nbsp;
&lt;LocationMatch <span style="color: #933;">&quot;^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*js&quot;</span>&gt;
  SetHandler default-handler
&lt;/LocationMatch&gt;
&nbsp;
AliasMatch /SOGo/so/ControlPanel/Products/<span style="">&#40;</span>.*<span style="">&#41;</span>/Resources/<span style="">&#40;</span>.*<span style="">&#41;</span> \
           /usr/local/lib/GNUstep/SOGo/$<span style="">1</span>.SOGo/Resources/$<span style="">2</span>
&nbsp;
&lt;Proxy balancer://sogocluster&gt;
  RequestHeader set <span style="color: #933;">&quot;x-webobjects-server-protocol&quot;</span> <span style="color: #933;">&quot;HTTP/1.0&quot;</span>
  RequestHeader set <span style="color: #933;">&quot;x-webobjects-remote-host&quot;</span> <span style="color: #933;">&quot;127.0.0.1&quot;</span>
&nbsp;
  RequestHeader set <span style="color: #933;">&quot;x-webobjects-server-port&quot;</span> <span style="color: #933;">&quot;80&quot;</span>
  RequestHeader set <span style="color: #933;">&quot;x-webobjects-server-name&quot;</span> <span style="color: #933;">&quot;labo.linet.jopa.fr&quot;</span>
  RequestHeader set <span style="color: #933;">&quot;x-webobjects-server-url&quot;</span> <span style="color: #933;">&quot;http://labo.linet.jopa.fr&quot;</span>
&nbsp;
&nbsp;
  BalancerMember http://127.0.0.1:<span style="">20000</span> retry<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1 max=1 timeout=120</span>
  BalancerMember http://127.0.0.1:<span style="">20001</span> retry<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1 max=1 timeout=120</span>
  BalancerMember http://127.0.0.1:<span style="">20002</span> retry<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1 max=1 timeout=120</span>
  ProxySet lbmethod<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">byrequests maxattempts=1</span>
  Order allow,deny
  Allow from all
&lt;/Proxy&gt;
&nbsp;
SetEnv proxy-nokeepalive <span style="">1</span>
ProxyRequests Off
ProxyPass /SOGo balancer://sogocluster/SOGo</pre></td></tr></table></div>

<p>Activation des modules apache :<br />
<span style="color: #800000;"># a2enmod proxy<br />
# a2enmod proxy_http<br />
# a2enmod proxy_balancer<br />
# a2enmod headers</span></p>
<h3>Démarrage</h3>
<p><span style="color: #800000;"># /etc/init.d/apache2 restart<br />
# /etc/init.d/sogo start</span></p>
<p>Si tout se passe bien, l&#8217;interface Web de Sogo est disponible via l&#8217;url : http://votre_serveur/SOGo</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1884" title="sogo1" src="http://www.jopa.fr/wp-content/uploads/2009/11/sogo11.png" alt="sogo1" width="482" height="389" /></p>
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: left;">Sources :</p>
<p style="text-align: left;">- <a title="http://www.scalableogo.org" href="http://www.scalableogo.org" target="_blank">http://www.scalableogo.org</a></p>
<p style="text-align: left;">- <a title="http://wiki.auf.org/wikiteki/ZA/Montr%C3%A9al/SOGo/ProcedureInstallation" href="http://wiki.auf.org/wikiteki/ZA/Montr%C3%A9al/SOGo/ProcedureInstallation" target="_blank">http://wiki.auf.org/wikiteki/ZA/Montr%C3%A9al/SOGo/ProcedureInstallation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/11/11/sogo-debian-install/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Push Mail pour serveur Imap (local ou distant)</title>
		<link>http://www.jopa.fr/index.php/2009/08/05/push-mail-sur-serveur-imap-gmail/</link>
		<comments>http://www.jopa.fr/index.php/2009/08/05/push-mail-sur-serveur-imap-gmail/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 22:01:12 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Réseau]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Messagerie]]></category>
		<category><![CDATA[PDA]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[Téléphone]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1652</guid>
		<description><![CDATA[Pour continuer la construction pas à pas de notre serveur mail (cf installation d&#8217;un serveur mail brique par brique), nous allons offrir à nos utilisateurs de terminaux Windows Mobile le luxe du &#8216;push mail&#8216; (on ne peut pas demander à tout le monde d&#8217;avoir un SmartPhone sous Androïd, ceci dit, moi, ça me plairait assez [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.jopa.fr/wp-content/uploads/2009/08/eb0996d725ea9ae3e95da132acafd9fc1.jpg"><img class="alignleft size-medium wp-image-1654" title="eb0996d725ea9ae3e95da132acafd9fc" src="http://www.jopa.fr/wp-content/uploads/2009/08/eb0996d725ea9ae3e95da132acafd9fc1-300x200.jpg" alt="eb0996d725ea9ae3e95da132acafd9fc" width="300" height="200" /></a>Pour continuer la construction pas à pas de notre serveur mail <a title="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/" href="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/">(cf installation d&#8217;un serveur mail brique par brique</a>), nous allons offrir à nos utilisateurs de terminaux <em>Windows Mobile </em>le luxe du &#8216;<em>push mail</em>&#8216;<em> </em>(on ne peut pas demander à tout le monde d&#8217;avoir un <em>SmartPhone </em>sous <a title="http://fr.wikipedia.org/wiki/Android" href="http://fr.wikipedia.org/wiki/Android"><em>Androïd,</em></a> ceci dit, moi, ça me plairait assez !).  Contrairement à une configuration classique, où le terminal interroge le serveur (en <em>Pop</em> ou <em>Imap</em>), nous allons faire en sorte que ce soit le serveur qui &laquo;&nbsp;<em>pousse</em>&nbsp;&raquo; les nouveaux mails vers le mobile.</p>
<p><span id="more-1652"></span></p>
<ul>
<li>Côté Windows Mobile, c&#8217;est &laquo;&nbsp;ActiveSync&nbsp;&raquo; qui va gérer et maintenir la connexion avec le serveur, donc rien à installer, c&#8217;est super !</li>
<li>Côté serveur, nous allons utiliser &laquo;&nbsp;Z-Push&nbsp;&raquo;, une implémentation open source du protocole ActiveSync, écrite par la société <a title="http://www.zarafaserver.de/" href="http://www.zarafaserver.de/" target="_blank">Zafara</a> (en PHP).</li>
</ul>
<p>Avant de commencer, nous aurons besoin :</p>
<ul>
<li style="text-align: justify;">D&#8217;un serveur Linux avec PHP 5 et Apache 2 installés (et accessible depuis Internet évidemment) &#8211; Pour le test, j&#8217;ai utilisé une Debian Lenny -,</li>
<li style="text-align: justify;">Un serveur IMAP (local ou distant),</li>
<li style="text-align: justify;">Dans l&#8217;optique de la configuration d&#8217;un <em>VirtualHost Apache</em>, une entrée <em>DNS</em> spécifique, c&#8217;est plus propre, mais ce n&#8217;est pas obligatoire,</li>
<li style="text-align: justify;"><a title="https://developer.berlios.de/project/showfiles.php?group_id=8963" href="https://developer.berlios.de/project/showfiles.php?group_id=8963">Les sources de Z-Push</a>,</li>
<li style="text-align: justify;">Un terminal Windows Mobile (testé avec Windows Mobile 6).</li>
</ul>
<h2>Z-Push</h2>
<p>Commençons par décompresser les sources à la racine de notre serveur web :</p>
<p><span style="color: #800000;"># tar xvzf  z-push-1.2.2.tar.gz -C /var/www/</span></p>
<p>Le répertoire <strong>/var/www/z-push/state</strong> doit être accessible en écriture par l&#8217;utilisateur Apache :</p>
<p><span style="color: #800000;"># chmod 700 /var/www/z-push/state<br />
# chown www-data:www-data /var/www/z-push/state</span></p>
<p>Editons ensuite le fichier de configuration  (<strong>/var/www/z-push/config.php</strong>)</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1652code15'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p165215"><td class="code" id="p1652code15"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">...</span>
<span style="color: #666666; font-style: italic;">// The data providers that we are using (see configuration below)</span>
    <span style="color: #000088;">$BACKEND_PROVIDER</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;BackendIMAP&quot;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">...</span>
    <span style="color: #666666; font-style: italic;">// ************************</span>
    <span style="color: #666666; font-style: italic;">//  BackendIMAP settings</span>
    <span style="color: #666666; font-style: italic;">// ************************</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Defines the server to which we want to connect</span>
    <span style="color: #666666; font-style: italic;">// recommended to use local servers only</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_SERVER'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// connecting to default port (143)</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_PORT'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">143</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// best cross-platform compatibility (see http://php.net/imap_open for options)</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_OPTIONS'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/notls/norsh/ssl/novalidate-cert'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// overwrite the &quot;from&quot; header if it isn't set when sending emails</span>
    <span style="color: #666666; font-style: italic;">// options: 'username'    - the username will be set (usefull if your login is equal to your emailaddress)</span>
    <span style="color: #666666; font-style: italic;">//        'domain'    - the value of the &quot;domain&quot; field is used</span>
    <span style="color: #666666; font-style: italic;">//        '@mydomain.com' - the username is used and the given string will be appended</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_DEFAULTFROM'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// copy outgoing mail to this folder. If not set z-push will try the default folders</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_SENTFOLDER'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">...</span></pre></td></tr></table></div>

<p style="text-align: justify;">Les paramètres ci-dessus sont adaptés au serveur imap local. Ils peuvent être ajustés à un autre serveur. Ceci devrait fonctionner avec n&#8217;importe quel serveur IMAP.</p>
<p>Par exemple, pour <em>Gmail</em> :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1652code16'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p165216"><td class="code" id="p1652code16"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_SERVER'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_PORT'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">993</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_OPTIONS'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/notls/norsh/ssl/novalidate-cert'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_DEFAULTFROM'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#41;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IMAP_SENTFOLDER'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h2>Apache</h2>
<p style="text-align: justify;">Nous allons avoir besoin de satisfaire quelques dépendences avant d&#8217;attaquer la configuration d&#8217;<em>Apache.  Z-Push</em> a en effet besoin de quelques paquets pour pouvoir fonctionner correctement :</p>
<p><span style="color: #800000;">#  apt-get install pear php5-imap php5-mail php5-mail-mime php5-pear<br />
# pear install &#8211;alldeps Mail</span></p>
<p style="text-align: justify;">Nous avons ensuite deux alternatives :</p>
<ul style="text-align: justify;">
<li>Créer un VirtualHost afin d&#8217;accéder au serveur directement par son nom : http://z-push.mondomaine.net, (plus propre à mon sens)</li>
<li style="text-align: justify;">Ou configurer un répertoire d&#8217;un site existant : (http://mon_serveur_ou_son_ip/z-push).</li>
</ul>
<h2 style="text-align: justify;">Virtualhost</h2>
<p style="text-align: justify;">Pour créer un VirtualHost, il nous faut ajouter un fichier dans /etc/apache2/sites-available. Arbitrairement, nous allons choisir <em>z-push</em> comme nom de fichier.</p>
<p style="text-align: justify;">/etc/apache2/sites-available/z-push</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1652code17'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p165217"><td class="code" id="p1652code17"><pre class="ini" style="font-family:monospace;">	ServerAlias zpush.mondomaine.net
	ServerAdmin webmaster@mondomaine.net
	DocumentRoot /var/www/z-push
	Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php
&nbsp;
		Options -Indexes
		AllowOverride none
		Order allow,deny
		allow from all
		php_flag magic_quotes_gpc off
		php_flag register_globals off
		php_flag magic_quotes_runtime off
		php_flag short_open_tag on
&nbsp;
	ErrorLog /var/log/apache2/zpush-error.log
	LogLevel warn
	CustomLog /var/log/apache2/zpush-access.log combined
	ServerSignature Off</pre></td></tr></table></div>

<p style="text-align: justify;">La commande <em><strong>a2ensite</strong></em> (Apache2 Enable Site) permet de rendre le <em>VirtualHost</em> actif (équivaut à faire un lien symbolique dans<strong> /etc/apache2/sites-enabled</strong>)</p>
<p style="text-align: justify;">$ sudo a2ensite z-push<br />
$ /etc/init.d/apache2 reload</p>
<h2 style="text-align: justify;">Config par défaut ou .htaccess</h2>
<p style="text-align: justify;">La deuxième technique  consiste à ne configurer que le répertoire <em>z-push</em>, sans création d&#8217;un <em>VirtualHost</em>. Pour cela, nous ajouterons simplement les lignes suivantes dans le fichier de configuration du site par défaut (normalement <strong>/etc/apache2/sites-avaible/defaut</strong>) ou directement dans un fichier un<strong> .htaccess</strong> à la racine du site :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1652code18'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p165218"><td class="code" id="p1652code18"><pre class="ini" style="font-family:monospace;">	Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php
&nbsp;
		Options -Indexes
		AllowOverride none
		Order allow,deny
		allow from all
		php_flag magic_quotes_gpc off
		php_flag register_globals off
		php_flag magic_quotes_runtime off
		php_flag short_open_tag on</pre></td></tr></table></div>

<h2 style="text-align: justify;">Le mobile</h2>
<p style="text-align: justify;">La configuration du serveur étant terminée, nous pouvons tester sur un terminal. Nous allons configurer <em>ActiveSync</em> pour qu&#8217;il se connecte au serveur.</p>
<ul style="text-align: justify;">
<li>Dans ActiveSync :<span style="color: #333399;"> Menu -&gt; Configurer le serveur</span>,
<ul>
<li><strong>Adresse du serveur : </strong><span style="color: #333399;"> zpush.mondomaine.net </span> (nom du VirtualHost ou Url complète d&#8217;accès à z-push),</li>
<li>Décôcher <strong>SSL </strong>(n&#8217;est pas encore configuré sur le serveur Apache),</li>
<li><strong>Nom d&#8217;utilisateur :</strong> L&#8217;utilisateur Imap pour lequel nous voulons recevoir les mails,</li>
<li><strong>Mot de passe :</strong> Mot de passe de l&#8217;utilisateur sur le serveur Imap,</li>
<li><strong>Domaine :</strong> Domaine de messagerie,</li>
<li>Ne synchroniser que les mails : nous avons utilisé z-push pour l&#8217;Imap uniquement.</li>
</ul>
</li>
<li>La synchro devrait ensuite fonctionner. L&#8217;activation du mode Push peut se faire dans le &laquo;&nbsp;<em>Comm Manager</em>&nbsp;&raquo; en activant &laquo;&nbsp;<em><strong>Microsoft Direct Push</strong></em>&laquo;&nbsp;.</li>
</ul>
<p style="text-align: justify;">La méthode est biensûr perfectible par l&#8217;ajout du support SSL. Je ne suis pas arrivé, pour l&#8217;instant, à une solution très satisfaisante concernant ce point. A moins qu&#8217;ils ne nous soit possible de faire certifier le certificat serveur par un autorithé reconnue, il faudra importer ce cetificat sur le mobile. La chose est plutôt fastidieuse, l&#8217;option d&#8217;import n&#8217;étant pas disponible dans <em>Internet Explorer mobile</em>. Il est nécessaire de passer par un export au format xml, que l&#8217;on insère ensuite dans un fichier cab pour l&#8217;installer sur le terminal. Bref, du bon gros bricolage !</p>
<p style="text-align: justify;">
<p style="text-align: justify;">Références :<em> <a title="http://andrew.tj.id.au/activesync-for-gmail/" href="http://andrew.tj.id.au/activesync-for-gmail/" target="_blank"> http://andrew.tj.id.au/activesync-for-gmail/</a></em></p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/08/05/push-mail-sur-serveur-imap-gmail/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>&#171;&#160;Alias&#160;&#187; et &#171;&#160;forward&#160;&#187; avec Postfix + LDAP</title>
		<link>http://www.jopa.fr/index.php/2009/07/28/alias-forward-postfix-openldap/</link>
		<comments>http://www.jopa.fr/index.php/2009/07/28/alias-forward-postfix-openldap/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 20:10:23 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Réseau]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Messagerie]]></category>
		<category><![CDATA[Serveur]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1563</guid>
		<description><![CDATA[En me basant sur l&#8217;architecture présentée dans le billet : Installation d’un serveur mail brique par brique… (OpenLDAP, Postfix, Cyrus-imap, TLS, SASL, Spamassassin, Amavis, etc…), je vais chercher, au travers de cet article, à améliorer la distribution des mails entrants. Ce que je souhaite mettre en place est assez simple d&#8217;un point de vue fonctionnel [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.jopa.fr/wp-content/uploads/2009/07/mail_forward.png"><img class="alignright size-full wp-image-1583" title="mail_forward" src="http://www.jopa.fr/wp-content/uploads/2009/07/mail_forward.png" alt="mail_forward" width="128" height="128" /></a>En me basant sur l&#8217;architecture présentée dans le billet : <a title="Lien Permanent : Installation d’un serveur mail brique par brique… (OpenLDAP, Postfix, Cyrus-imap, TLS, SASL, Spamassassin, Amavis, etc…)" rel="bookmark" href="../index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/">Installation d’un serveur mail brique par brique… (OpenLDAP, Postfix, Cyrus-imap, TLS, SASL, Spamassassin, Amavis, etc…),</a> je vais chercher, au travers de cet article, à améliorer la distribution des mails entrants. Ce que je souhaite mettre en place est assez simple d&#8217;un point de vue fonctionnel :</p>
<ol style="text-align: justify;">
<li>Chaque utilisateur doit pouvoir disposer de plusieurs adresses email pour une même boîte, sans que l&#8217;on ait besoin de le créer plusieurs fois dans l&#8217;annuaire (notion d&#8217;alias) ,</li>
<li>Les messages entrants doivent pouvoir être stockés sur le serveur Imap Local, transférés vers d&#8217;autres adresses (notion de forward) ou, soyons fous, les deux.</li>
</ol>
<p id="post-1064" style="text-align: justify;">Le serveur <em>Imap </em>utilisé est <em>Cyrus</em>, mais ceci n&#8217;a pas vraiment d&#8217;importance, n&#8217;importe quel gestionnaire <em>Imap </em>fera l&#8217;affaire. Il en va de même pour le serveur <em>OpenLDAP </em>qui peut être remplacé par un autre annuaire, pourvu qu&#8217;il respecte les standards. Vous l&#8217;aurez compris, c&#8217;est bel et bien <em>Postfix </em>qui va permettre ces petites galipettes.</p>
<p style="text-align: justify;"><span id="more-1563"></span>Pour l&#8217;exemple, je vais une fois de plus solliciter mon utilisateur préféré : Monsieur Dupont (Jean pour les intimes) . Ce Monsieur souhaite recevoir tous les mails adressés à :</p>
<ul style="text-align: justify;">
<li>jean@linet.jopa.fr,</li>
<li>dupont@linet.jopa.fr,</li>
<li>jean.dupont@linet.jopa.fr.</li>
</ul>
<p style="text-align: justify;">Il dispose bien entendu d&#8217;une boîte<em> Imap </em>sur le serveur<em>,</em> mais souhaite qu&#8217;une copie de ses messages soient transférés sur son compte <em>gmail </em>:  <em>jean.dupont@gmail.com</em>.  C&#8217;est pas très très joli pour la sécurité de l&#8217;entreprise, mais pour l&#8217;exemple (et pour Jean), je vais fermer les yeux !</p>
<p style="text-align: center;"><a href="http://www.jopa.fr/wp-content/uploads/2009/07/postfix_maildrop.jpg"><img class="aligncenter size-full wp-image-1567" title="postfix_maildrop" src="http://www.jopa.fr/wp-content/uploads/2009/07/postfix_maildrop.jpg" alt="postfix_maildrop" width="493" height="486" /></a></p>
<h2><span style="color: #800000;">Le serveur  IMAP :</span></h2>
<p style="text-align: justify;">Je vous l&#8217;ai dit, sur le serveur IMAP, rien de particulier. Il faut juste s&#8217;assurer qu&#8217;il est fonctionnel et que l&#8217;utilisateur <em>Jean </em>y est bien présent. Dans le cas contraire, je vous invite à consulter <a title="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/" href="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/">l&#8217;article précédent</a> pour l&#8217;installation et la configuration d&#8217;un serveur <em>Cyrus-Imap</em>.</p>
<p><span style="color: #800000;"># cyradm –user cyrus localhost<br />
Password:<br />
localhost&gt; lm<br />
<strong>user.jean (HasNoChildren)</strong> user.jojo (HasNoChildren)<br />
user.joel (HasNoChildren)<br />
localhost&gt; quit</span></p>
<p style="text-align: center;">
<h2>L&#8217;annuaire :</h2>
<p style="text-align: justify;">Dans l&#8217;annuaire, j&#8217;ai légèrement modifié le schéma pour y insérer un deuxième attribut &laquo;&nbsp;<em>Mail</em>&laquo;&nbsp;, nommé &laquo;&nbsp;<em>maildrop&nbsp;&raquo;</em>. J&#8217;ai emprunté cet attribut à la classe <em>CourierMailAlias</em> (fournie par courier-Imap), mais en fait, n&#8217;importe quel attribut texte peut faire l&#8217;affaire.</p>
<p style="text-align: justify;">L&#8217;idée est d&#8217;utiliser l&#8217;attribut &laquo;&nbsp;<strong>Mail</strong>&nbsp;&raquo; pour enregistrer les adresses pour lesquelles la réception de courrier est autorisée pour l&#8217;utilisateur :</p>
<ul>
<li>jean@linet.jopa.fr,</li>
<li>dupont@linet.jopa.fr,</li>
<li>jean.dupont@linet.jopa.fr</li>
</ul>
<p style="text-align: justify;">Et l&#8217;attribut &laquo;&nbsp;<strong>MailDrop</strong>&laquo;&nbsp;<strong> </strong>pour les adresses auxquelles le courrier va être effectivement distribué. Il faut noter que cet attribut doit correspondre à des boîtes réellement existantes. Dans sa configuration initiale, <em>Cyrus </em>cherche à stocker les messages dans des boîtes identifiées par le préfixe de l&#8217;adresse du destinataire (ce qui est avant le @).</p>
<ul>
<li>jean@linet.jopa.fr,</li>
<li>jean.dupont@gmail.com</li>
</ul>
<p>Dans cet exemple, tout message adressé  à l&#8217;une ou l&#8217;autre  des 3 adresses définies par l&#8217;attribut <em>&laquo;&nbsp;Mail&nbsp;&raquo; </em>devra  être distribué aux 2 adresses définies par l&#8217;attribut &laquo;&nbsp;<em>MailDrop</em>&laquo;&nbsp;.</p>
<p><strong>Côté ldiff, ça donne ça</strong> :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1563code24'); return false;">View Code</a> LDIF</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p156324"><td class="code" id="p1563code24"><pre class="ldif" style="font-family:monospace;">&nbsp;
# utilisateurs.ldif
dn: uid=jean,dc=linet,dc=jopa,dc=fr
objectClass: top
objectClass: inetOrgPerson
objectClass: CourierMailAlias
uid: jean
cn: Jean DUPONT
sn: Jean
mail: jean@linet.jopa.fr
mail: dupont@linet.jopa.fr
mail: jean.dupont@linet.jopa.fr
maildrop: jean@linet.jopa.fr
maildrop: jean.dupont@gmail.com
userPassword: toto</pre></td></tr></table></div>

<p>Pour utiliser l&#8217;attribut &laquo;&nbsp;Maildrop&nbsp;&raquo; de la classe <em>CourierMailAlias</em>, il est nécessaire de récupérer le schéma décrivant la classe et de l&#8217;intégrer à l&#8217;annuaire. Le fichier s&#8217;appelle authldap.schema et vient avec la doc de Courier-Imap. (/usr/share/doc)&#8230; Vous pouvez également le récupérer ici :</p>
<p><a href="http://www.jopa.fr/wp-content/uploads/2009/07/authldap.schema">authldap.schema</a></p>
<p>Le fichier doit être copié dans le répertoire contenant les schémas ( /etc/ldap/schema logiquement) et intégré à la structure de l&#8217;annuaire dans le fichier <em>/etc/ldap/slapd.conf</em></p>
<h3>/etc/ldap/slapd.conf</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1563code25'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p156325"><td class="code" id="p1563code25"><pre class="ini" style="font-family:monospace;"># This is the main slapd configuration file. See slapd.conf<span style="">&#40;</span><span style="">5</span><span style="">&#41;</span> for more
# info on the configuration options.
&nbsp;
#######################################################################
# Global Directives:
&nbsp;
# Features to permit
allow bind_v2
&nbsp;
# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/authldap.schema
...
...</pre></td></tr></table></div>

<h2>Postfix :</h2>
<p style="text-align: justify;">Le but ici, est de définir Cyrus comme agent de transport local (et virtuel) et de paramétrer les recherches dans l&#8217;annuaire LDAP. Cette recherche sera définie dans deux fichiers de configuration externes : <em>ldap-accounts.cf</em> pour la validation des destinataires et <em>ldap-aliases.cf</em> pour la gestion des alias.</p>
<h3>/etc/postfix.main.cf</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1563code26'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p156326"><td class="code" id="p1563code26"><pre class="ini" style="font-family:monospace;"># See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
<span style="color: #000099;">myorigin</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /etc/mailname</span>
...
...
# PARAMETRES LDAP
# Utilisateurs :
<span style="color: #000099;">virtual_mailbox_maps</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> ldap:/etc/postfix/ldap-accounts.cf</span>
# Alias :
<span style="color: #000099;">virtual_alias_maps</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> ldap:/etc/postfix/ldap-aliases.cf</span>
...
...
# Agent de transport local : CYRUS
<span style="color: #000099;">local_transport</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> cyrus</span>
<span style="color: #000099;">virtual_transport</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> cyrus</span>
<span style="color: #000099;">mailbox_transport</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> cyrus</span>
...
...
...</pre></td></tr></table></div>

<h3>/etc/postfix/ldap-accounts.cf</h3>
<p>Ce fichier configure la recherche dans l&#8217;annuaire pour l&#8217;identification et la validation des destinataires. Il spécifie l&#8217;<em>adresse email</em> comme critère de recherche et  cas de succès, précise que c&#8217;est  l&#8217;<em>uid </em>de l&#8217;utilisateur qui doit être retourné.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1563code27'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p156327"><td class="code" id="p1563code27"><pre class="ini" style="font-family:monospace;"><span style="color: #000099;">server_host</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> localhost</span>
<span style="color: #000099;">server_port</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 389</span>
<span style="color: #000099;">search_base</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> dc=linet, dc=jopa, dc=fr</span>
<span style="color: #000099;">query_filter</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#40;</span>&amp;amp</span><span style="color: #666666; font-style: italic;">; (objectClass=InetOrgPerson)(mail=%s))</span>
<span style="color: #000099;">result_attribute</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> uid</span>
<span style="color: #000099;">bind</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
<span style="color: #000099;">bind_dn</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> cn=admin,dc=linet,dc=jopa,dc=fr</span>
<span style="color: #000099;">bind_pw</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> ******************</span>
<span style="color: #000099;">version</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 3</span></pre></td></tr></table></div>

<h3>/etc/postfix/ldap-aliases.cf</h3>
<p>Ce fichier permet, quant à lui, de gérer les Alias. Il définit lui aussi une recherche sur l<em>&#8216;adresse email</em> (champ mail) mais cette fois, c&#8217;est l&#8217;attribut &laquo;&nbsp;<em>Maildrop</em>&nbsp;&raquo; que sera retourné.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1563code28'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p156328"><td class="code" id="p1563code28"><pre class="ini" style="font-family:monospace;"><span style="color: #000099;">server_host</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> localhost</span>
<span style="color: #000099;">server_port</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 389</span>
<span style="color: #000099;">search_base</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> dc=linet, dc=jopa, dc=fr</span>
<span style="color: #000099;">query_filter</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">&#40;</span>&amp;amp</span><span style="color: #666666; font-style: italic;">; (objectClass=InetOrgPerson)(mail=%s))</span>
<span style="color: #000099;">result_attribute</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> maildrop</span>
<span style="color: #000099;">bind</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
<span style="color: #000099;">bind_dn</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> cn=admin,dc=linet,dc=jopa,dc=fr</span>
<span style="color: #000099;">bind_pw</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> ******************</span>
<span style="color: #000099;">version</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 3</span></pre></td></tr></table></div>

<p>En résumé, encore une démonstration de la puissance du duo Postfix/Ldap, pour une fonctionnalité très pratique et relativement simple à mettre en oeuvre.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/07/28/alias-forward-postfix-openldap/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Installation d’un serveur mail brique par brique…Mise à jour&#8230;</title>
		<link>http://www.jopa.fr/index.php/2009/07/28/installation-d%e2%80%99un-serveur-mail-brique-par-brique%e2%80%a6mise-a-jour/</link>
		<comments>http://www.jopa.fr/index.php/2009/07/28/installation-d%e2%80%99un-serveur-mail-brique-par-brique%e2%80%a6mise-a-jour/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 16:09:13 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Réseau]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Groupware]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Messagerie]]></category>
		<category><![CDATA[Serveur]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1551</guid>
		<description><![CDATA[J&#8217;ai publié, en début d&#8217;année, un billet sur l&#8217;installation d&#8217;un serveur mail basé sur différentes &#171;&#160;briques&#160;&#187; : OpenLDAP, Postfix, Cyrus-imap, TLS, SALS, Spamassassin, Amavis, etc&#8230; En réutilisant ce tuto pour l&#8217;installation d&#8217;un nouveau serveur, je me suis aperçu de quelques coquilles et de légères différences pour une installation sous Lenny. L&#8217;occasion pour moi de réactualiser [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.jopa.fr/wp-content/uploads/2009/07/postfix.jpg"><img class="aligncenter size-full wp-image-1559" title="postfix" src="http://www.jopa.fr/wp-content/uploads/2009/07/postfix.jpg" alt="postfix" width="486" height="91" /></a></p>
<p style="text-align: justify;">J&#8217;ai publié, en début d&#8217;année, <a title="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/" href="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/">un billet</a> sur l&#8217;installation d&#8217;un serveur mail basé sur différentes &laquo;&nbsp;briques&nbsp;&raquo; :</p>
<ul style="text-align: justify;">
<li>OpenLDAP,</li>
<li>Postfix,</li>
<li>Cyrus-imap,</li>
<li>TLS,</li>
<li>SALS,</li>
<li>Spamassassin,</li>
<li>Amavis,</li>
<li>etc&#8230;</li>
</ul>
<p style="text-align: justify;">En réutilisant ce tuto pour l&#8217;installation d&#8217;un nouveau serveur, je me suis aperçu de quelques coquilles et de légères différences pour une installation sous Lenny.</p>
<p style="text-align: justify;">L&#8217;occasion pour moi de réactualiser l&#8217;article, en tenant comptes de vos remarques et commentaires.</p>
<p id="post-1064"><a title="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/" href="http://www.jopa.fr/index.php/2009/02/03/installation-dun-serveur-mail-brique-par-brique-openldap-postfix-cyrus-imap-tls-sasl-spamassassin-amavis-etc/">Installation d’un serveur mail brique par brique… (OpenLDAP, Postfix, Cyrus-imap, TLS, SASL, Spamassassin, Amavis, etc…)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/07/28/installation-d%e2%80%99un-serveur-mail-brique-par-brique%e2%80%a6mise-a-jour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pam et Mir:ror : une authentification RFID sous Linux</title>
		<link>http://www.jopa.fr/index.php/2009/07/16/linux-pam-et-mirror-une-authentification-rfid/</link>
		<comments>http://www.jopa.fr/index.php/2009/07/16/linux-pam-et-mirror-une-authentification-rfid/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 23:10:03 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Bidouilles]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mir:ror]]></category>
		<category><![CDATA[rfid]]></category>
		<category><![CDATA[Sécurité]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1461</guid>
		<description><![CDATA[Cette pluvieuse journée du 14 juillet m&#8217;a permis de poursuivre mes petits travaux sur le lecteur rfid &#171;&#160;Mir:ror&#160;&#187;. Dans les articles précédents, je me suis surtout intéressé au déclenchement d&#8217;événements en fonction des puces rfid détectées (ou pas) par le lecteur, oubliant l&#8217;essence même du RFID : l&#8217;authentification. J&#8217;ai donc profité de ce temps à [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><img class="alignleft size-full wp-image-1462" title="pam_mirror" src="http://www.jopa.fr/wp-content/uploads/2009/07/pam_mirror.jpg" alt="pam_mirror" width="201" height="204" />Cette pluvieuse journée du 14 juillet m&#8217;a permis de poursuivre mes petits travaux sur le lecteur rfid &laquo;&nbsp;Mir:ror&nbsp;&raquo;. Dans les articles précédents, je me suis surtout intéressé au déclenchement d&#8217;événements en fonction des puces <em>rfid </em>détectées (ou pas) par le lecteur, oubliant l&#8217;essence même du RFID : l&#8217;authentification. J&#8217;ai donc profité de ce temps à ne pas mettre mon chat dehors pour écrire un module <a title="http://fr.wikipedia.org/wiki/Pluggable_Authentication_Modules" href="http://fr.wikipedia.org/wiki/Pluggable_Authentication_Modules">PAM (Pluggable Authentification Module)</a> permettant d&#8217;authentifier un utilisateur via le <em>Mir:ror</em>.</p>
<p style="text-align: justify;">L&#8217;idée est simple : si mon <em>Mir:ror</em> est connecté à l&#8217;ordinateur et qu&#8217;un fichier contenant mon <em>rfid </em>est présent dans mon répertoire, je veux pouvoir ouvrir ma session à l&#8217;aide d&#8217;une puce <em>RFID </em>(carte, badge, ztamp:s, laaaaapin&#8230;) à la place de saisir mon mot de passe.</p>
<p style="text-align: justify;"><span id="more-1461"></span></p>
<p style="text-align: justify;">Je ne vais pas m&#8217;attarder ici à décrire la manière dont est codé le module, je vous laisse le soin de lire les sources&#8230; Je vais me contenter d&#8217;expliquer son installation et son utilisation.</p>
<h2>Mise en garde :</h2>
<p style="text-align: justify;">Pour plusieurs raisons dont la simplification du module et mes piètres talents de développeur, il va sans dire que ce petit programme ne doit pas être utilisé en environnement sécurisé. Par contre, pour la maison, c&#8217;est plutôt fun !</p>
<p style="text-align: justify;"><em>Nous touchons ici à une partie sensible du système : l&#8217;authentification. Les manipulations ci-dessous sont donc à réaliser avec prudence.</em></p>
<h2>Compilation :</h2>
<p>Pour pouvoir compiler <em>pam_mir-ror</em>, il nous faut installer un version récente de la librairie de développement pam (libpam-dev). J&#8217;ai utilisé la version 1.0.1 proposée par défaut sous Debian Lenny.</p>
<p><span style="color: #800000;">$ sudo aptitude install libpam-dev</span></p>
<p>L&#8217;archive contenant les sources est téléchargeable ci-dessous :</p>
<ul>
<li><a href="http://www.jopa.fr/wp-content/uploads/2009/07/pam_mir-ror.0.2.tar.gz">pam_mir-ror.0.2.tar.gz</a></li>
</ul>
<p style="text-align: justify;">Une fois téléchargée, il faut la décompresser et tout simplement lancer la commande &laquo;&nbsp;make&nbsp;&raquo;.</p>
<p><span style="color: #800000;">$ tar -xvzf pam_mir-ror.0.2.tar.gz<br />
$ cd pam_mir-ror.0.2<br />
$ make</span></p>
<p style="text-align: justify;">Si tout se passe bien, nous devrions obtenir deux binaires :</p>
<ul style="text-align: justify;">
<li>read_mir-ror : Un petit outil permettant la lecture à partir du Mir:ror,</li>
<li style="text-align: justify;">pam_mir-ror.so : Le module pam.</li>
</ul>
<h2 style="text-align: justify;">read_mir-ror</h2>
<p style="text-align: justify;">Le petit outil read_mir-ror va nous permettre de tester le lecteur. Il suffit de l&#8217;exécuter et d&#8217;approcher une puce rfid.</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo ./read_mirror<br />
0000D0081A025303420200D2</span></p>
<p style="text-align: justify;">La série de chiffres affichée n&#8217;est rien d&#8217;autre que l&#8217;ID de l&#8217;objet détecté.</p>
<p style="text-align: justify;"><em>Il est préférable d&#8217;utiliser read_mirror avec les droits root, au moins la première fois, pour l&#8217;accès au périphérique mir:ror. Par défaut, le mir:ror n&#8217;est accessible que par root. Les droits du handler sont changés à la première utilisation de la fonction de détection (inclue dans l&#8217;outil et le module). Il serait certainement plus propre de coder un petit outil qui serait automatiquement lancé par udev ou hotplug au branchement du Mir:ror, mais pour un module PAM, ce n&#8217;est pas très important.<br />
</em></p>
<h2 style="text-align: justify;">Génération du fichier utilisateur</h2>
<p style="text-align: justify;">Le même outil (read_mir-ror), va nous permettre de générer le fichier <em>.authtag </em>contenant le rfid propre à chaque utilisateur :</p>
<p style="text-align: justify;">Pour l&#8217;utilisateur courant :</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo ./read_mirror &gt; ~/.authtag<br />
$ sudo chmod 400 ~/.authtag</span></p>
<p style="text-align: justify;">Pour un autre utilisateur  (toto):</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo ./read_mirror &gt; /home/toto/.authtag<br />
$ sudo chmod 400 /home/toto/.authtag</span></p>
<p style="text-align: justify;">Il faut bien entendu présenter la puce au lecteur juste après la commande <em>./read_mirror</em>.<br />
Le fichier .authtag doit maintenant contenir le tag :</p>
<p><span style="color: #800000;">$ cat ~/.authtag</span><br />
<span style="color: #800000;">0000D0081A025303420200D2</span></p>
<h2 style="text-align: justify;">Module PAM  :  pam_mir:ror.so</h2>
<p style="text-align: justify;">Pour qu&#8217;il soit utilisable par PAM, il faut que <em>pam_mir:ror.so</em> soit présent dans /lib/security (lib64/security pour une architecture 64 bits)</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo cp pam_mir-ror.so /lib/security</span></p>
<p style="text-align: justify;">ou pour un module 64 bits :</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo cp pam_mir-ror.so /lib64/securit</span>y</p>
<p style="text-align: justify;">La dernière étape va être l&#8217;ajout du module à PAM. Pour cela, il nous faut éditer le fichier :<br />
<em>/etc/pam.d/common-auth </em>pour y ajouter, avant les modules pam_unix.so ou pam_unix2.so :</p>
<p style="text-align: justify;"><em>auth             sufficient         pam_mir-ror.so</em></p>
<p style="text-align: justify;"><em>/etc/pam.d/common-auth</em></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1461code30'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p146130"><td class="code" id="p1461code30"><pre class="ini" style="font-family:monospace;">#
# /etc/pam.d/common-auth - authentication settings common to all services
...
auth    sufficient                      pam_mir-ror.so
# here are the per-package modules <span style="">&#40;</span>the <span style="color: #933;">&quot;Primary&quot;</span> block<span style="">&#41;</span>
auth    <span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>success<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1 default=ignore<span style="">&#93;</span></span>      pam_unix.so nullok_secure</span>
# here's the fallback if no module succeeds
auth    requisite                       pam_deny.so
# prime the stack with a positive return value if there isn't one already<span style="color: #666666; font-style: italic;">;</span>
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
auth    required                        pam_permit.so
# and here are more per-package modules <span style="">&#40;</span>the <span style="color: #933;">&quot;Additional&quot;</span> block<span style="">&#41;</span>
# end of pam-auth-update config</pre></td></tr></table></div>

<p style="text-align: justify;">Avant de rebooter frénétiquement la machine pour voir ce que ça peut donner avec <em>gdm</em>,  je conseille vivement de tester sur une console (crtl-alt-F1 par exemple)&#8230; Comme expliqué en début d&#8217;article, nous touchons ici à une partie sensible du système et c&#8217;est mieux de garder la main pour éviter des pirouettes telles qu&#8217;un redémarrage en single user ou à partir d&#8217;un liveCD pour réparer.</p>
<p style="text-align: justify;">J&#8217;ai fait en sorte que le module loggue un minimum. En fonction du système, ces logs sont visibles dans /var/log/auth.log ou /var/log/syslog.</p>
<p style="text-align: justify;"><a href="http://www.jopa.fr/wp-content/uploads/2009/07/shell1.png"><img class="aligncenter size-full wp-image-1478" title="shell" src="http://www.jopa.fr/wp-content/uploads/2009/07/shell1.png" alt="shell" width="457" height="263" /></a></p>
<p style="text-align: justify;">Dernière version des sources : <a href="http://www.jopa.fr/wp-content/uploads/2009/07/pam_mir-ror.0.2.tar.gz">pam_mir-ror.0.2.tar.gz</a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/07/16/linux-pam-et-mirror-une-authentification-rfid/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Violet connecting objects</title>
		<link>http://www.jopa.fr/index.php/2009/07/07/violet-mirror-linux/</link>
		<comments>http://www.jopa.fr/index.php/2009/07/07/violet-mirror-linux/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 21:57:12 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Bidouilles]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mir:ror]]></category>
		<category><![CDATA[rfid]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1354</guid>
		<description><![CDATA[Vous connaissez certainement la société Violet et plus particulièrement son fameux lapin communicant : le Nabaztag ? Cette même société produit le &#171;&#160;mir:ror&#171;&#160;, un petit gadget très design qui n&#8217;est pas moins qu&#8217;un  lecteur RFID. Question coût, le mir:ror se trouve un peu partout pour un 50ène d&#8217;euros. J&#8217;ai déniché le mien en solde pour [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><img class="alignleft size-medium wp-image-1355" title="mirror" src="http://www.jopa.fr/wp-content/uploads/2009/07/mirror-300x235.gif" alt="mirror" width="300" height="235" />Vous connaissez certainement la société <a title="Violet" href="http://www.violet.net" target="_blank">Violet </a>et plus particulièrement son fameux lapin communicant : le <a title="http://www.nabaztag.com/fr/index.html" href="http://www.nabaztag.com/fr/index.html" target="_blank">Nabaztag </a>? Cette même société produit le &laquo;&nbsp;<a title="http://www.violet.net/_mirror-le-premier-lecteur-rfid.html" href="http://www.violet.net/_mirror-le-premier-lecteur-rfid.html" target="_blank">mir:ror</a>&laquo;&nbsp;, un petit gadget très design qui n&#8217;est pas moins qu&#8217;un  lecteur <a title="http://fr.wikipedia.org/wiki/Radio-identification" href="http://fr.wikipedia.org/wiki/Radio-identification" target="_blank">RFID.</a></p>
<p style="text-align: justify;">Question coût, le <em>mir:ror</em> se trouve un peu partout pour un 50ène d&#8217;euros. J&#8217;ai déniché le mien en solde pour moins de 30 € &#8211; <em>Tu vois chérie, moi aussi le fais les soldes  !!!</em> &#8211; Dans un joli coffret, sont rangés le lecteur <em>usb</em>, 3 &laquo;&nbsp;timbres&nbsp;&raquo; autocollants (<a title="http://www.violet.net/_ztamps-rfid-tag-that-give-powers-to-your-objects.html" href="http://www.violet.net/_ztamps-rfid-tag-that-give-powers-to-your-objects.html">Ztamp:s</a>) et 2 petits lapins (<a title="http://www.violet.net/_nanoztag-the-programmable-RFID-rabbit.html" href="http://www.violet.net/_nanoztag-the-programmable-RFID-rabbit.html">Nano:Ztag</a>), tous munis d&#8217;une puce RFID.<img class="alignright size-full wp-image-1365" title="nano1" src="http://www.jopa.fr/wp-content/uploads/2009/07/nano1.jpg" alt="nano1" width="80" height="138" /></p>
<p style="text-align: justify;">
<p style="text-align: justify;">Le lecteur fonctionne biensûr avec les objets commercialisés par <em>Violet</em>, mais aussi avec n&#8217;importe quel <em>tags RFID</em>, pourvu qu&#8217;il  respecte la norme <a title="http://en.wikipedia.org/wiki/ISO_14443A" href="http://en.wikipedia.org/wiki/ISO_14443A">ISO 14443 A ou B</a> &#8211; La carte de bus/métro de <em>Toulouse </em>fonctionne parfaitement par exemple.</p>
<p style="text-align: justify;">En utilisation standard, moyennant l&#8217;installation d&#8217;un petit logiciel (<a title="http://my.violet.net/mirror/choose_mirware" href="http://my.violet.net/mirror/choose_mirware">Mirware</a>) et la création d&#8217;un compte (gratuit) sur le site de Violet, nous pourrons enregistrer nos objets RFID et associer une action à leur approche ou leur éloignement du lecteur.</p>
<p style="text-align: justify;"><img class="alignleft size-full wp-image-1369" title="ztamps" src="http://www.jopa.fr/wp-content/uploads/2009/07/ztamps.gif" alt="ztamps" width="110" height="110" />Après tout ce vocabulaire &laquo;&nbsp;<em>Nabaztanique</em>&laquo;&nbsp;, il faut bien que j&#8217;avoue que ce n&#8217;est pas pour son utilisation standard que j&#8217;ai craqué, mais pour  les  perspectives prometteuses  offertes en terme de bidouillage : <em>Authentification pam</em>, <em>évènements domotiques (X10)</em>, <em>clef de chiffrement</em>, on peut imaginer énormément d&#8217;usages &laquo;&nbsp;<em>non-officiels</em>&nbsp;&raquo; &#8230; et c&#8217;est ça qui est bon !</p>
<p style="text-align: justify;">Néanmoins, dans la suite du billet, je vais balayer une installation classique du &laquo;&nbsp;<em>Mirware</em>&nbsp;&raquo; sous <em>Linux. </em>Il faut bien commencer par là !<em> </em>Cette manipulation ne présente pas de difficulté particulière, à part peut-être pour les architectures <em>64 bits</em>. Dans un prochain article, je m&#8217;intéresserai au développements possibles autour du joujou !</p>
<p style="text-align: justify;"><span id="more-1354"></span></p>
<h2 style="text-align: justify;">Mirware mon beau Mirware&#8230;</h2>
<p style="text-align: justify;">J&#8217;ai réalisé ce test sur deux machines sous Ubuntu (9.04 &laquo;&nbsp;Jaunty jackalope&nbsp;&raquo; ), l&#8217;une en 32 bits, l&#8217;autre en 64. Mais <em>Mirware</em> devrait fonctionner sous n&#8217;importe quelle distribution, le tout étant de bien installer les librairies nécessaires.</p>
<p style="text-align: justify;">Dans les pré-requis, il faut bien entendu une machine sous <em>Linux</em>, disposant d&#8217;une interface graphique et connectée à Internet. En effet, <em>Mirware</em> fonctionne grâce au serveur <em>Violet.net</em>, sur lequel seront enregistrés les <em>tags </em>et les actions qui leurs sont associées.  C&#8217;est un peu limitant, mais comment dire&#8230;.c&#8217;est comme ça ! Domage !</p>
<p style="text-align: justify;">L&#8217;application est disponible <a title="http://my.violet.net/mirror/choose_mirware" href="http://my.violet.net/mirror/choose_mirware">ici</a> en version alpha&#8230; On regrettera l&#8217;absence des sources, mis à part pour la partie concernant la détection du périphérique, ce qui va sauver l&#8217;installation sur une distribution 64 bits.</p>
<p style="text-align: justify;">Je parlais de librairies, il nous faudra satisfaire quelques dépendances à ce sujet et en installer 3 principales :</p>
<ul>
<li>Qt 4.4 avec le module webkit,</li>
<li>QCA 2.0.1,</li>
<li>SDL 1.2</li>
</ul>
<p>(cf le README pour plus d&#8217;infos)</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo apt-get install   libqt4-webkit   libqca2   libsdl1.2debian</span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="color: #333333;">Nous pouvons à présent télécharger et installer le Mirware :</span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="color: #333333;"><span style="color: #800000;">$ wget -c</span> </span>http://broad.violet.net/mirror/mirware.tar.gz<br />
$ tar -xvzf mirware.tar.gz<br />
$ cd mirware-0.9.9-1724<br />
$ sudo ./installer.sh<br />
</span></p>
<p style="text-align: justify;"><span style="color: #333333;">Le script <em>installer.sh</em>, présent dans l&#8217;archive de Mirware, va juste caler les droits pour la détection du périphérique :<br />
</span></p>
<p style="text-align: justify;"><span style="color: #800000;"><em><span style="color: #333333;">installer.sh ( pour information uniquement)</span></em><br />
</span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1354code32'); return false;">View Code</a> SH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p135432"><td class="code" id="p1354code32"><pre class="sh" style="font-family:monospace;">#!/bin/bash
[ &quot;$(id -u)&quot; -eq 0 ] || { echo &quot;This script needs root credentials&quot; ; exit 1 ; }
chown root discover-device || { echo &quot;Could not change owner of discover-device to root. Do you have root credentials ?&quot; ; exit 1 ; }
chmod a+s discover-device || exit 1
touch detected_device
&nbsp;
echo &quot;All done ! You can now plug a mir:ror and launch mirware-launcher.sh !&quot;</pre></td></tr></table></div>

<p style="text-align: justify;">Il ne reste plus qu&#8217;à connecter le<em> mir:ror</em> et  lancer mirware :</p>
<p><span style="color: #800000;">$ ./mirware-launcher.sh</span></p>
<p style="text-align: justify;"><img class="size-full wp-image-1398 alignleft" title="icone_notif" src="http://www.jopa.fr/wp-content/uploads/2009/07/icone_notif.png" alt="icone_notif" width="113" height="62" />Une icône dans la barre de notification indique que tout se passe bien. En approchant un objet du capteur, une fenêtre de connexion devrait apparaître, suivie d&#8217;un interface permettant d&#8217;enregistrer l&#8217;objet et de lui associer des actions (applications).</p>
<p><img class="aligncenter size-medium wp-image-1399" title="connexion" src="http://www.jopa.fr/wp-content/uploads/2009/07/connexion-300x237.png" alt="connexion" width="300" height="237" /></p>
<p><img class="aligncenter size-medium wp-image-1400" title="mirware" src="http://www.jopa.fr/wp-content/uploads/2009/07/mirware-300x237.png" alt="mirware" width="300" height="237" /></p>
<h2>32 bits&#8230;C&#8217;est bien&#8230;mais 64 ?</h2>
<p style="text-align: justify;">Si vous utilisez une distribution 64 bits, il vous faudra recompiler le petit programme de détection du mir:ror : <em>discover-device</em> et installer les librairies utilisées par <em>Mirware</em> dans leur version 32 bits. Sans les sources et en l&#8217;abscence de version 64 bits, pas le choix&#8230;</p>
<p style="text-align: justify;">Concernant la compilation de <em>discover-device</em>, rien de bien sorcier, il faut juste ne pas oublier de lui redonner les bons droits&#8230;<br />
<span style="color: #800000;">$ sudo rm discover-device<br />
$ gcc discover-device.c -o discover-device<br />
$ sudo ./installer.sh</span></p>
<p style="text-align: justify;">Pour les librairies 32 bits, après avoir pas mal joué de l&#8217;<em>apt-get</em>, je suis tombé sur<a title="http://frozenfox.freehostia.com/cappy/getlibs" href="http://frozenfox.freehostia.com/cappy/getlibs"> un script</a> qui simplifie bien les choses (merci Cappy). <a title="http://ubuntuforums.org/showthread.php?t=474790" href="http://ubuntuforums.org/showthread.php?t=474790">Getlibs</a> prend en paramètre un binaire et télécharge les librairies dépendantes dans leurs versions 32 et 64 bits&#8230; Le pied !</p>
<p><span style="color: #800000;">$ wget -c http://frozenfox.freehostia.com/cappy/getlibs<br />
$ ./getlibs mirware</span></p>
<h2>Pour clore ce chapitre&#8230;</h2>
<p style="text-align: justify;">&#8230;sur une utilisation classique du <em>mir:ror</em>, je peux ajouter qu&#8217;une grande majorité des actions proposées par le serveur sont fonctionnelles sous Linux&#8230; L&#8217;ouverture d&#8217;un dossier, le chargement d&#8217;une url, l&#8217;accès à la messagerie, à un podcast ou une webradio, la lecture d&#8217;un texte en texttospeech et j&#8217;en passe&#8230;</p>
<p style="text-align: justify;">J&#8217;ai tout de même noté un problème gênant sur l&#8217;application permettant le lancement de scripts;  En effet, cette dernière ne sait gérer que des scripts <em>Windows/Dos batch </em>(.bat) ou des <em>AppleScripts(MacOsx)</em>. Ce n&#8217;est pas très gênant pour l&#8217;utilisation que je compte en faire et comme promis, je détaillerai, dans le prochain article comment s&#8217;affranchir des contraintes du serveur <em>Violet</em>.<em>net</em> pour passer de l&#8217;autre côté du mirroir.</p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/07/07/violet-mirror-linux/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Eclipse-PDT sur Ubuntu (AMD-64)</title>
		<link>http://www.jopa.fr/index.php/2009/04/19/eclipse-pdt-sur-ubuntu-amd-64/</link>
		<comments>http://www.jopa.fr/index.php/2009/04/19/eclipse-pdt-sur-ubuntu-amd-64/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 10:33:33 +0000</pubDate>
		<dc:creator>Jopa</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Divers]]></category>
		<category><![CDATA[Evènements]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1259</guid>
		<description><![CDATA[Je suis habitué à développer mes petits projets php grâce à mon éditeur préféré Vi (Vim), via des connexions ssh sur mes serveurs distants &#8211; Ah ben oui M&#8217;sieur ! C&#8217;est de la vielle école ça &#8230;d&#8217;la vielle école !  &#8211; Certains projets prenant de l&#8217;importance, ça commence à devenir vraiment sportif de jongler d&#8217;un [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><img class="alignleft size-medium wp-image-1262" title="capture-eclipse-platform" src="http://www.jopa.fr/wp-content/uploads/2009/04/capture-eclipse-platform-300x194.png" alt="capture-eclipse-platform" width="300" height="194" />Je suis habitué à développer mes petits projets <em>php</em> grâce à mon éditeur préféré Vi (<em>Vim</em>), via des connexions <em>ssh</em> sur mes serveurs distants &#8211; Ah ben oui M&#8217;sieur ! C&#8217;est de la vielle école ça &#8230;d&#8217;la vielle école !  &#8211; Certains projets prenant de l&#8217;importance, ça commence à devenir vraiment sportif de jongler d&#8217;un fichier à l&#8217;autre et quasi impossible d&#8217;avoir un aperçu global de l&#8217;architecture. J&#8217;ai finalement décidé de franchir le pas et de passer sous Eclipse (Eclipse-PDT plus exactement).</p>
<p style="text-align: justify;">Je me suis prestement rendu sur le site officiel (<a href="http://www.eclipse.org/pdt/">http://www.eclipse.org/pdt/</a>) et j&#8217;ai malheureusement constaté que le framework PDT n&#8217;était pas disponible dans les téléchargements, pour l&#8217;architecture <em>AMD-64</em>&#8230;Pas d&#8217;bol !</p>
<p style="text-align: justify;">Heureusement, la version développement (<em>ganymede</em> de son petit nom), semble permettre l&#8217;installation de <em>PDT</em> sous forme de plug-in, directement depuis son interface, y compris pour les architectures 64 bits&#8230;.Je vais détailler par la suite la marche suivie pour arriver au but !</p>
<p style="text-align: justify;"><span id="more-1259"></span></p>
<h2 style="text-align: justify;">Java</h2>
<p style="text-align: justify;">Il me faut commencer par installer le <em>JRE</em> de <em>Sun</em>. Et oui&#8230;<em>Eclipse</em>, c&#8217;est Java avant tout !<br />
Il est possible d&#8217;utiliser l&#8217;installation binaire disponible chez <em>Sun</em> :<a title="http://java.com/en/download/linux_manual.jsp?locale=en&amp;host=java.com:80" href="http://java.com/en/download/linux_manual.jsp?locale=en&amp;host=java.com:80"> http://java.com/en/download/linux_manual.jsp?locale=en&amp;host=java.com:80</a>, ou tout simplement la commande <em>aptitude</em> d&#8217;<em>Ubuntu</em> :</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo aptitude install sun-java6-jre</span></p>
<p style="text-align: justify;">Si plusieurs environnement java sont installés, il est nécessaire de spécifier l&#8217;environnement actif par défaut</p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo update-java-alternatives -l<br />
java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun<br />
java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk<br />
java-6-sun 63 /usr/lib/jvm/java-6-sun<br />
java-gcj 1042 /usr/lib/jvm/java-gcj</span></p>
<p style="text-align: justify;"><span style="color: #800000;">$ sudo update-java-alternatives -s java-6-sun</span></p>
<h2 style="text-align: justify;"><em>Eclipse</em> IDE</h2>
<p style="text-align: justify;">La version 64 bits est téléchargeable ici : <a title="http://www.eclipse.org/downloads/" href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>.</p>
<p style="text-align: justify;">Il suffit de télécharger et décompresser l&#8217;archive à l&#8217;emplacement voulu (<em>/usr/local/eclipse </em>par exemple) et le tour est joué.</p>
<p style="text-align: justify;"><span style="color: #800000;">$ cd /usr/local<br />
$ sudo tar -xvzf ~/eclipse-jee-ganymede-SR2-linux-gtk-x86_64.tar.gz</span></p>
<p style="text-align: justify;">Si tout est bon, l&#8217;exécutable présent à la racine du répertoire devrait lancer l&#8217;application.</p>
<p style="text-align: justify;"><span style="color: #800000;">$ /usr/local/eclipse/eclipse &amp;</span></p>
<p style="text-align: justify;"><span style="color: #800000;"><img class="aligncenter size-large wp-image-1268" title="capture-java-ee-http-12700150118-wse-wsexplorer-wsexplorerjsporgeclipsewstwsexplorer0-eclipse-platform1" src="http://www.jopa.fr/wp-content/uploads/2009/04/capture-java-ee-http-12700150118-wse-wsexplorer-wsexplorerjsporgeclipsewstwsexplorer0-eclipse-platform1-1024x700.png" alt="capture-java-ee-http-12700150118-wse-wsexplorer-wsexplorerjsporgeclipsewstwsexplorer0-eclipse-platform1" width="496" height="338" /><br />
</span></p>
<p style="text-align: justify;">Ben c&#8217;est super tout ça ! Me voici doté  d&#8217;un bel environnement de développement <em>java</em>&#8230;Mais M&#8217;sieur, M&#8217;sieur, c&#8217;est du <em>php</em> que je veux faire moi !</p>
<h2 style="text-align: justify;">Et pour PHP alors ?</h2>
<p style="text-align: justify;">La suite n&#8217;est pas plus compliquée, l&#8217;installation d&#8217;<em>add-ons </em>se fait par le menu &laquo;&nbsp;<em>Help-&gt;Software Update-&gt; Avaible Software</em>&laquo;&nbsp;.  Les boutons <em>Add Sites</em> et<em> Manage Sites</em> vont me permettre d&#8217;ajouter des sites de téléchargement supplémentaires.</p>
<p style="text-align: justify;">Pour faire fonctionner <em>PDT</em>, il me faut d&#8217;abord installer la dernière version du &laquo;&nbsp;<em>Dynamic Language Toolkit</em>&nbsp;&raquo; (DLK pour les intimes). Pour cela, j&#8217;ajoute le site :</p>
<p style="text-align: justify;"><span style="color: #800000;">http://download.eclipse.org/technology/dltk/updates-dev/1.0/</span></p>
<p style="text-align: justify;">et installe : <em><span style="color: #800000;">Dynamic Languages Toolkit &#8211; Core Frameworks (Incubation)</span> </em>par la liste des logiciels disponibles depuis ce site.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1275" title="capture-software-updates-and-add-ons2" src="http://www.jopa.fr/wp-content/uploads/2009/04/capture-software-updates-and-add-ons2.png" alt="capture-software-updates-and-add-ons2" width="538" height="368" /></p>
<p style="text-align: left;">Finalement, j&#8217;utilise la même méthode pour installer PDT :</p>
<ul>
<li>Ajout du site :<span style="color: #800000;"><em> http://phpeclipse.sourceforge.net/update/stable/1.2.x/</em></span>,</li>
<li>Installation de  :<span style="color: #800000;"><em> PHPEclipse</em></span>.</li>
</ul>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1276" title="capture-software-updates-and-add-ons-1" src="http://www.jopa.fr/wp-content/uploads/2009/04/capture-software-updates-and-add-ons-1.png" alt="capture-software-updates-and-add-ons-1" width="538" height="368" /></p>
<p style="text-align: justify;">Après redémarrage, le chargement de l&#8217;environnement <em>PHP</em> se fait via le menu &laquo;&nbsp;<em>Windows-&gt;Open Perspectives</em>&laquo;&nbsp;.</p>
<p style="text-align: center;"><img class="aligncenter size-large wp-image-1278" title="capture-java-ee-bourse-include-class_pf_entree_incphp-eclipse-platform" src="http://www.jopa.fr/wp-content/uploads/2009/04/capture-java-ee-bourse-include-class_pf_entree_incphp-eclipse-platform-1024x621.png" alt="capture-java-ee-bourse-include-class_pf_entree_incphp-eclipse-platform" width="540" height="328" /></p>
<p style="text-align: left;">
<p style="text-align: justify;">D&#8217;autres plugins bien sympathiques existent, notemment en matière de déboggage, d&#8217;accès à des projets, serveurs ou répertoires distants, etc&#8230; Ceci feront peut-être l&#8217;objet d&#8217;un prochain billet.</p>
<p style="text-align: left;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/04/19/eclipse-pdt-sur-ubuntu-amd-64/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Configuration de la connection USB et Bluetooth sur GNU/Linux Debian Lenny d&#8217;un téléphone portable Nokia 3600 Slide</title>
		<link>http://www.jopa.fr/index.php/2009/04/13/configuration-de-la-connection-usb-et-bluetooth-sur-debian-lenny-dun-telephone-portable-nokia-3600-slide/</link>
		<comments>http://www.jopa.fr/index.php/2009/04/13/configuration-de-la-connection-usb-et-bluetooth-sur-debian-lenny-dun-telephone-portable-nokia-3600-slide/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 12:03:55 +0000</pubDate>
		<dc:creator>bm</dc:creator>
				<category><![CDATA[Bidouilles]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Téléphone]]></category>
		<category><![CDATA[Usb]]></category>

		<guid isPermaLink="false">http://www.jopa.fr/?p=1214</guid>
		<description><![CDATA[J&#8217;ai acquis un tel portable Nokia 3600 Slide. Pourquoi ce modèle ? &#8230;Je ne sais pas, j&#8217;étais pressé, j&#8217;avais tombé mon précédent téléphone dans un torrent et l&#8217;eau fraiche et le choc l&#8217;ont &#171;&#160;espouti&#160;&#187; comme on dit à Toulouse. Ce que je suis arrivé à faire après avoir perdu mon carnet d&#8217;adresses de la carte [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">J&#8217;ai acquis un tel portable Nokia 3600 Slide.</p>
<p style="text-align: justify;">Pourquoi ce modèle ? &#8230;Je ne sais pas, j&#8217;étais pressé, j&#8217;avais tombé mon précédent téléphone dans un torrent et l&#8217;eau fraiche et le choc l&#8217;ont &laquo;&nbsp;espouti&nbsp;&raquo; comme on dit à Toulouse.</p>
<p style="text-align: justify;">Ce que je suis arrivé à faire après avoir perdu mon carnet d&#8217;adresses de la carte SIM, &#8230;et avoir bien failli passer sous Windows pour le récupérer  <img src='http://www.jopa.fr/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  :</p>
<ul>
<li><strong>le connecter sur mon microordiateur portable ASUS W5F sous Debian Lenny en USB:</strong></li>
</ul>
<p><strong><br />
</strong></p>
<p><strong><a href="http://www.jopa.fr/wp-content/uploads/2009/04/stockage_donnees.png"><img class="alignnone size-medium wp-image-1219" src="http://www.jopa.fr/wp-content/uploads/2009/04/stockage_donnees-300x187.png" alt="stockage_donnees" width="300" height="187" /></a></strong></p>
<ul>
<li><strong>le connecter sur mon microordiateur portable ASUS W5F sous Debian Lenny en bluetooth:</strong></li>
</ul>
<p><a href="http://www.jopa.fr/wp-content/uploads/2009/04/connection_bluetooh.png"><img class="alignnone size-medium wp-image-1220" src="http://www.jopa.fr/wp-content/uploads/2009/04/connection_bluetooh-300x187.png" alt="connection_bluetooh" width="300" height="187" /></a></p>
<p style="text-align: justify;">Cela permet d&#8217;uploader ou downloader des photos, videos, musique, thèmes , &#8230;.</p>
<ul>
<li><strong>le connecter sur mon ordinateur portable pour sauvegarder et recharger messages, carnet d&#8217;adresses etc &#8230;</strong></li>
</ul>
<p><a href="http://www.jopa.fr/wp-content/uploads/2009/04/xgnokiiusb.png"><img class="alignnone size-medium wp-image-1231" src="http://www.jopa.fr/wp-content/uploads/2009/04/xgnokiiusb-300x187.png" alt="xgnokiiusb" width="300" height="187" /></a></p>
<ul>
<li><strong>ressources qui m&#8217;ont aidé:</strong></li>
</ul>
<p><a title="http://www.meeus-d.be/linux/bluetooth.html" href="http://www.meeus-d.be/linux/bluetooth.html">http://www.meeus-d.be/linux/bluetooth.html</a></p>
<p><a title="http://www.thinkwiki.org/wiki/How_to_setup_Bluetooth" href="http://www.thinkwiki.org/wiki/How_to_setup_Bluetooth">http://www.thinkwiki.org/wiki/How_to_setup_Bluetooth</a></p>
<p>et beaucoup:</p>
<p><a title="http://article.gmane.org/gmane.linux.bluez.devel/12155" href="http://article.gmane.org/gmane.linux.bluez.devel/12155">http://article.gmane.org/gmane.linux.bluez.devel/12155</a></p>
<p><a title="http://article.gmane.org/gmane.linux.drivers.gnokii/10729/match=3600" href="http://article.gmane.org/gmane.linux.drivers.gnokii/10729/match=3600">http://article.gmane.org/gmane.linux.drivers.gnokii/10729/match=3600</a></p>
<p>Merci à eux <img src='http://www.jopa.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><span id="more-1214"></span></p>
<h2><strong>Connection bluetooth:</strong></h2>
<p style="text-align: justify;">J&#8217;ai rédigé ceci à partir de ce que j&#8217;avais fait et mon bash_history , je n&#8217;ai pas retesté &#8230;. Il se peut (c&#8217;est sûr !) que j&#8217;ai oublié quelques éléments &#8230;</p>
<p>Je suppose que la carte bluetooth<strong> de l&#8217;ordinateur portable fonctionne:</strong></p>
<p># hciconfig</p>
<p>doit renvoyer quelque chose du type:</p>
<p>hci0:    Type: USB<br />
BD Address: 00:17:31:09:95:1C ACL MTU: 384:8 SCO MTU: 64:8<br />
UP RUNNING PSCAN ISCAN<br />
RX bytes:937678 acl:55585 sco:0 events:2501 errors:0<br />
TX bytes:8285 acl:287 sco:0 commands:77 errors:0</p>
<p>Installer les paquets ci dessous<strong>:<br />
</strong></p>
<pre><span style="color: #800000;">aptitude search bluez | grep ^i</span></pre>
<pre><span style="color: #800000;">i A bluez-audio                     - Support audio bluetooth
i A bluez-gnome                     - utilitaires Bluetooth pour GNOME
i A bluez-utils                     - outils et démons Bluetooth
i A python-bluez                    - Python wrappers around BlueZ for rapid b</span></pre>
<pre><span style="color: #800000;">aptitude search bluet | grep ^i
i   gnome-bluetooth                 - GNOME Bluetooth tools
i A libbluetooth2                   - Bibliothèque pour utiliser la pile BlueZ</span></pre>
<pre><span style="color: #800000;"> aptitude search obex | grep ^i</span></pre>
<pre><span style="color: #800000;">i A gnome-vfs-obexftp               - GNOME VFS module for OBEX FTP</span></pre>
<pre><span style="color: #800000;">i A libopenobex1                    - OBEX protocol library</span></pre>
<pre><span style="color: #800000;">i A obex-data-server                - D-Bus service for OBEX client and server s</span></pre>
<pre><span style="color: #800000;">i   obexfs                          - mount filesystem of ObexFTP capable device</span></pre>
<pre><span style="color: #800000;">i   obexftp                         - file transfer utility for devices that</span> use</pre>
<p>Dans /etc/default/bluetooth vérifier que:</p>
<p><span style="color: #800000;">BLUETOOTH_ENABLED=1</span></p>
<p><span style="color: #800000;">HID2HCI_ENABLED=1</span></p>
<p><span style="color: #800000;">HIDD_OPTIONS=&nbsp;&raquo;&#8211;master &#8211;server&nbsp;&raquo;</span></p>
<p>J&#8217;ai aussi:</p>
<p><span style="color: #800000;">DUND_ENABLED=1</span></p>
<p><span style="color: #800000;">DUND_OPTIONS=&nbsp;&raquo;&#8211;listen &#8211;persist&nbsp;&raquo;</span></p>
<p>Le paquet bluez-utils contient la commande hcitool</p>
<p>Allumer le tel portable et electionner Menu -&gt;Paramètres-&gt;Connectivité-&gt;Bluetooth</p>
<p>et activer le bluetooth sur le tel portable</p>
<p>Si tout va bien:</p>
<pre><span style="color: #800000;">hcitool scan</span></pre>
<p>renvoie quelque chose comme:</p>
<pre>Scanning ...
	00:21:AB:D9:75:25	Telbm</pre>
<p>installer l2ping et en root:</p>
<pre><span style="color: #800000;">#l2ping 00:21:AB:D9:75:25</span></pre>
<pre><span style="color: #800000;">Ping: 00:21:AB:D9:75:25 from 00:17:31:09:95:1C (data size 44) ...
0 bytes from 00:21:AB:D9:75:25 id 0 time 18.87ms
0 bytes from 00:21:AB:D9:75:25 id 1 time 37.94ms
0 bytes from 00:21:AB:D9:75:25 id 2 time 38.91ms
0 bytes from 00:21:AB:D9:75:25 id 3 time 35.91ms
0 bytes from 00:21:AB:D9:75:25 id 4 time 36.92ms
0 bytes from 00:21:AB:D9:75:25 id 5 time 26.92ms
0 bytes from 00:21:AB:D9:75:25 id 6 time 29.91ms
^C7 sent, 7 received, 0% loss</span></pre>
<p>Dans  /usr/share/doc/bluez-utils/examples/</p>
<p>décompresser passkey-agent.c.gz et le compiler</p>
<pre><span style="color: #800000;">cd /usr/share/doc/bluez-utils/examples/
gunzip passkey-agent.c.gz
make</span></pre>
<pre>Lancer dans une fenêtre de terminal</pre>
<pre><span style="color: #800000;">./passkey-agent --default 0000</span></pre>
<p>Editer dans un autre terminal /etc/bluetooth/hcid.conf et y mettre ceci:</p>
<pre><span style="color: #800000;">options {
autoinit yes;
security auto;
pairing multi;

passkey "0000";
}
device {
name "asusBM";
class 0x3e0100;
iscan enable;
pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
}</span></pre>
<p>Relancer bluetooth</p>
<pre><span style="color: #800000;">/etc/init.d/bluetooth restart</span>

Dans un autre terminal lancer la commande :
<span style="color: #800000;">
obexftp -b 00:21:AB:D9:75:25 -l</span></pre>
<p>Elle doit renvoyer quelque chose du genre:</p>
<pre><span style="color: #800000;"># obexftp -b 00:21:AB:D9:75:25 -l
Browsing 00:21:AB:D9:75:25 ...
Channel: 10
Connecting...done
Receiving "(null)"...\&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd"
 [ &lt;!ATTLIST folder mem-type CDATA #IMPLIED&gt; ]&gt;
&lt;folder-listing version="1.0"&gt;
    &lt;folder name="Carte mémoire" user-perm="RW" mem-type="MMC"/&gt;
    &lt;folder name="Icônes" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
    &lt;folder name="Fichiers audio" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
    &lt;folder name="Thèmes" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
    &lt;folder name="Tonalités" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
    &lt;folder name="Clips vidéo" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
    &lt;folder name="Photos" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
    &lt;folder name="Enregistremts" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
    &lt;folder name="Fichiers reçus" created="20070101T000000" user-perm="R" mem-type="DEV"/&gt;
&lt;/folder-listing&gt;
done
Disconnecting...done</span>

Autoriser le téléphone portable a se connecter automatiquement

Si oui c'est gagné, sinon ...

Il ne reste plus qu'a ouvrir le navigateur de fichiers et lui dire :

Aller à : obex://[00:21:AB:D9:75:25] (cf deuxième copie d'écran en haut de l'article)</pre>
<h2>connection USB</h2>
<p>Pour accéder aux fichiers &laquo;&nbsp;généraux&nbsp;&raquo; (photos, vidéo, musique, &#8230;.</p>
<p>Au branchement du téléphone avec le câble USB il suffit de répondre &laquo;&nbsp;transfert de données&nbsp;&raquo; sur le tel portable.</p>
<p>Pour pouvoir accéder au carnet d&#8217;adresse, aux messages et au calendrier (pas testé ce dernier à ce jour) il faut installer xgnokii</p>
<pre><span style="color: #800000;">aptitude install xgnokii</span>

débrancher et rebrancher le cable USB et sur le téléphone répondre "PCSuite"

puis créer un fichier .gnokiirc</pre>
<p>et y mettre:</p>
<p><span style="color: #800000;">[global]<br />
port = /dev/ttyACM0<br />
model = AT<br />
initlength = default<br />
connection = serial<br />
use_locking = no<br />
serial_baudrate = 19200<br />
smsc_timeout = 10<br />
[xgnokii]<br />
allow_breakage = 0<br />
[gnokiid]<br />
bindir = /usr/sbin/</span></p>
<p>Lancer la commande</p>
<pre><span style="color: #800000;">gnokii --monitor</span></pre>
<p>qui doit renvoyer quelque chose du genre:</p>
<pre><span style="color: #800000;">gnokiid Version 0.6.27</span></pre>
<pre>Entrée en mode surveillance...</pre>
<pre><span style="color: #800000;">Network: France Telecom, France (208 01)</span></pre>
<pre><span style="color: #800000;">LAC: 4302 (17154), CellID: 00006ea2 (28322)</span></pre>
<pre><span style="color: #800000;">Niveau RF: 6</span></pre>
<pre><span style="color: #800000;">Batterie: 68</span></pre>
<pre><span style="color: #800000;">Source d'energie: Battery</span></pre>
<pre><span style="color: #800000;">SIM: Utilise 0, Disponible 150</span></pre>
<pre><span style="color: #800000;">Telephone: Utilise 79, Disponible 1921</span></pre>
<pre><span style="color: #800000;">DC: Utilise 9, Disponible 11</span></pre>
<pre><span style="color: #800000;">FD: Utilise 5, Disponible 25</span></pre>
<pre><span style="color: #800000;">MC: Utilise  0, Disponible 20</span></pre>
<pre><span style="color: #800000;">RC: Utilise 0, Disponible 20</span></pre>
<pre><span style="color: #800000;">Appel0: inactif</span></pre>
<pre><span style="color: #800000;">Appel1: inactif</span></pre>
<pre><span style="color: #800000;">Niveau RF: 6</span></pre>
<pre><span style="color: #800000;">Batterie: 68</span></pre>
<pre><span style="color: #800000;">Source d'energie: Battery</span></pre>
<pre><span style="color: #800000;">SIM: Utilise 0, Disponible 150</span></pre>
<pre><span style="color: #800000;">Telephone: Utilise 79, Disponible 1921</span></pre>
<pre><span style="color: #800000;">DC: Utilise 9, Disponible 11</span></pre>
<pre><span style="color: #800000;">FD: Utilise 5, Disponible 25

...</span></pre>
<p>Si cela fonctionne  lancer en utilisateur xgnokii (cf troisieme copie d&#8217;écran en haut de l&#8217;article)</p>
<p>Je ne me souviens plus si j&#8217;ai essayé de le connecter en bluetooth avec xgnokii.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jopa.fr/index.php/2009/04/13/configuration-de-la-connection-usb-et-bluetooth-sur-debian-lenny-dun-telephone-portable-nokia-3600-slide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

