Blog du grouik - Groupware webmailLe blog du grouik. Memos d'un Admin sys linux windows, logiciels libres, imprimante 3D2024-01-16T12:12:27+00:00Gniearkurn:md5:87c2396a7331cd5cd18f8751d216ec7bDotclearl'extranet home made et Horde 5urn:md5:d47f23459b58e1ad60063e13cf9fed792013-01-17T14:55:00+01:002013-01-17T14:56:50+01:00gniearkGroupware webmaile-mailhordejavascriptPHP <p>::TOC::</p>
<p>L'objectif est d'avoir dans un extranet, un lien ayant pour texte "Vous avez X e-mails non lus". Le click sur ce lien renvoit vers le webmail de horde sans passer par la case authentification car l'utilisateur s'est déjà identifié sur l'extranet.</p>
<p>Comme ceci:
<img src="https://blog-du-grouik.tinad.fr/public/extranetMailsNonLul.jpeg" alt="extranetMailsNonLul.jpeg" style="display:block; margin:0 auto;" title="extranetMailsNonLul.jpeg, janv. 2013" /></p>
<p>Bien évidemment, il faut en prérequis que soit les identifiants mails soient les mêmes que l'extranet, ou bien les avoir stockés quelque part dans les paramètres de l'utilisateur.</p>
<p>J'ai fini de coder tout ça, je ne vais pas donner l'intégralité du code car ça n'a pas d’intérêt, c'est trop spécifique, mais je vais aborder ici les points suivants:</p>
<ul>
<li>En PHP: compter le nombre de messages non lus dans une boite IMAP</li>
<li>S'authentifier de manière transparente sur horde depuis un autre site.</li>
</ul>
<h2>PHP - AJAX indiquer s'il y a des messages non lus dans une boite IMAP</h2>
<p>Il faut avoir la lib php5-imap installée sur le serveur. Pour compter le nombre d'e-mails non lus dans une boite IMAP en php, j'ai écrit la function suivante:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> compteEMailsNonLusIMAP<span style="color: #009900;">(</span><span style="color: #000088;">$hoteIMAP</span><span style="color: #339933;">,</span><span style="color: #000088;">$identifiantIMAP</span><span style="color: #339933;">,</span><span style="color: #000088;">$portIMAP</span><span style="color: #339933;">,</span><span style="color: #000088;">$passwordIMAP</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">/*</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">* Retourne le nombre d'emails non lus dans une boite imap</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">* Retourne false s'il y a une erreur</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">*</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">* Codé par Gnieark http://blog-du-grouik.tinad.fr en janvier 2013</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">* license: http://blog-du-grouik.tinad.fr/pages/Mentions-l%C3%A9gales</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">*/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//ouvrir connexion au serveur IMAP</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//le flag "readonly" évite que les messages soient considérés lus à cause de ce script</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$imapConn</span><span style="color: #339933;">=</span> <a href="http://www.php.net/imap_open"><span style="color: #990000;">imap_open</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'{'</span><span style="color: #339933;">.</span><span style="color: #000088;">$hoteImap</span><span style="color: #339933;">.</span><span style="color: #0000ff;">':'</span><span style="color: #339933;">.</span><span style="color: #000088;">$portIMAP</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/imap/readonly}'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$identifiantIMAP</span><span style="color: #339933;">,</span> <span style="color: #000088;">$passwordIMAP</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #009900; font-weight: bold;">FALSE</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$imapConn</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//La connexion au serveur de mails a échoué. Vérifiez vos paramètres!</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/imap_close"><span style="color: #990000;">imap_close</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$imapConn</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span><span style="color: #b1b100;">else</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//besoin d'avoir le nombre de messages total de la boite mails pour la suite</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$info</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imap_check"><span style="color: #990000;">imap_check</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$imapConn</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #009900; font-weight: bold;">FALSE</span> <span style="color: #339933;">!==</span> <span style="color: #000088;">$info</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//télécharger les entetes des mails</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$mails</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imap_fetch_overview"><span style="color: #990000;">imap_fetch_overview</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$imapConn</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">"1:<span style="color: #006699; font-weight: bold;">{$info->Nmsgs}</span>"</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$count</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//compter les messages non lus</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">foreach</span><span style="color: #009900;">(</span><span style="color: #000088;">$mails</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$lemail</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span><span style="color: #009900;">(</span><span style="color: #000088;">$lemail</span><span style="color: #339933;">-></span><span style="color: #004000;">seen</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'0'</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$count</span> <span style="color: #339933;">++;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/imap_close"><span style="color: #990000;">imap_close</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$imapConn</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//renvoyer le nombre d'emails non lus</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #000088;">$count</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span><span style="color: #b1b100;">else</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//'Impossible de lire le contenu de la boite mail'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/imap_close"><span style="color: #990000;">imap_close</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$imapConn</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">?></span></div></li></ol></pre>
<h2>Accéder au webmail de horde de façon transparante</h2>
<p>Pour accéder à horde de façon transparente, la manipulation est digne d'un script kiddie. Il suffit de faire le formulaire HTML servant à la page d'authentification, en mettant toutes les informations cachées dans des <input type="hidden"> et valider le formulaire avec la function javascript submit().</p>
<p>Bien évidemement avant ça, il faut que vous ayez un peu de code pour renseigner les variables $identifiantIMAP et $motDePasseIMAP</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a onclick="document.forms['authWebmail'].submit();">E-mail</a></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><form id="authWebmail" method="post" action="https://URL/DE/VOTRE/INSTALLATION/DE/HORDE/login.php"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="app" id="app" value="imp" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="login_post" id="login_post" value="0" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="url" value="https://URL/DE/VOTRE/INSTALLATION/DE/HORDE/imp/" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="anchor_string" id="anchor_string" value="" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="horde_select_view" value="auto" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="horde_user" value="<span style="color: #000000; font-weight: bold;"><?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$identifiantIMAP</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?></span>" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="horde_pass" value="<span style="color: #000000; font-weight: bold;"><?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$motDePasseIMAP</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?></span>" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="login_button" value="plop"/></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></form></div></li></ol></pre>
<h2>Mixer le tout pour avoir un lien indiquant le nombre de mais non lus, renvoyant vers horde sans authentification.</h2>
<p>En fonction du nombre d'e-mails et des capacités du serveur de courrier, l'éxécution du script qui compte les messages peut prendre quelques secondes. Il est judicieux d'afficher le nombre de messages non lus via un appel AJAX qui permettra à la page en cours de s'afficher quand même dans un délai raisonnable.</p>
<p>Le lien "E-mails" dans l'image ci dessus a le code HTML/javascript suivant:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a onclick="document.forms['authWebmail'].submit();"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><img src="moteur/simpleWebmail/logo.png" alt="logo">E-mail </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><em id="leftmenu-emails" style="display: none;"></em></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></a></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><form id="authWebmail" method="post" action="https://URL/DE/VOTRE/INSTALLATION/DE/HORDE/login.php"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="app" id="app" value="imp" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="login_post" id="login_post" value="0" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="url" value="https://URL/DE/VOTRE/INSTALLATION/DE/HORDE/imp/" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="anchor_string" id="anchor_string" value="" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="horde_select_view" value="auto" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="horde_user" value="<span style="color: #000000; font-weight: bold;"><?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$identifiantIMAP</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?></span>" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="horde_pass" value="<span style="color: #000000; font-weight: bold;"><?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$motDePasseIMAP</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?></span>" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <input type="hidden" name="login_button" value="plop"/></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></form></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><script type="text/javascript"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <!--</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">function Ajx() </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">{</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> var request = false;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> try {request = new ActiveXObject('Msxml2.XMLHTTP');}</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> catch (err2) {try {request = new ActiveXObject('Microsoft.XMLHTTP');}</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> catch (err3) {try {request = new XMLHttpRequest();}</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> catch (err1) {request = false;}</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> return request;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">}</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">function afficheMailInfos()</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">{</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> var xhr = Ajx(); </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> xhr.onreadystatechange = function(){if(xhr.readyState == 4){ </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> if(xhr.status == 200) {</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> if (xhr.responseText.substr(0,13) == "erreur -WARN-"){</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> alert(xhr.responseText);</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> die;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> document.getElementById('leftmenu-emails').style.display='';</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> document.getElementById('leftmenu-emails').innerHTML = xhr.responseText;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }else{</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> document.getElementById('leftmenu-emails').innerHTML = "<font color=\"#FF0000\">Error code " + xhr.status + "</font>";</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }};</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> xhr.open("POST", '/URL/DU/SCRIPT/QUI/DONNE/LE/NOMBRE/DE/MAILS/NON/LUS.php', true);</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> xhr.send('act=balInfos');</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">}</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> afficheMailInfos();</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> //--></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></script></div></li></ol></pre>
<h2>Conclusion</h2>
<p>Le truc un peu crado de cette méthode c'est que le mot de passe IMAP se trouve du coup dans le code source de la page HTML.
Je me console en me disant que horde et mon extranet sont en https.</p>horde 5 passwdurn:md5:dd6a76d1b8c6b4debe6333b2ae61d56f2012-12-27T00:41:00+01:002012-12-27T09:42:19+01:00gniearkGroupware webmaile-mailhorde <p><img src="https://blog-du-grouik.tinad.fr/public/horde5/.passwd_m.jpg" alt="passwd.png" style="display:block; margin:0 auto;" title="passwd.png, déc. 2012" />
"passwd" est le module de horde 5 qui permet aux utilisateurs de modifier leur mot de passe. son installation présente quelques difficultés actuellement; d'où ce billet. Je ferai un copier collé de son contenu dans le billet plus global sur <a href="https://blog-du-grouik.tinad.fr/post/2012/11/25/horde-5">horde 5</a>.</p>
<h2>Préambule</h2>
<p>Avant de suivre le contenu de ce billet, tentez simplement d'installer le module passwd de la manière suivante:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">pear <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-a</span> <span style="color: #660033;">-B</span> horde<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span></div></li></ol></pre>
<p>A l'heure actuelle, ça ne marche pas, mais peut être qu'au moment où vous lisez ça, passwd est réellement porté pour horde 5.</p>
<h2>Installer passwd</h2>
<p>Sork n'est pas encore disponible officiellement pour horde 5 et si vous tentez de l'installer, via Pear, vous aurez la sortie en erreur suivante:</p>
<pre>
root@mail:/# pear install -a -B horde/passwd
horde/passwd requires package "horde/horde" (version >= 4.0.0, version <= 5.0.0, excluded versions: 5.0.0), installed version is 5.0.2
horde/passwd requires package "horde/Horde_Auth" (version >= 1.4.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.1
horde/passwd requires package "horde/Horde_Core" (version >= 1.3.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.1.0
horde/passwd requires package "horde/Horde_Exception" (version >= 1.0.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.1
horde/passwd requires package "horde/Horde_Injector" (version >= 1.0.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.1
horde/passwd requires package "horde/Horde_Util" (version >= 1.0.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.1
horde/passwd requires package "horde/Horde_View" (version >= 1.0.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.1
horde/passwd requires package "horde/Horde_Db" (version >= 1.0.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.1
horde/passwd requires package "horde/Horde_Ldap" (version >= 1.0.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.1
horde/passwd requires package "horde/Horde_Vfs" (version >= 1.0.0, version <= 2.0.0, excluded versions: 2.0.0), installed version is 2.0.3
horde/passwd can optionally use PHP extension "com"
No valid packages found
install failed
</pre>
<p>Je vais vous expliquer comment je me suis dépatouillé pour l'installer quand même. On va utiliser git. Cependant il va falloir adapter le code pour la nouvelle version de horde.</p>
<h2>Télécharger le module passwd (via git)</h2>
<p>J'ai honte, je ne sais pas comment télécharger uniquement un sous dossier d'un dépot git, du coup, sur mon ordinateur (et pas le serveur), j'ai fait:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>horde.git</div></li></ol></pre>
<p>Il a téléchargé tout le code de horde.
Il vous faut pousser uniquement le sous dossier "passwd" sur le serveur, dans le répertoire d'installation de horde 5.</p>
<p>Une fois installé et paramétré (on verra plus loin), la modification des mots de passe ne fonctionnera pas. on va faire une modification dans son code préalablement)</p>
<h2>Petite modification du module passwd</h2>
<p>Editez le fichier passwd/index.php et vers la ligne 88. Repérez le morceau suivant:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">try <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> Horde_Auth<span style="color: #339933;">::</span><span style="color: #004000;">checkPasswordPolicy</span><span style="color: #009900;">(</span><span style="color: #000088;">$new_password0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password_policy</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">}</span> catch <span style="color: #009900;">(</span>Horde_Auth_Exception <span style="color: #000088;">$e</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$notification</span><span style="color: #339933;">-></span><span style="color: #004000;">push</span><span style="color: #009900;">(</span><span style="color: #000088;">$e</span><span style="color: #339933;">-></span><span style="color: #004000;">getMessage</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'horde.warning'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> goto proceed<span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">}</span></div></li></ol></pre>
<p>c'est ça qui fait "planter" passwd.</p>
<p>Remplacez le par ce code de mon cru, qui refusera un mot de passe de moins de 7 caractères:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$new_password0</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #339933;"><</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$notification</span><span style="color: #339933;">-></span><span style="color: #004000;">push</span><span style="color: #009900;">(</span>_<span style="color: #009900;">(</span><span style="color: #0000ff;">"Your new password must have more than 6 characters"</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'horde.warning'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> goto proceed<span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">}</span></div></li></ol></pre>
<p>Remplacez le fichier passwd/js/passwd.js par celui-ci:</p>
<pre class="javascript javascript" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">document.<span style="color: #660066;">observe</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'dom:loaded'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> $<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-submit'</span><span style="color: #009900;">)</span>.<span style="color: #660066;">observe</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">(</span>e<span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #339933;">!</span>$F<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-oldpassword'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span>Passwd.<span style="color: #660066;">current_pass</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> $<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-oldpassword'</span><span style="color: #009900;">)</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> e.<span style="color: #000066;">stop</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #339933;">!</span>$F<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword0'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span>Passwd.<span style="color: #660066;">new_pass</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> $<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword0'</span><span style="color: #009900;">)</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> e.<span style="color: #000066;">stop</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #339933;">!</span>$F<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword1'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span>Passwd.<span style="color: #660066;">verify_pass</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> $<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword1'</span><span style="color: #009900;">)</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> e.<span style="color: #000066;">stop</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>$F<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword0'</span><span style="color: #009900;">)</span> <span style="color: #339933;">!=</span> $F<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword1'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span>Passwd.<span style="color: #660066;">no_match</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> $<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword0'</span><span style="color: #009900;">)</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> e.<span style="color: #000066;">stop</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>$F<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword0'</span><span style="color: #009900;">)</span>.<span style="color: #660066;">length</span> <span style="color: #339933;"><</span> <span style="color: #CC0000;">7</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Password too short'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> $<span style="color: #009900;">(</span><span style="color: #3366CC;">'passwd-newpassword0'</span><span style="color: #009900;">)</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> e.<span style="color: #000066;">stop</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span>.<span style="color: #660066;">bindAsEventListener</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">}</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li></ol></pre>
<p>J'ai simplement ajouté à la fin le test sur la longueur de la chaîne.</p>
<h2>Configurer les backends</h2>
<p>Editez le fichier passwd/config/backends.php</p>
<ul>
<li>Dans l'array $backends['hordesql'], Mettez 'disabled' => true,</li>
<li>Puis allez bien plus bas éditer le tableau $backends['postfixadmin']</li>
</ul>
<p>Comme quoi, la structure des bases de données de mon serveur n'est pas si marginale: Ils l'ont prévu dans le backend.
Passez le disabled à false et adaptez les parametres des connexion à votre base de données postfix:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$backends</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'postfixadmin'</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a> <span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'disabled'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'Postfix Admin server'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'preferred'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'policy'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'minLength'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'maxLength'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'minNumeric'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'Sql'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'params'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'phptype'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'mysql'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hostspec'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'horde'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'opazeu:/2;A3558/mljkmjioey'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'encryption'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'md5-hex'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'database'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'postfix'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'table'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'mailbox'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'user_col'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'pass_col'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'show_encryption'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The following two settings allow you to specify custom queries for</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// lookup and modify functions if special functions need to be</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// performed. In places where a username or a password needs to be</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// used, refer to this placeholder reference:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// %d -> gets substituted with the domain</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// %u -> gets substituted with the user</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// %U -> gets substituted with the user without a domain part</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// %p -> gets substituted with the plaintext password</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// %e -> gets substituted with the encrypted password</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'query_lookup'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'SELECT password FROM mailbox WHERE username = %u and active = 1'</span><span style="color: #339933;">,</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'query_modify'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'UPDATE mailbox SET password = %e WHERE username = %u'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li></ol></pre>
<h2>Activer passwd</h2>
<ul>
<li>Allez dans la petite roue qui symbolise les parametres> administration Configuration.</li>
<li>Cliquez sur "Mot de passe (passwd) 5.0-git" pour charger sa configuration</li>
</ul>
<p>Je vous conseille de décocher $conf[user][change] afin que les utilisateurs ne puissent pas changer leur identifiant (et par là même leur adresse e-mail).
<img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde-passwd1_m.jpg" alt="horde-passwd1.png" style="display:block; margin:0 auto;" title="horde-passwd1.png, déc. 2012" /></p>
<p>Validez, C'est prêt, je vous conseille cependant de tester avec un compte test et pas le seul compte administrateur que vous avez ;)</p>horde 5 - activer et utiliser active sync sur Androidurn:md5:6d0eb0ffcfd95dce096878655ea5ad002012-11-29T11:24:00+01:002012-12-03T12:35:21+01:00gniearkGroupware webmailhorde <p>C'est la suite du récent billet sur <a href="https://blog-du-grouik.tinad.fr/post/2012/11/25/horde-5">horde 5</a>, j'y rajoute le contenu de ce billet.</p>
<h3>horde</h3>
<p>Un petit tour dans les paramétrages de horde.
<a href="https://blog-du-grouik.tinad.fr/public/horde5/active-sync.jpeg" title="active-sync.jpeg"><img src="https://blog-du-grouik.tinad.fr/public/horde5/.active-sync_m.jpg" alt="active-sync.jpeg" style="display:block; margin:0 auto;" title="active-sync.jpeg, nov. 2012" /></a></p>
<h3>Apache Redirection</h3>
<p>Dans le fichier de configuration du vhost, ajoutez un alias. Entre les balises <VirtualHost *:443> et</VirtualHost> ajoutez la ligne suivante en adaptant en fonction du chemin de votre installation.</p>
<pre>
Alias /Microsoft-Server-ActiveSync /var/www/mail2.vhost-https/webmail/rpc.php
</pre>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 reload</div></li></ol></pre>
<h3>Sur mon android</h3>
<h4>Parametres comptes et synchronisation, Bouton "ajouter un compte"</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-38-26.jpg" alt="2012-11-29_10-38-26.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-38-26.jpg, nov. 2012" /></p>
<h4>Un compte Exchange active sync</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-38-34.jpg" alt="2012-11-29_10-38-34.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-38-34.jpg, nov. 2012" /></p>
<h4>Mon e-mail et son mot de passe</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-39-08.jpg" alt="2012-11-29_10-39-08.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-39-08.jpg, nov. 2012" /></p>
<ul>
<li>l'adresse e-mail</li>
<li>le nom du serveur pleinement qualifié serveur.domaine.tld</li>
<li>le domaine qui peut etre laissé vide</li>
<li>le nom d'utilisateur, dans mon cas, c'est l'adresse e-mail complète</li>
<li>le mot de passe</li>
</ul>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-40-37.jpg" alt="2012-11-29_10-40-37.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-40-37.jpg, nov. 2012" /></p>
<h4>Il veut bien tout synchroniser</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-42-42.jpg" alt="2012-11-29_10-42-42.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-42-42.jpg, nov. 2012" /></p>
<p>Trop cool! Merci à microsoft d'avoir créé ce protocole qui s'est imposé sur tous les smartphones, (et j'ai même essayé avec succès sur un macbook), même si je suis ravi d'avoir un équivalent d'un serveur exchange pour peanuts. Quelques heures de travail seulement.</p>horde 5 - version groupwareurn:md5:f48992ec2283084ab13874eaf38b30162012-11-27T17:30:00+01:002015-06-18T09:57:23+02:00gniearkGroupware webmailhordeLogiciel-librePHPRéseauserveurSSL <p>Mis à jour: 18 juin 2015</p>
<pre></pre>
<p>::TOC::</p>
<p>On avait utilisé Horde3 pendant 1 ou 2 ans, puis, avec l'arrivée des smartphones il y a quelques années, horde a été délaissé au profit de google calendar. Comme il était pénible à mettre à jour, pour une utilisation anecdotique, j'ai mis roundcube qui me demandait moins de temps. Horde 5 est sorti il y a quelques jours. Pour le test, je l'ai installé sur un serveur de mail perso. J'ai été agréablement surpris. Du coup, roundcube va partir du serveur du travail et être remplacé par horde. Je vais peut être même profiter du renouvellement prochain de la flotte de mobiles pour tenter de reprendre à google nos informations.</p>
<p>Je vous présente la nouvelle monture de horde<del>. Attention, si vous souhaitez mettre à jour votre installation de horde en production,Sork n'a pas encore été rendu compatible (on verra comment utiliser quand même le module de changement de mot de passe passwd).</del></p>
<p>Rapidement en quelques impressions d'écran, je vous présente l’aspect du groupware (qui est tres personnalisable), Puis mon mémo d'installation sur un serveur de messagerie déjà prêt.</p>
<h2>Quelques screens shoots</h2>
<h3>La page de connexion</h3>
<p><a href="https://blog-du-grouik.tinad.fr/public/horde5/horde1.jpeg" title="horde1.jpeg"><img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde1_s.jpg" alt="horde1.jpeg" style="display:block; margin:0 auto;" title="horde1.jpeg, nov. 2012" /></a></p>
<h3>La pace d'accueil</h3>
<p><a href="https://blog-du-grouik.tinad.fr/public/horde5/horde2.jpeg" title="horde2.jpeg"><img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde2_s.jpg" alt="horde2.jpeg" style="display:block; margin:0 auto;" title="horde2.jpeg, nov. 2012" /></a></p>
<h3>IMP (le webmail)</h3>
<p><a href="https://blog-du-grouik.tinad.fr/public/horde5/horde3.jpeg" title="horde3.jpeg"><img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde3_s.jpg" alt="horde3.jpeg" style="display:block; margin:0 auto;" title="horde3.jpeg, nov. 2012" /></a></p>
<h3>Kronolith (l'agenda)</h3>
<p><a href="https://blog-du-grouik.tinad.fr/public/horde5/horde4.jpeg" title="horde4.jpeg"><img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde4_s.jpg" alt="horde4.jpeg" style="display:block; margin:0 auto;" title="horde4.jpeg, nov. 2012" /></a></p>
<h3>La page de réglages</h3>
<p><a href="https://blog-du-grouik.tinad.fr/public/horde5/horde5.jpeg" title="horde5.jpeg"><img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde5_s.jpg" alt="horde5.jpeg" style="display:block; margin:0 auto;" title="horde5.jpeg, nov. 2012" /></a></p>
<h3>La version mobile (depuis un HTC explorer)</h3>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/horde5-mobile.jpg" alt="horde5-mobile.jpg" style="display:block; margin:0 auto;" title="horde5-mobile.jpg, nov. 2012" /></p>
<h2>Préparer une base de données pour horde</h2>
<p>Utilisez phpmyadmin, ou la méthode qui vous plait. juste pour frimer, je le fait en console, pour mémo:</p>
<pre class="brush: bash">mysql -u root -p</pre>
<pre class="brush: sql">CREATE database horde;
GRANT ALL ON horde.* TO 'horde'@'localhost' IDENTIFIED BY 'opazeu:/2;A3558/!qeyuzeauioey';
#Au passage, donnez accès à horde à votre base postfix (enfin celle qui contient la liste des comptes e-mails)
GRANT ALL ON postfix.* TO 'horde'@'localhost' IDENTIFIED BY 'opazeu:/2;A3558/!qeyuzeauioey';
quit</pre>
<h2>Installation de horde 5</h2>
<h3>Prérequis</h3>
<ul>
<li>Un serveur mails dédié avec acces en root. Perso, l'installation que j'ai faite correspond à quelques pouyems à celle proposée sur le site starbridge. <a href="http://www.starbridge.org/spip/spip.php?article12" hreflang="fr">Installation Serveur Mail Postfix, Amavisd, Mysql, Spamassassin, Dspam, Dovecot</a>. Le point intéressant de cette solution, c'est que les comptes mails sont gérés dans une base de donnée mysql, ce qui va etre pratique pour interfacer horde</li>
<li>LAMP avec un VHOST HTTPS. Je ne détaillerai pas l'installation d'apache.</li>
</ul>
<h3>Installer pear (s'il n'est pas déja installé)</h3>
<p>Pear est un système d'installation de "paquets" PHP. C'est une alternative à GIT qui a été choisie par les développeurs de horde.
Sous debian, c'est simplement:</p>
<pre class="brush: bash">apt-get install php-pear
#le mettre à jour:
pear upgrade PEAR
#enregistrer le channel horde
pear channel-discover pear.horde.org</pre>
<h3>Installation de Horde 5</h3>
<pre class="brush: bash">#se placer dans le dossier du vhost (adaptez en fonction de votre configuration
cd /var/www/mail2.ton-domaine.fr-https/
#Optionnel, creer un sous dossier et s'y mettre dedans
mkdir webmail
cd webmail
pear install horde/horde_role
#configurer pour l'installation:
pear run-scripts horde/horde_role
#Dans mon cas: Filesystem location for the base Horde application : /var/www/mail2.ton-domaine.fr-https/webmail/
#
#la commande suivante peut prendre un peu de temps en fonction de votre connexion:
pear install -a -B horde/groupware</pre>
<h3>Premier paramétrage:</h3>
<p>On va faire un paramétrage assez générique, le but étant de pouvoir se connecter , pour ensuite paramétrer via l'interface web.</p>
<pre class="brush: bash">groupware-install</pre>
<p>Voici une copie du shell, j'ai pas mal répondu en laissant par défaut.</p>
<ul>
<li>Request persistent connections: Mettez 0 (no) sinon horde ne sera pas capable de se connecter à une autre base de donnée pour l'authentification</li>
<li>A la dernière question, "administrator account", mettez le même identifiant que celui qui sert à votre adresse e-mail. Ça permettra de faire en sorte que vous restiez administrateur lorsqu'on interfacera l'authentification sur les comptes e-mails.</li>
</ul>
<p>.</p>
<pre>
root@mail2:/var/www/mail2.ton-domaine.fr-https/webmail# groupware-install
Installing Horde Groupware
Configuring database settings
What database backend should we use?
(false) [None]
(mysql) MySQL / PDO
(mysqli) MySQL (mysqli)
(pgsql) PostgreSQL
(sqlite) SQLite
Type your choice []: mysql
Request persistent connections?
(1) Yes
(0) No
Type your choice [0]: 0
Username to connect to the database as* [] horde
Password to connect with
How should we connect to the database?
(unix) UNIX Sockets
(tcp) TCP/IP
Type your choice [unix]: tcp
Database server/host* [] localhost
Port the DB is running on, if non-standard [3306]
Database name to use* [] horde
Internally used charset* [utf-8]
Use SSL to connect to the server?
(1) Yes
(0) No
Type your choice [0]:
Certification Authority to use for SSL connections []
Split reads to a different server?
(false) Disabled
(true) Enabled
Type your choice [false]:
Writing main configuration file... done.
Creating and updating database tables... done.
Configuring administrator settings
Specify a user name for the administrator account: rpasserieu@ton-domaine.fr
Specify a password for the adminstrator account:
Writing main configuration file... done.
Thank you for using Horde Groupware!
</pre>
<pre class="brush: bash">#vu qu'on a tout fait en root, on va changer le propriétaire des fichiers de horde:
chown -R www-data:www-data /var/www/mail2.ton-domaine.fr-https/webmail</pre>
<h3>Vérifier que ça marche</h3>
<p>Rendez-vous via votre navigateur sur votre installation.</p>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde7_m.jpg" alt="horde7.jpeg" style="display:block; margin:0 auto;" title="horde7.jpeg, nov. 2012" /></p>
<p>Normalement vous n'avez pas accès à la lecture du courrier. On installera IMP plus tard.</p>
<h3>Changer le mode d'authentification (synchroniser avec les comptes e-mails)</h3>
<ul>
<li>Allez dans la petite roue qui symbolise les parametres> administration Configuration.</li>
<li>Allez sur Horde (horde) Puis dans l'onglet authentification</li>
</ul>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde8_m.jpg" alt="horde8.jpeg" style="display:block; margin:0 auto;" title="horde8.jpeg, nov. 2012" /></p>
<h4>$conf[auth][driver]</h4>
<p>Choisissez "SQL authentification w/custom-made queries"</p>
<h4>$conf[auth][params][protocol]</h4>
<p>TCP/IP</p>
<h4>$conf[auth][params][hostspec]</h4>
<p>localhost</p>
<h4>$conf[auth][params][username]</h4>
<p>horde</p>
<h4>$conf[auth][params][password]</h4>
<p>opazeu:/2;A3558/!qeyuzeauioey</p>
<h4>$conf[auth][params][database]</h4>
<p>postfix</p>
<h3>Les requêtes MySQL</h3>
<p>Dans mon installation, la table mailbox qui contient les comptes des e-mails a cette structure:</p>
<pre>
mysql> describe mailbox;
+------------+--------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------------------+-------+
| username | varchar(255) | NO | PRI | | |
| password | varchar(255) | NO | | | |
| name | varchar(255) | NO | | NULL | |
| maildir | varchar(255) | NO | | | |
| quota | bigint(20) | NO | | 0 | |
| local_part | varchar(255) | NO | | NULL | |
| domain | varchar(255) | NO | | | |
| created | datetime | NO | | 0000-00-00 00:00:00 | |
| modified | datetime | NO | | 0000-00-00 00:00:00 | |
| active | tinyint(1) | NO | | 1 | |
+------------+--------------+------+-----+---------------------+-------+
</pre>
<p>Adaptez les requetes SQL suivantes en fonction de votre base:</p>
<p><em>Merci à <a href="https://blog-du-grouik.tinad.fr/post/2012/11/25/horde-5#c92266">Diablotin</a> qui a trouvé comment adapter les requêtes à un environnement multidomaine <a href="http://www.starbridge.org/support/viewtopic.php?f=3&t=1709">via dokho sur le forum de starbridge</a></em></p>
<h4>$conf[auth][params][query_auth]</h4>
<pre class="brush: sql">SELECT * FROM mailbox WHERE username=\L AND domain=SUBSTRING_INDEX(\L, '@', -1) AND password = \P AND active='1'</pre>
<h4>$conf[auth][params][query_add]</h4>
<pre class="brush: sql">INSERT INTO mailbox (domain, username, password, maildir, quota, created, modified, active) VALUES ( SUBSTRING_INDEX(\L, '@', -1), \L, \P, \L, '0', NOW(), NOW(), '1')</pre>
<h4>$conf[auth][params][query_getpw]</h4>
<pre class="brush: sql">SELECT password FROM mailbox WHERE username=\L</pre>
<h4>$conf[auth][params][query_update]</h4>
<pre class="brush: sql">UPDATE mailbox SET username=\L, password=\P, modified=NOW() WHERE username=\O;</pre>
<h4>$conf[auth][params][query_resetpassword]</h4>
<pre class="brush: sql">UPDATE mailbox SET password=\P, modified=NOW() WHERE username=\L;</pre>
<h4>$conf[auth][params][query_remove]</h4>
<pre class="brush: sql">UPDATE mailbox SET active='0' WHERE username=\L;</pre>
<h4>$conf[auth][params][query_list]</h4>
<pre class="brush: sql">SELECT username FROM mailbox WHERE domain=SUBSTRING_INDEX(\L, '@', -1) AND active='1'</pre>
<h4>$conf[auth][params][query_exists ]</h4>
<pre class="brush: sql">SELECT 1 FROM mailbox WHERE username = \L AND active='1'</pre>
<h4>$conf[auth][params][encryption]</h4>
<p>Dans mon installation, la méthode de chiffrement du mot de passe c'était "md5-hex" sur le serveur perso, et "crypt-md5" sur le serveur du travail (installation plus ancienne)</p>
<p>Validez la configuration.</p>
<p>maintenant, vous vous identifiez avec vos identifiants e-mail.</p>
<h3>Si vous ne pouvez plus vous identifier</h3>
<p>C'est qu'il y a une erreur dans dans les parametres qu'on vient de mettre au point précédent.
Pour restaurer les anciens parametres, remplacez le fichier conf.php par le conf.php.bak</p>
<pre class="brush: bash">mv config/conf.php config/conf.php.fail
mv config/conf.bak.php config/conf.php</pre>
<p>Refermez entièrement le navigateur et éventuellement supprimez les cookies,</p>
<p>et revenez sur horde pour corriger les requetes sql, la méthode de chiffrement du mot de passe ou autre.</p>
<h3>Le webmail IMP</h3>
<h4>Installation</h4>
<pre class="brush: bash">pear install -a -B horde/IMP
chown -R www-data:www-data imp/</pre>
<h4>Paramétrages d'IMP</h4>
<p>On va le paramétrer à la fois pour qu'il ait la bonne configuration du serveur mail, mais aussi pour que l'authentification au groupware horde fasse aussi l'authentification d'IMP de manière transparente (une sorte de SSO quoi).
Editez le fichier imp/config/backends.php</p>
<p>En bas du fichier, $servers['imap']</p>
<pre>
$servers['imap'] = array(
// ENABLED by default
'disabled' => false,
'name' => 'IMAP Server',
'hostspec' => 'localhost',
'realm' =>'tinad.fr',
'hordeauth' => 'full',
'protocol' => 'imap',
'port' => 143,
// Plaintext logins are disabled by default on IMAP servers (see RFC 3501
// [6.2.3]), so TLS is the only guaranteed authentication available by
// default.
'secure' => 'tls',
'maildomain' => '',
'smtp' => array(
// 'auth' => true,
// 'localhost' => 'localhost',
// 'host' => 'smtp.example.com',
// 'password' => null,
// 'port' => 25,
// 'username' => null
),
'cache' => false,
);
</pre>
<p>Dans ce fichier
Si comme sur ma config, c'est l'adresse e-mail complète qui sert d'identifiant:</p>
<ul>
<li>hordeauth => 'full',</li>
<li>'realm' =>'tinad.fr', (enfin, mettez votre domaine)</li>
</ul>
<p>Si ce n'est pas l'adresse mail complete qui sert d'identifiant:</p>
<ul>
<li>hordeauth => TRUE,</li>
</ul>
<p>retournez sur l’interface de horde.</p>
<ul>
<li>Allez dans la petite roue qui symbolise les parametres> administration Configuration.</li>
<li>Allez sur Horde (horde) Puis dans l'onglet authentification</li>
<li>cliquez sur "Le schéma de la base n'est pas à jour." à la ligne courrier(imp)</li>
<li>Déconnectez vous et reconnectez vous, idem, mais cette fois générez la configuration en cliquant sur "Configuration absente."</li>
<li>Générez celle par défaut, elle est tres bien!</li>
</ul>
<h2>Installer le module passwd pour permettre aux utilisateurs de changer de mot de passe</h2>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/.passwd_m.jpg" alt="passwd.png" style="display:block; margin:0 auto;" title="passwd.png, déc. 2012" />
"passwd" est le module de horde 5 qui permet aux utilisateurs de modifier leur mot de passe. <del>son installation présente quelques difficultés actuellement.</del></p>
<h3>Installer passwd</h3>
<p>Sur le serveur:</p>
<pre class="brush: bash">pear install -a -B horde/passwd</pre>
<h3>Configurer les backends</h3>
<p>Editez le fichier passwd/config/backends.php</p>
<ul>
<li>Dans l'array $backends['hordesql'], Mettez 'disabled' => true,</li>
<li>Puis allez bien plus bas éditer le tableau $backends['postfixadmin']</li>
</ul>
<p>Comme quoi, la structure des bases de données de mon serveur n'est pas si marginale: Ils l'ont prévu dans le backend.
Passez le disabled à false et adaptez les parametres des connexion à votre base de données postfix (sans oublier le paramètre 'encryption'):</p>
<pre class="brush: php">$backends['postfixadmin'] = array (
'disabled' => false,
'name' => 'Postfix Admin server',
'preferred' => '',
'policy' => array(
'minLength' => 6,
'maxLength' => 20,
'minNumeric' => 1,
),
'driver' => 'Sql',
'params' => array(
'phptype' => 'mysql',
'hostspec' => 'localhost',
'username' => 'horde',
'password' => 'opazeu:/2;A3558/mljkmjioey',
'encryption' => 'md5-hex',
'database' => 'postfix',
'table' => 'mailbox',
'user_col' => 'username',
'pass_col' => 'password',
'show_encryption' => false,
// The following two settings allow you to specify custom queries for
// lookup and modify functions if special functions need to be
// performed. In places where a username or a password needs to be
// used, refer to this placeholder reference:
// %d -> gets substituted with the domain
// %u -> gets substituted with the user
// %U -> gets substituted with the user without a domain part
// %p -> gets substituted with the plaintext password
// %e -> gets substituted with the encrypted password
//
'query_lookup' => 'SELECT password FROM mailbox WHERE username = %u and active = 1',
'query_modify' => 'UPDATE mailbox SET password = %e WHERE username = %u'
),
);</pre>
<h3>Activer passwd</h3>
<ul>
<li>Allez dans la petite roue qui symbolise les parametres> administration Configuration.</li>
<li>Cliquez sur "Mot de passe (passwd) 5.0.0 " pour charger sa configuration</li>
</ul>
<p>Je vous conseille de décocher $conf[user][change] afin que les utilisateurs ne puissent pas changer leur identifiant (et par là même leur adresse e-mail).
<img src="https://blog-du-grouik.tinad.fr/public/horde5/.horde-passwd1_m.jpg" alt="horde-passwd1.png" style="display:block; margin:0 auto;" title="horde-passwd1.png, déc. 2012" /></p>
<p>Validez, C'est prêt, je vous conseille cependant de tester avec un compte test et pas le seul compte administrateur que vous avez ;)</p>
<h2>Mettre Horde à jour</h2>
<p>Si dans les parametres il vous prévient que de nouvelles mises à jours sont disponibles.... La commande pour mettre toute l'installation à jour via pear c'est:</p>
<pre>[bash]
pear upgrade -a -B -c horde
#dans un prochain billet j'expliquerai comment demander à pear d'agir en tant que l'utilisateur www-data,
#mais comme dans l'immédiat on ne l'a pas fait, redonnez les droits à www-data sur votre vhost:
chown -R www-data:www-data /var/www/mail.vhost.fr-https/
</pre>
<p>Une fois que pear a fini son travail, rafraîchissez la page des paramètres, et cliquez sur les éventuels boutons "mettre à jour les schémas de bases".</p>
<h2>ActiveSync</h2>
<h3>Activation d'activeSync</h3>
<p>Un petit tour dans les paramétrages de horde.
<a href="https://blog-du-grouik.tinad.fr/public/horde5/active-sync.jpeg" title="active-sync.jpeg"><img src="https://blog-du-grouik.tinad.fr/public/horde5/.active-sync_m.jpg" alt="active-sync.jpeg" style="display:block; margin:0 auto;" title="active-sync.jpeg, nov. 2012" /></a></p>
<h3>Apache - Redirection</h3>
<p>Dans le fichier de configuration du vhost, ajoutez un alias. Entre les balises <VirtualHost *:443> et</VirtualHost> ajoutez la ligne suivante en adaptant en fonction du chemin de votre installation.</p>
<pre class="brush: bash">Alias /Microsoft-Server-ActiveSync /var/www/mail2.vhost-https/webmail/rpc.php</pre>
<p>Rechargez la configuration Apache:</p>
<pre class="brush: bash">/etc/init.d/apache2 reload</pre>
<h3>Sur mon android</h3>
<h4>Parametres comptes et synchronisation, Bouton "ajouter un compte"</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-38-26.jpg" alt="2012-11-29_10-38-26.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-38-26.jpg, nov. 2012" /></p>
<h4>Un compte Exchange active sync</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-38-34.jpg" alt="2012-11-29_10-38-34.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-38-34.jpg, nov. 2012" /></p>
<h4>Mon e-mail et son mot de passe</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-39-08.jpg" alt="2012-11-29_10-39-08.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-39-08.jpg, nov. 2012" /></p>
<ul>
<li>l'adresse e-mail</li>
<li>le nom du serveur pleinement qualifié serveur.domaine.tld</li>
<li>le domaine qui peut etre laissé vide</li>
<li>le nom d'utilisateur, dans mon cas, c'est l'adresse e-mail complète</li>
<li>le mot de passe</li>
</ul>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-40-37.jpg" alt="2012-11-29_10-40-37.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-40-37.jpg, nov. 2012" /></p>
<h4>Il veut bien tout synchroniser</h4>
<p><img src="https://blog-du-grouik.tinad.fr/public/horde5/2012-11-29_10-42-42.jpg" alt="2012-11-29_10-42-42.jpg" style="display:block; margin:0 auto;" title="2012-11-29_10-42-42.jpg, nov. 2012" /></p>
<p>Trop cool! Merci à microsoft d'avoir créé ce protocole qui s'est imposé sur tous les smartphones, (et j'ai même essayé avec succès sur un macbook), même si je suis ravi d'avoir un équivalent d'un serveur exchange pour peanuts. Quelques heures de travail seulement.</p>horde reloadedurn:md5:e3d9dd787523867bf21ac2e31118db4a2010-05-09T23:25:00+02:002012-11-27T17:34:30+01:00gniearkGroupware webmaildebianhordeserveurTutoriel-mémozimbra <h2>Le contenu de ce billet est périmé, <a href="https://blog-du-grouik.tinad.fr/post/2012/11/25/horde-5">le tutoriel pour horde 5 est par là</a></h2>
<p>J'ai écrit il y a quelques mois un tutorial sur l'installation de horde. J'avoue, c'est à lui seul un bon tiers des visites sur ce blog.
Une petite mise à jour s'imposait, sauf que cette fois, je prends la webmail edition (moins de fonctionnalités mais assez simple à installer).</p>
<p>Cette "version" de horde vous conviendra si c'étaient les fonctions de webmail et d'agenda, pour le partage de fichier ou d'autres trucs plus proches d'un ERP, elle ne suffira pas. Attendez éventuellement la sortie de tinaderp :p</p>
<p>Autre petit point, pourquoi horde et pas zimbra? Le prix, et puis aussi que kronolith (l'agenda de horde) est synchronisable avec thunderbird ou outlook</p>
<p>Il est nécessaire d'avoir un acces ssh au serveur.
Un serveur IMAP configuré sur la machine.</p>
<p>tout au long de ce court tuto, hordepwd est le mot de passe mysql de l'user horde.</p>
<h3>Petit préalable pour ubuntu (edit 15/12/2010)</h3>
<p>Pour ubuntu en particulier, enfin, si vous avez le php en version 5.3, je vous invite à le passer en version 5.2. Une courte explication se trouve dans <a href="https://blog-du-grouik.tinad.fr/index.php?post/2010/12/15/Ubuntu-downgrader-php-5.3-en-5.2">ce billet</a>.</p>
<h3>Télecharger horde groupware webmail edition</h3>
<p>http://www.horde.org/download/app/?app=webmail</p>
<p>Envoyer tout sur le serveur dans un VHOST accessible en https!<sup>[<a href="https://blog-du-grouik.tinad.fr/post/2010/05/09/horde-reloaded#pnote-571-1" id="rev-pnote-571-1">1</a>]</sup></p>
<h3>Premiers paramétrages du bouzin</h3>
<p>bien évidemment changez le chemin par ce qui vous plait</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">www:<span style="color: #666666; font-style: italic;"># cd /var/www/www.tinad.fr/horde/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">www:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>www.tinad.fr<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #666666; font-style: italic;"># php scripts/setup.php</span></div></li></ol></pre>
<p>Il vous dit que php est une commande introuvable, installez le:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-cli</div></li></ol></pre>
<p>Il va poser des questions:</p>
<pre>
What is the web root path on your web server for this installation,
i.e. the path of the address you use to access Horde Groupware Webmail Edition in your browser? [/horde]
</pre>
<p>bah c'est justement horde dans mon cas</p>
<pre>
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice:
</pre>
<p>bah on va les faire dans l'ordre et ce qui est cool c'est qu'il propose de créer lui même la base.</p>
<pre>
Type your choice: 1
What database backend should we use? [false]
(false) [None]
(dbase) dBase
(ibase) Firebird/InterBase
(fbsql) Frontbase
(ifx) Informix
(msql) mSQL
(mssql) MS SQL Server
(mysql) MySQL
(mysqli) MySQL (mysqli)
(oci8) Oracle
(odbc) ODBC
(pgsql) PostgreSQL
(sqlite) SQLite
(sybase) Sybase
Type your choice: mysql
Request persistent connections? [0]
(1) Yes
(0) No
Type your choice:
Username to connect to the database as* [] horde
Password to connect with [] hordepwd
How should we connect to the database? [unix]
(unix) UNIX Sockets
(tcp) TCP/IP
Type your choice: tcp
Database server/host* [] localhost
Port the DB is running on, if non-standard [3306]
Database name to use* [] horde
Internally used charset* [utf-8]
Use SSL to connect to the server? [0]
(1) Yes
(0) No
Type your choice:
Certification Authority to use for SSL connections []
Split reads to a different server? [false]
(false) Disabled
(true) Enabled
Type your choice:
Writing main configuration file
Done configuring database settings.
</pre>
<p>creer la base:</p>
<pre>
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 2
Should we create the database for you? If yes, you need to provide a database
user that has permissions to create new databases on your system. If no, we
will only create the database tables for you. [y]
(y) Yes
(n) No
Type your choice: y
Database superuser for creating the database if necessary for your database system: root
Specify a password for the database user: *******
Loading database module...
Creating database...
[ OK ] Successfully created the database.
[ OK ] Successfully created the tables for Mail (imp).
[ OK ] Successfully created the tables for Filters (ingo).
[ OK ] Successfully created the tables for Address Book (turba).
[ OK ] Successfully created the tables for Calendar (kronolith).
[ OK ] Successfully created the tables for Tasks (nag).
[ OK ] Successfully created the tables for Notes (mnemo).
Should we build the database with METAR weather stations now? This is necessary if you want to display METAR weather information. Building the database requires a network connection. [y]
(y) Yes
(n) No
Type your choice: y
Creating METAR database...
Warning: require_once(DB.php): failed to open stream: No such file or directory in /var/www/www.tinad.fr/horde/pear/data/Services_Weather/buildMetarDB.php on line 60
Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/www.tinad.fr/horde/pear/data/Services_Weather/buildMetarDB.php on line 60
Warning: require_once(DB.php): failed to open stream: No such file or directory in /var/www/www.tinad.fr/horde/pear/data/Services_Weather/buildMetarDB.php on line 60
Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/www.tinad.fr/horde/pear/data/Services_Weather/buildMetarDB.php on line 60
Done creating database.
</pre>
<p>zut fais chier, tant pis y'aura pas la météo</p>
<pre>
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 3
Specify an existing mail user who you want to give administrator permissions (optional): *****@tinad.fr
Writing main configuration file
Done configuring administrator settings.
</pre>
<p>4 rien à faire:</p>
<pre>
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 4
Updating PEAR commands...
Updating PEAR configuration...
Updating PEAR packages...
Updated 1 files.
Done updating PEAR location.
</pre>
<p>0 exit</p>
<p>test:
<img src="https://blog-du-grouik.tinad.fr/public/horde2/.Capture-3_m.jpg" alt="Capture-3.png" style="display:block; margin:0 auto;" title="Capture-3.png, mai 2010" /></p>
<p>erf, il a pas créé l'user
une petite requete sql et ce sera réglé:</p>
<pre>
GRANT ALL ON horde . * TO 'horde'@'localhost' IDENTIFIED BY 'hordepwd'
</pre>
<p>on reteste:
<img src="https://blog-du-grouik.tinad.fr/public/horde2/.Capture-4_m.jpg" alt="Capture-4.png" style="display:block; margin:0 auto;" title="Capture-4.png, mai 2010" />
c'est mieux, mais d'un coup on se sent tout con:
On a défini l'administrateur, mais pas son mot de passe!</p>
<p>De plus S'il vous sort ça apres la tentative d'authentification:</p>
<h1>Une erreur fatale s'est produite</h1><h3>Auth_imp : extension requise IMAP non trouvée.</h3><h3>Les détails ont été consignés pour l'administrateur.</h3>
<p>il suffit d'installer le paquet php5-imap</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-imap</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</div></li></ol></pre>
<p>Vous avez donc compris, il fera l'authentification sur le serveur imap
Supprimez eventuellement vos cookies si ça marche toujours pas et:
wahoo! trop bien!
<img src="https://blog-du-grouik.tinad.fr/public/horde2/.Capture-5_m.jpg" alt="Capture-5.jpg" style="display:block; margin:0 auto;" title="Capture-5.jpg, mai 2010" /></p>
<div class="footnotes"><h4>Note</h4>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2010/05/09/horde-reloaded#rev-pnote-571-1" id="pnote-571-1">1</a>] Cette version de horde semble marcher en http... mais bon, un webmail est un des rares sites qui doit absolument être crypté, car c'est fréquent d'avoir des mots de passe qui vont être communiqués par mail.</p></div>
MDB2 Error: no such field Upgrade de Kronolithurn:md5:337731e8d454d6214884934f954731592009-06-22T23:39:00+02:002010-07-21T21:48:31+02:00gniearkGroupware webmailhorde <p>Suite à l'upgrade de Kronolith vers la version 2.3, la création d'un nouvel agenda sortait en erreur: <em>MDB2 Error: no such field.</em></p>
<p>Et comme souvent c'est une fois à tête reposée chez moi que j'ai pris le temps de remettre en place les logs de Horde pour trouver.</p>
<p>Il faut changer le nom de la colonne 'sequence' en 'id' dans la table kronolith_shares_seq</p>Upgrader Hordeurn:md5:58ef3b54bf7555103bb4d3bf600a23ba2009-06-21T20:36:00+02:002010-07-21T21:48:39+02:00gniearkGroupware webmailhorde <p>Les infos de ce billet ont été ajoutées au<a "href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project"> tuto sur l'installation de Horde</a></p>
<h3>déplacer la version actuelle de Horde.</h3>
<pre class="bash"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3.old</pre>
<h3>Installer la nouvelle version.</h3>
<p>On la trouvera <a href="http://www.horde.org/download/app/?app=horde" hreflang="en">là</a>
A la date de rédaction de ce billet, c'est la 3.3.4</p>
<pre class="bash"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #808080; font-style: italic;">#télécharger:</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #c20cb9; font-weight: bold;">ftp</span>.horde.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000;">-3.3</span><span style="color: #000000;">.4</span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #808080; font-style: italic;">#Décompresser:</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> -xzvf horde<span style="color: #000000;">-3.3</span><span style="color: #000000;">.4</span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #808080; font-style: italic;">#Pousser le dossier au bon endroit</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> horde<span style="color: #000000;">-3.3</span><span style="color: #000000;">.4</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3</pre>
<h3>Récupérer les modules et les fichiers de config de l'ancienne version.</h3>
<p>Pour les modules (j'entends par là IMP Kronolith etc...) il suffit de pousser les répertoires dans le nouveau de horde. Pour les fichiers de config, idem, mais il y aura peut etre une upgrade à effectuer.</p>
<pre class="bash"><span style="color: #808080; font-style: italic;">#les fichiers de conf</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>registry.php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>registry.php
<span style="color: #808080; font-style: italic;">#les modules</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share
<span style="color: #c20cb9; font-weight: bold;">cp</span> -R horde3.old<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span> horde3<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> -R horde3.old<span style="color: #000000; font-weight: bold;">/</span>imp horde3<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> -R horde3.old<span style="color: #000000; font-weight: bold;">/</span>gollem horde3<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> -R horde3.old<span style="color: #000000; font-weight: bold;">/</span>kronolith horde3<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> -R horde3.old<span style="color: #000000; font-weight: bold;">/</span>mnemo horde3<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> -R horde3.old<span style="color: #000000; font-weight: bold;">/</span>ingo horde3<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> -R horde3.old<span style="color: #000000; font-weight: bold;">/</span>turba horde3<span style="color: #000000; font-weight: bold;">/</span></pre>
<h3>Upgrade des bases de données et des fichiers de conf:</h3>
<p>Pour chaque upgrade la procédure est donnée<a href="http://www.horde.org/horde/docs/?f=UPGRADING.html" hreflang="en"> là</a></p>
<p>Pour cette version, j'exécute simplement le script.</p>
<pre class="bash">php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>upgrades<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2008</span><span style="color: #000000;">-08</span>-29_fix_mdb2_sequences.php</pre>
<h2>Upgrade IMP Kronolith...</h2>
<p>Le principe est le même, juste qu'on n'aura pas à pousser les modules.
Zieuter dans la docs/UPGRADING du module.</p>
<p>Pour IMP par exemple <a href="http://www.horde.org/imp/docs/?f=UPGRADING.html" hreflang="en">http://www.horde.org/imp/docs/?f=UPGRADING.html</a></p>
<p>Exemple pour IMP:</p>
<pre class="bash"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3
<span style="color: #c20cb9; font-weight: bold;">mv</span> imp imp.old
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #c20cb9; font-weight: bold;">ftp</span>.horde.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>imp<span style="color: #000000; font-weight: bold;">/</span>imp-h3<span style="color: #000000;">-4.3</span><span style="color: #000000;">.4</span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> -xzvf imp-h3<span style="color: #000000;">-4.3</span><span style="color: #000000;">.4</span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #c20cb9; font-weight: bold;">mv</span> imp-h3<span style="color: #000000;">-4.3</span><span style="color: #000000;">.4</span> imp
<span style="color: #c20cb9; font-weight: bold;">rm</span> imp-h3<span style="color: #000000;">-4.3</span><span style="color: #000000;">.4</span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>servers.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>prefs.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>mime_drivers.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span></pre>
<h2>sécuriser l'installation</h2>
<p>Il suffit d'éxécuter ce script:</p>
<pre class="bash"><span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>set_perms.<span style="color: #c20cb9; font-weight: bold;">sh</span></pre>Synchroniser kronolith (l'agenda de Horde) et Lightning (l'agenda de thunderbird)urn:md5:09931269f2bafe8002b03dda2b3593e92009-06-07T21:19:00+02:002010-07-21T21:49:07+02:00gniearkGroupware webmailhordeLogiciel-libreserveur <p>Les informations de ce billet ont été ajoutées au billet sur l'<a "href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project">installation de Horde.</a></p>
<h4>Permettre la synchronisation du calendrier avec lightning</h4>
<p>On installe webdav:</p>
<pre class="bash">pear <span style="color: #c20cb9; font-weight: bold;">install</span> HTTP_WebDAV_Server-beta</pre>
<p>Ouvrez votre agenda dans horde et cliquez sur le point d'exclamation à coté de "|X|agenda de votre@mail.fr"
<a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/kronolithsynchro.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.kronolithsynchro_m.jpg" alt="kronolithsynchro.png" style="display:block; margin:0 auto;" title="kronolithsynchro.png, juin 2009" /></a></p>
<p>Sélectionnez et copiez l'adresse donnée.</p>
<p>Dans Thunderbird lightning.
(Ne faites pas attention je suis sur une ubuntu 64 bits tout de suite, le lightning pour 64 bits que j'ai installé est le premier que j'ai trouvé... en anglais)</p>
<p>Calendrier -> nouveau calendrier -> sur internet -> icalendar-> Copiez la location indiquée précédemment.
Il devrait vous demander vos identifiants... éventuellement raffraichissez les agendas pour voir apparaitre vos évènements.</p>
<p><a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/lightning.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.lightning_m.jpg" alt="lightning.png" style="display:block; margin:0 auto;" title="lightning.png, juin 2009" /></a></p>Horde Projecturn:md5:75a5ac18f92b438b50b62fde27d5c8a42009-06-02T01:34:00+02:002011-02-17T01:45:36+01:00gniearkGroupware webmailhordeLogiciel-librePHPserveur <p><strong>EDIT: J'ai mis à jour ce tutoriel là <a href="https://blog-du-grouik.tinad.fr/index.php?post/2010/05/09/horde-reloaded" hreflang="fr">http://blog-du-grouik.tinad.fr/index.php?post/2010/05/09/horde-reloaded</a> Je garde cependant ce billet car la methode d'installation est un peu différente et qu'il détaille le paramétrage des clients.</strong></p>
<p>C'est le dernier test de groupware.</p>
<p>Un des gros avantage de HORDE est de pouvoir déléguer l'authentification au serveur IMAP. <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#pnote-305-1" id="rev-pnote-305-1">1</a>]</sup></p>
<p>Il est bien documenté (en anglais, par contre), très modulable sans demander non plus des mois de recherche pour le faire fonctionner.
Pour les abonnés Freebox, vous reconnaitrez le webmail IMP.</p>
<h2>Prérequis</h2>
<p>Comme d'hab... Je fais l'installation sur une débian 5.</p>
<ul>
<li>Un système de mail IMAP complet est installé. J'ai fait le choix de suivre le très complet tutoriel de starbridge Corp. <a href="http://www.starbridge.org/spip/spip.php?article12" hreflang="fr">Voila le tutoriel</a> et mon script pour un déploiement plus rapide: <a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/Scriptinstallmail.bash">Scriptinstallmail.bash Ajout suite test en production: il manque des éléments au script, quelques erreurs de typo et ne fonctionne pas si amavis est déja présent.</a> <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#pnote-305-2" id="rev-pnote-305-2">2</a>]</sup>. Je conseille, cependant, même si ça prend 4 à 5 heures de suivre le tuto à la main <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#pnote-305-3" id="rev-pnote-305-3">3</a>]</sup>, de ne pas utiliser ce script, ne serait-ce que pour comprendre comment ça marche.</li>
<li>De la patience on installe ici les modules les uns après les autres.</li>
</ul>
<h2>Installation</h2>
<h3>Documentation utilisée</h3>
<p>Bien que pour le serveur IMAP j'ai utilisé aveuglément le tuto de starbridge, Pour horde, je ne suis pas <a href="http://www.starbridge.org/spip/spip.php?article35" hreflang="fr">ce tutoriel.</a>, Mais je m'en sers, il propose des solutions intéressantes. Je préfère cependant installer les paquets de horde de la distribution Debian.
Ça permet entre autre d'avoir les fichiers de configuration dans le repertoire /etc de la distribution.</p>
<ul>
<li><a href="http://wiki.debian.org/Horde" hreflang="en">le wiki Horde sur débian</a></li>
<li><a href="http://ubuntu.no.sapo.pt/horde3_eng.html" hreflang="es">Ce tuto tres court pour ubuntu m'a débloqué en montrant des screenshoots</a></li>
</ul>
<h3>installation Horde</h3>
<h4>Installer l'élément principal:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> horde3</div></li></ol></pre>
<h4>Configurer le serveur http:</h4>
<p>On ajoute les lignes suivantes dans le fichier /etc/apache2/sites-available/ssl</p>
<pre>juste après le bloc <directory /> </directory> du repertoire /var/www</pre>
<pre>[html]
Alias /horde3 /usr/share/horde3
<Directory /usr/share/horde3>
Options FollowSymLinks
AllowOverride Limit
Order allow,deny
allow from all
</Directory>
<Files ~ "\.(inc|bak)$">
deny from all
</Files>
</pre>
<p>Redémarrer Apache et connecter sur le serveur en https (dans mon cas
https://192.168.0.8/horde3)</p>
<p><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.hordefail_m.jpg" alt="hordefail.png" style="display:block; margin:0 auto;" title="hordefail.png, juin 2009" /></p>
<p>Par défaut il n'y a pas d'authentification sur horde, d'où cet avertissement. Ce sera vite corrigé, mais si vous souhaitez être prudent (parano?) une petite règle IPtables pour limiter l'acces au serveur le temps de la configuration...</p>
<p>Dans le fichier /etc/horde/horde3/conf.php, supprimer les lignes 2 et 3 qui bloquent l'acces à horde.</p>
<p>tentez de vous connecter à nouveau... c'est bien vide :D
<img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.horde0_m.jpg" alt="horde0.png" style="display:block; margin:0 auto;" title="horde0.png, juin 2009" /></p>
<h4>Permettre (temporairement) la modification des fichiers de configuration:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li></ol></pre>
<h4>Créer la base de données:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">gunzip</span> <span style="color: #000000; font-weight: bold;"><</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>examples<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>sql<span style="color: #000000; font-weight: bold;">/</span>create.mysql.sql.gz <span style="color: #000000; font-weight: bold;">|</span> mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span></div></li></ol></pre>
<p>Il a créé la base, mais aussi l'utilisateur "horde" ayant pour mot de passe "horde"...
Changeons-y le mot de passe:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">horde:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># mysql -u root -p</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Enter password: </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mysql<span style="color: #000000; font-weight: bold;">></span> SET PASSWORD FOR <span style="color: #ff0000;">'horde'</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">'localhost'</span> = PASSWORD<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #ff0000;">'biscuit'</span><span style="color: #7a0874; font-weight: bold;">)</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Query OK, <span style="color: #000000;">0</span> rows affected <span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mysql<span style="color: #000000; font-weight: bold;">></span> quit</div></li></ol></pre>
<h4>Renseigner les paramètres de bases de données à horde:</h4>
<p>Administration >> configuration >> horde>> l'onglet database</p>
<p>$conf[sql][phptype] on sélectionne MySQL
et on y met les renseignements comme sur l'impression d'écran:
<a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/Hordeconf_database.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.Hordeconf_database_m.jpg" alt="Hordeconf_database.png" style="display:block; margin:0 auto;" title="Hordeconf_database.png, juin 2009" /></a>
puis cliquer sur "Générer la configuration de Horde"</p>
<p>On ne s'occupe pas encore de la configuration de l'authentification, on la basera sur le webmail:</p>
<h3>Installer IMP, le webmail</h3>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> imp4</div></li></ol></pre>
<h4>permettre la modif des fichiers de configuration:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li></ol></pre>
<p>Générer les préférences:
administration>configuration>Courier(imp)
Pour le moment, je laisse tout par défaut, je me contente de cliquer sur "Générer la configuration de courrier"</p>
<p>On spécifie les paramètres du serveur mail dans le fichier /etc/horde/imp4/servers.php
Ce sera pareil pour les autres modules: Plusieurs exemples sont écrits dans le fichier, il faut supprimer ceux qui ne nous intéressent pas et renseigner les autres.
J'utilise l'exemple de starbrige pour celui là, en smtphost, je donne l'adresse IP externe pour que les utilisateurs n'aient pas de privilège pour le spam.</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$servers</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'_prompt'</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=></span> _<span style="color: #009900;">(</span><span style="color: #0000ff;">"Choose a mail server:"</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$servers</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'imap'</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'IMAP Server'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'server'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'horde.tinad.fr'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hordeauth'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'protocol'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'imap/notls'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'port'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">143</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'folders'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'namespace'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'INBOX.'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'maildomain'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'tinad.fr'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'smtphost'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'192.168.0.8'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'smtpport'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">25</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'realm'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'preferred'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'dotfiles'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'quota'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a> <span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'imap'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'params'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hierarchies'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li></ol></pre>
<h4>Activer IMP4</h4>
<p>Pour activer IMP4:
on édite /etc/horde/horde3/registry.php
et dans le tableau de variables $this->applications['imp'] on change la variable status ainsi: 'status' => 'active',
Ce sera la même méthode pour les autres modules.</p>
<h4>Modifier l'authentification de horde</h4>
<p>administration > configuration > horde > onglet authentification.
on change:</p>
<ul>
<li>conf[auth][admins] Ce sera l'administrateur, on met un compte mail valide (dans mon cas "admin@tinad.fr", mais dans unet autre configuration du serveur mail ça pourrait être juste "admin"</li>
<li>$conf[auth][driver] pour mettre "Let a Horde application Handle authentification."</li>
<li>$conf[auth][params][app] on sélectionne "imp".</li>
</ul>
<p><a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/hordeAuth.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.hordeAuth_m.jpg" alt="hordeAuth.png" style="display:block; margin:0 auto;" title="hordeAuth.png, juin 2009" /></a></p>
<p>Lorsqu'on enregistre on tombe sur forbidden. C'est normal, on n'est plus identifié comme il faut => déconnection, on se reconnecte avec l'adresse email et le mot de passe mis en administrateur précédemment.</p>
<p>Si a ce stade vous vous êtes planté et qu'il n'est pas possible de s'identifier,
vous pouvez restaurer la configuration précédente comme ceci:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php.raté</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li></ol></pre>
<h3>Ingo</h3>
<p>C'est le systeme de filtres.
Un prérequis est la possibilité pour les utilisateur d'avoir une méthode pour que les utilisateurs puissent écrire dans leurs dossiers.
<a href="http://www.starbridge.org/spip/spip.php?article35" hreflang="fr">On applique la méthode de tonio sur starbridge:</a> , avec pureftpd</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> pure-ftpd-mysql</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">update-inetd <span style="color: #660033;">--disable</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span></div></li></ol></pre>
<p>On va changer le fichier de configuration mysql:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pure-ftpd<span style="color: #000000; font-weight: bold;">/</span>db<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> mysql.conf mysql.conf.old</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>blog-du-grouik.tinad.fr<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>MailCompletHorde<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>mysql.conf</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">'s/toto/MettezLeMotDePasseMysqlDePostfix/g'</span> mysql.conf</div></li></ol></pre>
<p>Dans le fichier /etc/default/pure-ftpd-common
changez STANDALONE_OR_INETD=standalone</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>pure-ftpd-mysql restart</div></li></ol></pre>
<h4>on installe ingo:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ingo1</div></li></ol></pre>
<p>on change le backends.php (/usr/share/horde3/ingo/config/backends.php
)par:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$backends</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'maildrop'</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'vfs'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'preferred'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hordeauth'</span> <span style="color: #339933;">=></span> full<span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'params'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Hostname of the VFS server</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hostspec'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'127.0.0.1'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Name of the maildrop config file to write</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'filename'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'.mailfilter'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Port of the VFS server</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'port'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">21</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The VFS driver to use</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'vfstype'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'ftp'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Specify permissions for uploaded files if necessary:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'file_perms'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'0600'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The VFS username to use, defaults to current user</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'username' => 'user',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The VFS password to use, defaults to current user's password</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'password' => 'secret',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The path to the .mailfilter filter file, defaults to the current</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// user's home directory.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// You can use the following variables:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// %u = name of the current user</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// %U = the 'username' from above</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Example:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// '/data/maildrop/filters/%u/'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// This would be translated into:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// '/data/maildrop/filters/<logged_in_username>/.mailfilter'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'vfs_path' => '/home/virtual/%u/',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'script'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'maildrop'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'scriptparams'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// What path style does the IMAP server use ['mbox'|'maildir']?</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'path_style'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'maildir'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Strip 'INBOX.' from the beginning of folder names in generated</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// scripts?</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'strip_inbox'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// An array of variables to append to every generated script.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Use if you need to set up specific environment variables.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'variables'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Example for the $PATH variable</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'PATH' => '/usr/bin'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li></ol></pre>
<p>on connait la musique:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>ingo<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>ingo<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>ingo<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li></ol></pre>
<p>on génère la configuration
<a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/hordeconfingo.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.hordeconfingo_m.jpg" alt="hordeconfingo.png" style="display:block; margin:0 auto;" title="hordeconfingo.png, juin 2009" /></a></p>
<p>on active ingo dans le fichier /etc/horde/horde3/registry.php (comme tout à l'heure).</p>
<h3>Turba</h3>
<p>C'est le carnet d'adresses.</p>
<h4>Installer</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> turba2</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>turba2<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>turba2<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>turba2<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li></ol></pre>
<h4>Générer la configuration (tout par défaut)
configurer le backend de turba /etc/horde/turba2/sources.php</h4>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$cfgSources</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'localsql'</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=></span> _<span style="color: #009900;">(</span><span style="color: #0000ff;">"My Address Book"</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'type'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'sql'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The default connection details are pulled from the Horde-wide SQL</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// connection configuration.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'params'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array_merge"><span style="color: #990000;">array_merge</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'conf'</span><span style="color: #009900;">]</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'sql'</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'table'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'turba_objects'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Using two tables as datasource.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'params' => array_merge($GLOBALS['conf']['sql'],</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// array('table' => 'leaddetails LEFT JOIN leadaddress ON leaddetails.leadid = leadaddress.leadaddressid',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'filter' => 'leaddetails.converted = 0')),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'map'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'__key'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_id'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'__owner'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'owner_id'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'__type'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_type'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'__members'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_members'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'__uid'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_uid'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'firstname'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_firstname'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'lastname'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_lastname'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'middlenames'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_middlenames'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'namePrefix'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_nameprefix'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'nameSuffix'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_namesuffix'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'fields'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'namePrefix'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'firstname'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'middlenames'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'lastname'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'nameSuffix'</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'format'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'%s %s %s %s %s'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'parse'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'fields'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'firstname'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'middlenames'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'lastname'</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'format'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'%s %s %s'</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'fields'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'firstname'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'lastname'</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'format'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'%s %s'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// This is a shorter version of a "name" composite field which only</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// consists of the first name and last name.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'name' => array('fields' => array('firstname', 'lastname'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'format' => '%s %s'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'alias'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_alias'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'birthday'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_bday'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'homeStreet'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_homestreet'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'homePOBox'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_homepob'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'homeCity'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_homecity'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'homeProvince'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_homeprovince'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'homePostalCode'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_homepostalcode'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'homeCountry'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'object_homecountry'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// This is an example composite field for addresses, so you can display</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// the various map links. If you use this, be sure to add 'homeAddress'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// to the 'tabs' parameter below.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//'homeAddress' => array('fields' => array('homeStreet', 'homeCity',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'homeProvince',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'homePostalCode'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'format' => "%s </span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #339933;">%</span>s<span style="color: #339933;">,</span> <span style="color: #339933;">%</span>s <span style="color: #339933;">%</span>s<span style="color: #0000ff;">"),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workStreet' => 'object_workstreet',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workPOBox' => 'object_workpob',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workCity' => 'object_workcity',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workProvince' => 'object_workprovince',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workPostalCode' => 'object_workpostalcode',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workCountry' => 'object_workcountry',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'timezone' => 'object_tz',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'email' => 'object_email',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'homePhone' => 'object_homephone',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workPhone' => 'object_workphone',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'cellPhone' => 'object_cellphone',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'fax' => 'object_fax',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'pager' => 'object_pager',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'title' => 'object_title',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'role' => 'object_role',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'company' => 'object_company',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'category' => 'object_category',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'notes' => 'object_notes',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'website' => 'object_url',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'freebusyUrl' => 'object_freebusyurl',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'pgpPublicKey' => 'object_pgppublickey',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'smimePublicKey' => 'object_smimepublickey',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> ),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'tabs' => array(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> _("</span>Personal<span style="color: #0000ff;">") => array('firstname', 'lastname', 'middlenames',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'namePrefix', 'nameSuffix', 'name', 'alias',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'birthday'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> _("</span>Location<span style="color: #0000ff;">") => array('homeStreet', 'homePOBox', 'homeCity',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'homeProvince', 'homePostalCode', 'homeCountry',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workStreet', 'workPOBox', 'workCity',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'workProvince', 'workPostalCode', 'workCountry',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'timezone'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> _("</span>Communications<span style="color: #0000ff;">") => array('email', 'homePhone', 'workPhone',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'cellPhone', 'fax', 'pager'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> _("</span>Organization<span style="color: #0000ff;">") => array('title', 'role', 'company'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> _("</span>Other<span style="color: #0000ff;">") => array('category', 'notes', 'website', 'freebusyUrl',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'pgpPublicKey', 'smimePublicKey'),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> ),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'search' => array(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'name',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'email'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> ),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'strict' => array(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'object_id',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'owner_id',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'object_type',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> ),</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'export' => true,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'browse' => true,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'use_shares' => true,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;"> 'list_name_field' => 'lastname',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">);</span></div></li></ol></pre>
<h4>Créer la table dans la base de données:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> horde <span style="color: #000000; font-weight: bold;"><</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>turba2<span style="color: #000000; font-weight: bold;">/</span>examples<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>sql<span style="color: #000000; font-weight: bold;">/</span>turba.sql</div></li></ol></pre>
<h4>On active turba:</h4>
<p>Comme d'hab, dans le fichier /etc/horde/horde3/registry.php</p>
<h3>Kronolith</h3>
<p>C'est le calendrier</p>
<h4>Installation:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> kronolith2</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>kronolith2<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>kronolith2<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>kronolith2<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li></ol></pre>
<h4>Générer la configuratiion</h4>
<p><a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/hordeconfagenda.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.hordeconfagenda_m.jpg" alt="hordeconfagenda.png" style="display:block; margin:0 auto;" title="hordeconfagenda.png, juin 2009" /></a></p>
<h4>La table dans la base de données</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> horde <span style="color: #000000; font-weight: bold;"><</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>kronolith2<span style="color: #000000; font-weight: bold;">/</span>examples<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>sql<span style="color: #000000; font-weight: bold;">/</span>kronolith.mysql.sql</div></li></ol></pre>
<h4>Activer Kronolith</h4>
<p>dans le fichier /etc/horde/horde3/registry.php</p>
<h4>Permettre la synchronisation du calendrier avec lightning</h4>
<p>On installe webdav:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">pear <span style="color: #c20cb9; font-weight: bold;">install</span> HTTP_WebDAV_Server-beta</div></li></ol></pre>
<p>Ouvrez votre agenda dans horde et cliquez sur le point d'exclamation à coté de "|X|agenda de votre@mail.fr"
<a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/kronolithsynchro.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.kronolithsynchro_m.jpg" alt="kronolithsynchro.png" style="display:block; margin:0 auto;" title="kronolithsynchro.png, juin 2009" /></a></p>
<p>Sélectionnez et copiez l'adresse donnée.</p>
<p>Dans Thunderbird lightning.
(Ne faites pas attention je suis sur une ubuntu 64 bits tout de suite, le lightning pour 64 bits que j'ai installé est le premier que j'ai trouvé... en anglais)</p>
<p>Calendrier -> nouveau calendrier -> sur internet -> icalendar-> Copiez la location indiquée précédemment.
Il devrait vous demander vos identifiants... éventuellement raffraichissez les agendas pour voir apparaitre vos évènements.</p>
<p><a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/lightning.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.lightning_m.jpg" alt="lightning.png" style="display:block; margin:0 auto;" title="lightning.png, juin 2009" /></a></p>
<h3>Gollem un gestionnaire de fichiers</h3>
<h4>installer</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> gollem</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>gollem<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>gollem<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>gollem<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li></ol></pre>
<h4>le backends</h4>
<p>/etc/horde/gollem/backends.php
Je choisis le ftp avec les crédentials de horde. (ça tombe bien pour ingo, on a prévu le truc), par contre, on ne met pas les users directement dans leur dossier qui contient le maildir. direction un dossier ftp 'home' => '/home/virtual/%u/ftp',
ça demande une authentification... pas bien génant, je m'y pencherai plus tard (je vous l'ai écrit que je fatiguais)</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// This backend uses Horde credentials to automatically log in.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$backends</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'hordeftp'</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'FTP Server'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'ftp'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'preferred'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hordeauth'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'params'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The hostname/IP Address of the FTP server.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hostspec'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'127.0.0.1'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The port number of the FTP server.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'port'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">21</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Use passive mode?</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'pasv'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Set timeout (in seconds) for the FTP server. Default: 90 seconds</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'timeout' => 90,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// If true and the POSIX extension is available the driver will map</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// the user and group IDs returned from the FTP server with the local</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// IDs from the local password file. This is useful only if the FTP</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// server is running on localhost or if the local user/group</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// IDs are identical to the remote FTP server.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// You must be running a version of Horde >= 3.1 for this parameter to</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// have any effect.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'maplocalids' => true,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// The default permissions to set for newly created folders and files.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'permissions' => '750'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'loginparams'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Allow the user to change the FTP server.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'hostspec' => 'Hostname',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// Allow the user to change the FTP port.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'port' => 'Port'</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'root' => '',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'home'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'/home/virtual/%u/ftp'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'createhome'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'filter' => '^regex$',</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// 'quota' => false,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'clipboard'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'attributes'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'type'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'download'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'modified'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'size'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'permission'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'owner'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'group'</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li></ol></pre>
<h4>Puis le générer et l'activer</h4>
<p>Comme d'hab, je fatique là...</p>
<h3>Nag, un gestionnaire de tâches.</h3>
<h4>Installer:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> nag2</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>nag2<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>nag2<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>nag2<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li></ol></pre>
<h4>Générer la configuration</h4>
<p>(sql driver)</p>
<h4>La table dans la base horde</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> horde <span style="color: #000000; font-weight: bold;"><</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>nag2<span style="color: #000000; font-weight: bold;">/</span>examples<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>sql<span style="color: #000000; font-weight: bold;">/</span>nag.sql</div></li></ol></pre>
<h4>L'activer</h4>
<p>dans le fichier /etc/horde/horde3/registry.php</p>
<h3>Mnemo</h3>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mnemo2</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>mnemo<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>mnemo<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>mnemo<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li></ol></pre>
<h4>la base de données:</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> horde <span style="color: #000000; font-weight: bold;"><</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>mnemo2<span style="color: #000000; font-weight: bold;">/</span>examples<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>sql<span style="color: #000000; font-weight: bold;">/</span>mnemo.sql</div></li></ol></pre>
<h4>Le générer et l'activer</h4>
<p>et là il y a un bug
''PHP Fatal error: Class 'DB' not found in
/usr/share/horde3/mnemo/lib/Driver/sql.php on line 98.''
(j'ai pas mis le toute dernière version)
Pour le corriger, dans le fichier incriminé, ajoutez dans une ligne au dessus de la n°98: <em>require_once 'DB.php';</em><sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#pnote-305-4" id="rev-pnote-305-4">4</a>]</sup></p>
<h3>Passwd, Le module de changement de mot de passe.</h3>
<p>Là aussi , merci starbridge pour la solution.</p>
<h4>installation</h4>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> sork-passwd-h3</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>passwd<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>passwd<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>passwd<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>passwd<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.bak.php</div></li></ol></pre>
<h4>le backends /etc/horde/passwd3/backends.php</h4>
<p>pensez à changer le mot de passe</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$backends</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'sql'</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a> <span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'Horde'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'preferred'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'SELECTED'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'password policy'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">/* Ici vous definissez les regles d acceptation de mot de passe ( cf plus haut dans le fichier pour toutes les rules) */</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'minLength'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'maxLength'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'maxSpace'</span> <span style="color: #339933;">=></span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'sql'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'params'</span> <span style="color: #339933;">=></span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">(</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'phptype'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'mysql'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'hostspec'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'postfix'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'*****'</span><span style="color: #339933;">,</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'encryption'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'crypt-md5'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'database'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'postfix'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'table'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'mailbox'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'user_col'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'pass_col'</span> <span style="color: #339933;">=></span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0000ff;">'show_encryption'</span> <span style="color: #339933;">=></span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li></ol></pre>
<h4>Activer passwd</h4>
<p>Au moment du test, il y a eu un message d'erreur, mais ça a bien marché. (testé en imap et dans horde)</p>
<h2>Conclusion...</h2>
<p>C'est classe... un grand pas (nous sommes assez retardataires) vers la modernité... par le libre, Je sais je fatigue...
<a href="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/horde.png"><img src="https://blog-du-grouik.tinad.fr/public/MailCompletHorde/horde/.horde_m.jpg" alt="horde.png" style="display:block; margin:0 auto;" title="horde.png, juin 2009" /></a></p>
<p>Déploiement demain (je n'ai même pas pris le temps de tester l'arrivée de mails depuis l'extérieur).... on verra bien...</p>
<h2>2/06/2009:</h2>
<pre>arrrrrg!</pre>
<p>mon script à la con!!! Il lui manquait quelques trucs... et j'espérais qu'il écrase la configuration, mais les fichiers présents n'ont pas été remplacés... une erreur de typo sur un des fichiers de certificats....</p>
<p>Tout à l'heure quand j'ai enfin réouvert le port 25 et envoyé la commande mailq -q sur le Backup MX j'étais soulagé.... bon du coup, je n'ai pas encore installé horde.
Les comptes mails étaient des users unix par contre, le déplacement des boites s'est fait sans problème avec un petit script.</p>
<p>A suivre...</p>
<h2>Mettre à jour, Upgrader Horde</h2>
<h3>déplacer la version actuelle de Horde.</h3>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3.old</div></li></ol></pre>
<h3>Installer la nouvelle version.</h3>
<p>On la trouvera <a href="http://www.horde.org/download/app/?app=horde" hreflang="en">là</a>
A la date de rédaction de ce billet, c'est la 3.3.4</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#télécharger:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.horde.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>horde<span style="color: #000000; font-weight: bold;">/</span>horde-3.3.4.tar.gz</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#Décompresser:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> horde-3.3.4.tar.gz</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#Pousser le dossier au bon endroit</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> horde-3.3.4 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3</div></li></ol></pre>
<h3>Récupérer les modules et les fichiers de config de l'ancienne version.</h3>
<p>Pour les modules (j'entends par là IMP Kronolith etc...) il suffit de pousser les répertoires dans le nouveau de horde. Pour les fichiers de config, idem, mais il y aura peut etre une upgrade à effectuer.</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#les fichiers de conf</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>registry.php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>registry.php</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#les modules</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> horde3.old<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span> horde3<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> horde3.old<span style="color: #000000; font-weight: bold;">/</span>imp horde3<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> horde3.old<span style="color: #000000; font-weight: bold;">/</span>gollem horde3<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> horde3.old<span style="color: #000000; font-weight: bold;">/</span>kronolith horde3<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> horde3.old<span style="color: #000000; font-weight: bold;">/</span>mnemo horde3<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> horde3.old<span style="color: #000000; font-weight: bold;">/</span>ingo horde3<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> horde3.old<span style="color: #000000; font-weight: bold;">/</span>turba horde3<span style="color: #000000; font-weight: bold;">/</span></div></li></ol></pre>
<h3>Upgrade des bases de données et des fichiers de conf:</h3>
<p>Pour chaque upgrade la procédure est donnée<a href="http://www.horde.org/horde/docs/?f=UPGRADING.html" hreflang="en"> là</a></p>
<p>Pour cette version, j'exécute simplement le script.</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">php <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>upgrades<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2008</span>-08-<span style="color: #000000;">29</span>_fix_mdb2_sequences.php</div></li></ol></pre>
<h2>Upgrade IMP Kronolith...</h2>
<p>Le principe est le même, juste qu'on n'aura pas à pousser les modules.
Zieuter dans la docs/UPGRADING du module.</p>
<p>Pour IMP par exemple <a href="http://www.horde.org/imp/docs/?f=UPGRADING.html" hreflang="en">http://www.horde.org/imp/docs/?f=UPGRADING.html</a></p>
<p>Exemple pour IMP:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> imp imp.old</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.horde.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>imp<span style="color: #000000; font-weight: bold;">/</span>imp-h3-4.3.4.tar.gz</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> imp-h3-4.3.4.tar.gz </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">mv</span> imp-h3-4.3.4 imp</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">rm</span> imp-h3-4.3.4.tar.gz </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>conf.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>servers.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>prefs.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">cp</span> imp.old<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>mime_drivers.php imp<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span></div></li></ol></pre>
<h2>sécuriser l'installation</h2>
<p>Il suffit d'éxécuter ce script:</p>
<pre class="bash bash" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>horde3<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>set_perms.sh</div></li></ol></pre>
<div class="footnotes"><h4>Notes</h4>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#rev-pnote-305-1" id="pnote-305-1">1</a>] Open X change aussi sûrement</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#rev-pnote-305-2" id="pnote-305-2">2</a>] Licence Creative Commons http://creativecommons.org/licenses/by-sa/3.0/deed.fr</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#rev-pnote-305-3" id="pnote-305-3">3</a>] et plus de 400 MO de binaires à installer.</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/06/01/Horde-Project#rev-pnote-305-4" id="pnote-305-4">4</a>] http://bugs.horde.org/ticket/7648</p></div>
openXchangeurn:md5:e1df6a6e267aff8126ca1716957f40452009-05-29T00:38:00+02:002010-07-21T21:49:55+02:00gniearkGroupware webmailLogiciel-libreOXserveur <h1>12/08/2009 Avertissement, Ce billet est outdaté, (périmé?) Les dépots d'open X Change pour Lenny n'étant plus accessibles. </h1>
<p>Quelques liens:</p>
<ul>
<li><a href="http://www.open-xchange.com/wiki/index.php?title=Quick_install_guide_for_the_Server_Edition_Debian5" hreflang="fr">ce guide</a></li>
<li><a href="http://wiki.open-xchange.com/wiki/index.php?title=Open_Xchange_Installation" hreflang="fr">Celui ci</a></li>
</ul>
<h2>Pré requis</h2>
<ul>
<li>Une débian 5.0 installé, à jour.</li>
<li>Une connection internet</li>
</ul>
<h2>Installation d'Open-X-change</h2>
<p>Pour les essais, j'ai adapté un script. A tester sur une machine virtuelle, ça met à plat beaucoup de fichiers de configuration. Je ne suis pas allé jusqu'au bout, les mails ne passent pas.</p>
<p><code>#!/bin/bash<br /><br /># Fonction confirmation des paramètres entrés par l'utilisateur<br /><br />confirmer() {<br /> echo -e "\033[1;31m Voulez-vous continuer avec cette valeur : "$1" (o/N) \033[0;39m"<br /> read confirmation<br />}<br /><br /># Fonction permettant de demander confirmation pour continuer à <br />faire_une_pause() {<br /> echo -n "Continuer [O/n] ? "<br /> read lettre<br /> case $lettre in<br /> "n" | "N") exit 1;;<br /> *);;<br /> esac<br />}<br /><br />#Fonction pour télécharger un fichier de configuration<br />#Sauver l'original avec un .old<br />Change_fichier_de_config(){<br /> <br /> #Liste des parametres:<br /> # $1: url du fichier<br /> # $2: nom du fichier<br /> # $3: chemin du fichier de configuration<br /> <br /> cp $3/$2 $3/$2.old 2>/dev/null<br /> wget $1<br /> cp $2 $3/$2<br /> echo - Mise en place du nouveau fichier $3/$2 [OK]<br /><br />}<br /><br />############################## Variables #####################<br /><br /><br />export URL_DL="http://blog-du-grouik.tinad.fr/public/OpenXchange"<br />export DL_DIR=~/oxdl<br /><br />confirmation="n"<br />while [ "$confirmation" != "o" ]<br />do<br />echo "Entrez le nom du domaine (sous la forme domaine.fr) :"<br />read DOMAIN<br />confirmer $DOMAIN<br />done<br /><br />confirmation="n"<br />while [ "$confirmation" != "o" ]<br />do<br />echo "Entrez le mot de passe de l'utilisateur MysQl OPENXCHANGE) :"<br />read OPENXCHANGE_MYSQL_PWD<br />confirmer $OPENXCHANGE_MYSQL_PWD<br />done<br /><br /><br />confirmation="n"<br />while [ "$confirmation" != "o" ]<br />do<br />echo "Entrez le mot de passe OX_ADMIN_MASTER (le 'root' de OpenXchange) :"<br />read OX_ADMIN_MASTER_PASSWORD<br />confirmer $OX_ADMIN_MASTER_PASSWORD<br />done<br /><br />confirmation="n"<br />while [ "$confirmation" != "o" ]<br />do<br />echo "Entrez le mot de passe OX_ADMIN (l'administrateur de OpenXchange) :"<br />read OX_ADMIN_PASSWORD<br />confirmer $OX_ADMIN_PASSWORD<br />done<br /><br />mkdir -p $DL_DIR<br /><br />############################### INSTALLATION DES PAQUETS #######################<br /><br />echo Le fichier de configuration des sources de paquets sera sauvé dans /etc/apt/sources.list.old et sera remplacé.<br />faire_une_pause<br /><br />cp /etc/apt/sources.list /etc/apt/sources.list.old 2>/dev/null<br />echo "<br />#Les depots 'classiques':<br />deb http://ftp.fr.debian.org/debian/ lenny main<br />deb-src http://ftp.fr.debian.org/debian/ lenny main<br /><br />deb http://security.debian.org/ lenny/updates main<br />deb-src http://security.debian.org/ lenny/updates main<br /><br />deb http://volatile.debian.org/debian-volatile lenny/volatile main<br />deb-src http://volatile.debian.org/debian-volatile lenny/volatile main<br /><br />#debian non-free<br />deb http://ftp.fr.debian.org/debian/ lenny main contrib non-free<br />deb-src http://ftp.fr.debian.org/debian/ lenny main contrib non-free<br /><br />#Depot pour Open-X-change<br />deb http://download.opensuse.org/repositories/server:/OX:/ox6/DebianLenny/ /<br />" > /etc/apt/sources.list<br /><br />apt-get update<br /><br /># Basics<br />echo Installation des paquets.<br />echo Lors de l installation, Si les paquets sont déja présents, ce sera signalé, ça ne pose pas de problème.<br />echo Lors de l installation de Java, Vous devrez accepter la license.<br />echo Lors de l installation de postfix, Vous devrez choisir Internet Site et le domaine des mails.<br />echo Lors de l installation de MySql, choisissez le mot de passe root MysQl et souvenez vous en!<br />faire_une_pause<br /><br />apt-get install nano ssh wget sun-java5-bin sun-java5-jdk \<br />cyrus-imapd-2.2 cyrus-admin-2.2 sasl2-bin libsasl2-modules libpam-mysql \<br />libnss-mysql-bg \<br />postfix postfix-mysql \<br />cyrus-clients-2.2 \<br />mysql-server mysql-client \<br />mysql-server open-xchange-admin-client \<br />open-xchange-admin-doc open-xchange-admin-plugin-hosting-doc \<br />open-xchange-admin-plugin-hosting open-xchange-admin \<br />open-xchange-authentication-database open-xchange-cache \<br />open-xchange-charset open-xchange-common open-xchange-configjump-generic \<br />open-xchange-configread open-xchange-control \<br />open-xchange-data-conversion-ical4j \<br />open-xchange-conversion-engine open-xchange-conversion-servlet \<br />open-xchange-global open-xchange-group-managerequest open-xchange-gui \<br />open-xchange-i18n open-xchange-imap open-xchange-jcharset \<br />open-xchange-mailfilter \<br />open-xchange-management open-xchange-monitoring \<br />open-xchange-online-help-de \<br />open-xchange-online-help-en open-xchange-online-help-fr \<br />open-xchange-passwordchange-database open-xchange-passwordchange-servlet \<br />open-xchange-push-udp open-xchange-resource-managerequest \<br />open-xchange-server \<br />open-xchange-sessiond open-xchange-settings-extensions open-xchange-smtp \<br />open-xchange-spamhandler-default open-xchange \<br />open-xchange-contactcollector \<br />libapache2-mod-jk cyrus-nntpd-2.2<br /><br /><br />/etc/init.d/cyrus2.2 stop<br />/etc/init.d/saslauthd stop<br />/etc/init.d/postfix stop<br /><br />########################### CONFIGURATION DES PAQUETS INSTALLES <br /><br />echo Mise en place des fichiers de configuration. Les fichiers d origine seront copiés avec l extension .old<br />echo par exemple le fichier /etc/postfix/main.cf sera sauvé dans le fichier /etc/postfix/main.cf.old<br />faire_une_pause<br /><br />cd $DL_DIR<br />mkdir hyperion-install/<br />cd hyperion-install<br />mkdir configfiles/<br />cd configfiles<br /><br /># APACHE<br />echo Changement des fichiers de configuration d Apache<br />mkdir apache/<br />cd apache<br /><br />#Change_fichier_de_config $URL_DL/apache/default default <br />/etc/apache2/sites-available<br />awk '{gsub("oxadmin@example.com", "oxadmin@" "'"$DOMAIN"'", $0); print > FILENAME}' /etc/apache2/sites-available/default<br />Change_fichier_de_config $URL_DL/apache/ox.conf ox.conf /etc/apache2/conf.d<br />#Change_fichier_de_config $URL_DL/apache/workers.properties workers.properties /etc/apache2<br />echo "ServerName `hostname`.$DOMAIN" >> /etc/apache2/httpd.conf<br /><br />a2enmod proxy<br />a2enmod proxy_ajp<br />a2enmod expires<br />a2enmod deflate<br />a2enmod headers<br />a2enmod jk<br /><br /><br />echo "<br /><Proxy *><br />Order deny,allow<br />allow from all<br /></Proxy><br /><br />ProxyPass /axis2 ajp://127.0.0.1:8009/axis2 smax=0 ttl=60 retry=5<br />ProxyPass /ajax ajp://127.0.0.1:8009/ajax smax=0 ttl=60 retry=5<br />ProxyPass /servlet ajp://127.0.0.1:8009/servlet smax=0 ttl=60 retry=5<br />ProxyPass /infostore ajp://127.0.0.1:8009/infostore smax=0 ttl=60 retry=5<br />" > /etc/apache2/conf.d/proxy_ajp.conf<br /><br />sed -i "14G" /etc/apache2/sites-available/default<br />sed -i "14G" /etc/apache2/sites-available/default<br />#sed -i "15s/^/RedirectMatch \^\/\$ \/ox6/" /etc/apache2/sites-available/default<br />sed -i "s/<\/VirtualHost>//" /etc/apache2/sites-available/default<br /><br />echo 'ExpiresActive On<br />ExpiresByType image/gif "access plus 23 hours"<br />ExpiresByType image/png "access plus 23 hours"<br />ExpiresByType image/jpg "access plus 23 hours"<br />ExpiresByType image/jpeg "access plus 23 hours"<br />ExpiresByType text/javascript "access plus 23 hours"<br />ExpiresByType text/css "access plus 23 hours"<br />ExpiresByType text/html "access plus 23 hours"<br />ExpiresByType application/x-javascript "access plus 23 hours"<br /><Files ~ "\.(js|css|gif|jpe?g|png)$"><br />Header append Cache-Control "public"<br /></Files><br />DeflateFilterNote ratio<br />AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript<br />BrowserMatch ^Mozilla/4 gzip-only-text/html<br />BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html<br />Header append Vary User-Agent env=!dont-vary<br /></VirtualHost><br />' >> /etc/apache2/sites-available/default<br /><br /><br /><br /><br />#Cyrus<br />echo Changement des fichiers de configuration de Cyrus / Pam<br />mkdir $DL_DIR/hyperion-install/configfiles/cyrus<br />cd $DL_DIR/hyperion-install/configfiles/cyrus<br /><br />Change_fichier_de_config $URL_DL/cyrus/imap imap /etc/pam.d<br />cp /etc/pam.d/pop /etc/pam.d/pop.old 2>/dev/null<br />cp /etc/pam.d/sieve /etc/pam.d/sieve.old 2>/dev/null<br />cp /etc/pam.d/imap /etc/pam.d/pop<br />cp /etc/pam.d/imap /etc/pam.d/sieve<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/imap<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/pop<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/sieve<br /><br />Change_fichier_de_config $URL_DL/cyrus/imapd.conf imapd.conf /etc<br />awk '{gsub("example.com", "'"$DOMAIN"'", $0); print > FILENAME}' /etc/imapd.conf<br />cp /etc/imapd.conf /etc/imap.conf<br /><br /><br />cp /etc/cyrus.conf /etc/cyrus.conf.old 2>/dev/null<br />awk '{gsub("#imaps\t\tcmd=\"imapd", "imaps\t\tcmd=\"imapd", $0); print > FILENAME}' /etc/cyrus.conf<br />awk '{gsub("\"timsieved\"", "\"/usr/lib/cyrus/bin/timsieved\"", $0); print > FILENAME}' /etc/cyrus.conf<br />echo - Modification du fichier /etc/cyrus.conf [OK]<br /><br />#Postfix<br />echo Changement des fichiers de configuration de Postfix<br />mkdir $DL_DIR/hyperion-install/configfiles/postfix<br />cd $DL_DIR/hyperion-install/configfiles/postfix<br /><br />Change_fichier_de_config $URL_DL/postfix/main.cf main.cf /etc/postfix<br />awk '{gsub("example.com", "'"$DOMAIN"'", $0); print > FILENAME}' /etc/postfix/main.cf<br /><br />Change_fichier_de_config $URL_DL/postfix/master.cf master.cf /etc/postfix<br /><br />Change_fichier_de_config $URL_DL/postfix/ox_aliases.cf ox_aliases.cf /etc/postfix<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_aliases.cf<br /><br />Change_fichier_de_config $URL_DL/postfix/ox_resource_aliases.cf ox_resource_aliases.cf /etc/postfix<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_resource_aliases.cf<br /><br />Change_fichier_de_config $URL_DL/postfix/ox_user_aliases.cf ox_user_aliases.cf /etc/postfix <br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_user_aliases.cf<br /><br />Change_fichier_de_config $URL_DL/postfix/ox_domains.cf ox_domains.cf /etc/postfix<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_domains.cf<br /><br />Change_fichier_de_config $URL_DL/postfix/ox_externaldomaincheck.cf ox_externaldomaincheck.cf /etc/postfix<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_externaldomaincheck.cf<br /><br />Change_fichier_de_config $URL_DL/postfix/ox_group_aliases.cf ox_group_aliases.cf /etc/postfix<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_group_aliases.cf<br /><br />Change_fichier_de_config $URL_DL/postfix/ox_senderrestrictions.cf ox_senderrestrictions.cf /etc/postfix<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_senderrestrictions.cf<br /><br />#MySql<br />echo Changement des fichiers de configuration de MySql<br />mkdir $DL_DIR/hyperion-install/configfiles/mysql<br />cd $DL_DIR/hyperion-install/configfiles/mysql<br /><br />Change_fichier_de_config $URL_DL/mysql/libnss-mysql.cfg libnss-mysql.cfg /etc<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/libnss-mysql.cfg<br /><br />Change_fichier_de_config $URL_DL/mysql/libnss-mysql-root.cfg libnss-mysql-root.cfg /etc<br />awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/libnss-mysql-root.cfg<br /><br />#System<br />echo Changement des fichiers de configuration des autres programmes<br />mkdir $DL_DIR/hyperion-install/configfiles/system<br />cd $DL_DIR/hyperion-install/configfiles/system<br /><br />Change_fichier_de_config $URL_DL/system/saslauthd saslauthd /etc/default<br />cp /opt/open-xchange/etc/admindaemon/User.properties /opt/open-xchange/etc/admindaemon/User.properties.old 2>/dev/null<br />awk '{gsub("DEFAULT_PASSWORD_MECHANISM=SHA", "DEFAULT_PASSWORD_MECHANISM=CRYPT", $0); print > FILENAME}' /opt/open-xchange/etc/admindaemon/User.properties<br />echo - Modification du fichier /opt/open-xchange/etc/admindaemon/User.properties [OK]<br /><br />######################## Finaliser l'installation#####################"<br />echo Finaliser l instalation<br />faire_une_pause<br /><br />usermod -G mail postfix<br />newaliases<br /><br /><br />echo "GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'localhost' IDENTIFIED BY '$OPENXCHANGE_MYSQL_PWD';" > /tmp/openXchange_pri.sql<br />echo Le mot de passe root de MySql:<br />mysql -u root < /tmp/openXchange_pri.sql mysql -p<br /><br />/opt/open-xchange/sbin/initconfigdb --configdb-pass=$OPENXCHANGE_MYSQL_PWD<br /><br />/opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-pass=$OPENXCHANGE_MYSQL_PWD --master-pass=$OX_ADMIN_MASTER_PASSWORD<br /><br />echo "Restart services..."<br />/etc/init.d/open-xchange-groupware restart<br />/etc/init.d/open-xchange-admin start<br />/etc/init.d/mysql restart<br />/etc/init.d/cyrus2.2 restart<br />/etc/init.d/saslauthd restart<br />/etc/init.d/postfix restart<br />/etc/init.d/apache2 restart<br /><br /><br />/opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD<br /><br />mkdir /var/opt/filestore<br />chown open-xchange:open-xchange /var/opt/filestore<br /><br />/opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD \<br />-t file:///var/opt/filestore<br /><br />/opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD \<br />-n oxdatabase -p $OPENXCHANGE_MYSQL_PWD -m true<br /><br />/opt/open-xchange/sbin/createcontext -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD -c 1 \<br />-u oxadmin -d "Context Admin" -g Admin -s User -p $OX_ADMIN_PASSWORD -L defaultcontext \<br />-e oxadmin@$DOMAIN -q 1024 --access-combination-name=all<br /><br />/opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P $OX_ADMIN_PASSWORD -u testuser \<br />-d "Test User" -g Test -s User -p secret -e testuser@$DOMAIN --imaplogin testuser --imapserver 127.0.0.1 --smtpserver 127.0.0.1<br /><br />/etc/init.d/open-xchange-admin restart<br />/etc/init.d/open-xchange-groupware restart<br /><br />echo "Fini! Visitez http://`hostname`.$DOMAIN/ox6/ et enregistrez vous en tant que testuser/secret pour tester l'installation"<br /></code></p>
<h2>Deux impressions d'écran:</h2>
<a href="https://blog-du-grouik.tinad.fr/public/OpenXchange/oxs1.png"><img title="oxs1.png, mai 2009" style="margin: 0 auto; display: block;" alt="" src="https://blog-du-grouik.tinad.fr/public/OpenXchange/oxs1.png" /></a><a href="https://blog-du-grouik.tinad.fr/public/OpenXchange/OXC2png.png"><img title="OXC2png.png, mai 2009" style="margin: 0 auto; display: block;" alt="" src="https://blog-du-grouik.tinad.fr/public/OpenXchange/.OXC2png_m.jpg" /></a><br /><br /><br /><a href="https://blog-du-grouik.tinad.fr/public/OpenXchange/OXC2png.png"><img title="OXC2png.png, mai 2009" style="margin: 0 auto; display: block;" alt="" src="https://blog-du-grouik.tinad.fr/public/OpenXchange/.OXC2png_m.jpg" /></a><br /><br />Prochain essai (complet celui là) ce sera horde.<br /><br />Test OBM softwareurn:md5:829a09af708113a12b8da23538568ae52009-05-17T12:15:00+02:002010-07-21T21:50:06+02:00gniearkGroupware webmailLogiciel-libreOBMserveur <h2>Pourquoi pas zimbra?</h2>
<p>Dans <a "href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra">ce billet</a>, j'expliquais que je testais zimbra dans l'éventualité de l'installer. Ce qui me rebute sur zimbra:</p>
<ul>
<li>Plutot chiant à paramétrer derrière une passerelle.</li>
<li>Le système d'archivage des mails est spécifique à zimbra d'après les informations que j'ai pu glaner, ce qui risque de rendre galère le passage à une autre solution si à terme nos besoins changent et que le nombre de boites mail augmente.</li>
<li>Tous les paquets utilisés sont apparemment des paquets libres, adaptés pour zimbra (zimbra-postfix, zimbra-ldap...). Toute une hiérarchisation des fichiers est refaite (binaires, fichiers de configurations) dans un dossier de /opt. Je me demande si ça ne risque pas de poser des problèmes pour la fréquence des mises à jour de sécurité.</li>
<li><del>Le forum francophone est surtout un vecteur de publicité pour des prestataires informatiques (il faut bien que tout le monde travaille, mais moi aussi).</del> petit tour sur leur forum le 11 juin 2010, ça n' plus l'air d’être le cas</li>
</ul>
<h2>Installation</h2>
<h3>Debian</h3>
<p>Le premier bon point est qu'il y a un dépot pour les mises à jour et qu'il utilise des paquets de la distribution.
<a href="http://obm.org/doku.php?id=docs:admindocs:debian" hreflang="en">La documentation est là</a>.
traduction rapide et ajout de mes commentaires pour débian Lenny:</p>
<h4>Prérequis:</h4>
<ul>
<li>Avoir postgree ou MySql d'installé sinon l'installation sortira en erreur.</li>
<li>Activer les dépots "non free" (java fait partie des dépendances)</li>
</ul>
<h4>Ajouter la source de dépots suivante:</h4>
<pre>deb http://deb.obm.org stable obm</pre>
<p>Pour obtenir la clé dans un terminal:</p>
<pre>wget -q http://deb.obm.org/obmgpg.pub -O - | apt-key add -</pre>
<h4>Puis installer les métapaquets:</h4>
<pre>aptitude update
aptitude install obm
aptitude install obm-funambol</pre>
<p>Lors de l'installation des paquets il demande le mot de passe de l'administrateur LDAP, le type de base de données (le choix est entre postgree et mysql) le nom de la base de données, le nom de l'utilisateur...</p>
<p>Dans un premier temps, j'ai laissé la pluspart des valeurs par défaut.</p>
<h3>ubuntu</h3>
<p>tout simplement:</p>
<pre>sudo aptitude install obm</pre>
<h2>Test</h2>
<p><a href="https://blog-du-grouik.tinad.fr/public/obm/obm1.png"><img src="https://blog-du-grouik.tinad.fr/public/obm/.obm1_m.jpg" alt="obm1" style="display:block; margin:0 auto;" title="obm1, mai 2009" /></a></p>
<p><a href="https://blog-du-grouik.tinad.fr/public/obm/obm-2.png"><img src="https://blog-du-grouik.tinad.fr/public/obm/.obm-2_m.jpg" alt="obm2" style="display:block; margin:0 auto;" title="obm2, mai 2009" /></a></p>
<p>Le produit est intéressant, mais ce n'est pas ce que j'attendais. obm me parait surtout adapté au suivi commercial et à la répartition des taches......</p>
<p>Essais à suivre (le prochain est open-xchange)....</p>Test zimbraurn:md5:9a956a87d0a332c964a29edfd8402b922009-05-15T00:17:00+02:002010-07-21T21:50:15+02:00gniearkGroupware webmailLogiciel-libreserveurzimbra <p>J'ai déja un serveur POP3 / IMAP, qui fonctionne tres bien. La trentaine d'utilisateurs utilise Thunderbird et le module lightening pour les calendriers (les agendas sont simplement déposés dans un repertoire partagé).</p>
<h3>L'objectif serait:</h3>
<ul>
<li>Pour les agendas, le système est un peu lourd. <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#pnote-301-1" id="rev-pnote-301-1">1</a>]</sup> Pit être qu'une telle solution me permettra de simplifier ça.</li>
<li>Les agendas on the web!!!!!</li>
<li>Il risque d'y avoir l'apparition de nouveaux appareils (black Berrys)</li>
</ul>
<h3>Les petites questions que je me pose:</h3>
<ul>
<li>Y aura-t-il moyen de basculer les anciennes boites mails (format maildir) dans zimbra? (je pense que oui)</li>
<li>Y aura-t-il moyen de basculer les agendas (.ics)?</li>
</ul>
<h3>A première vue, il y a trois inconvénients:</h3>
<ul>
<li>La portabilité de cette solution ne se fait pas sur toutes les versions des distributions linux. <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#pnote-301-2" id="rev-pnote-301-2">2</a>]</sup></li>
<li>D'apres la documentation, il vaut mieux partir d'un serveur clean, il y a des risques pour les services déja installés. Il faudra réinstaller les éventuels sites internets hébergés sur la machine.</li>
<li>C'est yahoo derrière Zimbra et dans mon esprit Yahoo ça craind... Mais peut etre que zimbra, va faire remonter cette entreprise dans mon estime.<sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#pnote-301-3" id="rev-pnote-301-3">3</a>]</sup></li>
</ul>
<h2>L'installation:</h2>
<p>Il s'agissait d'un essai, c'est à dire que je m'en foutais que ce soit fonctionnel. Cependant à l'installation, qu'est-ce qu'il est chiant si les DNS ne sont pas configurés!!!! J'ai fait les premières tentatives sur une croute (un P3) au travail.... vraiment pas moyen de le faire tourner, s'il ne trouve pas un enregistrement MX lui correspondant. Et heu, les serveurs sur lesquels j'ai la main pour lesquels un enregistrement MX est bien configuré (la dédibox qui héberge ce site et le serveur du travail) sont en production.... pas question de faire mumuse dessus. Le DNS du LAN du travail me rebute (c'est un win2003, on laisse tomber).</p>
<p>Finalement, je viens de me faire un petit réseau virtuel sur mon PC (un Quadcore à 4 fois 2.33GHz ; 2G0 de ram.... faut bien que je me serve de ce gaspillage de ressources).
<a href="https://blog-du-grouik.tinad.fr/public/Virtuallan.png"><img src="https://blog-du-grouik.tinad.fr/public/.Virtuallan_m.jpg" alt="VirtualLAn" style="display:block; margin:0 auto;" title="VirtualLAn, mai 2009" /></a></p>
<p>J'ai dans mon réseau virtuel avec virtualbox <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#pnote-301-4" id="rev-pnote-301-4">4</a>]</sup>:</p>
<ul>
<li>Le serveur DNS pour le lan virtuel sous Debian5 avec bind9 <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#pnote-301-5" id="rev-pnote-301-5">5</a>]</sup></li>
<li>Le serveur zimbra, Debian 4</li>
<li>Un XP pour des tests</li>
<li>L'Hôte est ubuntu 9.4</li>
</ul>
<h2>Installation</h2>
<p>Dans le système fraichement installé, La liste des packages est <a href="http://www.zimbra.com/community/downloads.html" hreflang="en">là</a>.
pour obtenir la version actuelle pour debian:</p>
<pre>testzimbra:~# cd /tmp
testzimbra:/TMP# wget http://h.yimg.com/lo/downloads/5.0.16_GA/zcs-5.0.16_GA_2921.DEBIAN4.0.20090429055651.tgz <sup>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#pnote-301-6" id="rev-pnote-301-6">6</a>]</sup></pre>
<p></p>
<pre>testzimbra:/TMP# tar xzvf zcs-5.0.16_GA_2921.DEBIAN4.0.20090429055651.tgz
testzimbra:/TMP# cd xzvf zcs-5.0.16_GA_2921.DEBIAN4.0.20090429055651</pre>
<p>./install.sh</p>
<p>Le programme d'installation sort en erreur il manque des paquets</p>
<pre>apt-get install .... la liste des paquets marqués missing.</pre>
<p><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.InstallationZIMBRA1_m.jpg" alt="zimbrainstallation1" style="display:block; margin:0 auto;" title="zimbrainstallation1, mai 2009" /></p>
<p>./install.sh</p>
<p>J'ai répondu yes à toutes les questions.</p>
<p>Il va demander si il y a une différence entre le /etc/hostname et ce qu'il trouve au DNS de saisir le domaine.</p>
<p>On arrive ensuite à un menu de configuration. Les numéros pour choisir les différents menus... 'r' pour remonter d'un niveau. Il faut lui remplir tous les items désignés par ****. Il y a une série de mots de passe. Je ne pense pas qu'ils resservent mais dans le doutte, je les ai modifié.</p>
<p>lorsque tout est rempli, il propose de taper 'a' pour la validation de l'installation, il suffit ensuite de suivre les indications. C'est plutot long....</p>
<p>En cas de problème pour recommencer l'installation, il suffit de réexécuter le script ./install.sh
Répondre No lorsqu'il propose de "tchécker" les bases de données (LDAP et utilisateurs de mémoire), répondre encore 'No' quand il demande si c'est une upgrade. Confirmer par Yes l'écrasement des données.</p>
<h2>Quelques images de l'interface utilisateur de Zimbra</h2>
<p>C'est un peu ce qui manque sur leur site.
<a href="https://blog-du-grouik.tinad.fr/public/zimbra/ZimbraCalendrier2.png"><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.ZimbraCalendrier2_s.jpg" alt="Zimbra Calendrier" style="display:block; margin:0 auto;" title="Zimbra Calendrier, mai 2009" /></a></p>
<p><a href="https://blog-du-grouik.tinad.fr/public/zimbra/ZimbraPorteDocument.png"><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.ZimbraPorteDocument_s.jpg" alt="Zimbra Porte Document" style="display:block; margin:0 auto;" title="Zimbra Porte Document, mai 2009" /></a></p>
<p><a href="https://blog-du-grouik.tinad.fr/public/zimbra/ZimbraFonctions_d__importation.png"><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.ZimbraFonctions_d__importation_s.jpg" alt="Zimbra Import export" style="display:block; margin:0 auto;" title="Zimbra Import export, mai 2009" /></a></p>
<p><a href="https://blog-du-grouik.tinad.fr/public/zimbra/ZimbraSendMessages.png"><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.ZimbraSendMessages_s.jpg" alt="Zimbra send Message" style="display:block; margin:0 auto;" title="Zimbra send Message, mai 2009" /></a></p>
<h2>Le client Zimbra "Desktop"</h2>
<p><a href="http://www.zimbra.com/products/desktop.html" hreflang="fr">Il est téléchargeable là</a></p>
<p><a href="https://blog-du-grouik.tinad.fr/public/zimbra/ZimbradesktopAjoutCompte.png"><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.ZimbradesktopAjoutCompte_s.jpg" alt="param desktop zimbra" style="display:block; margin:0 auto;" title="param desktop zimbra, mai 2009" /></a></p>
<p><a href="https://blog-du-grouik.tinad.fr/public/zimbra/zimbradesktop.png"><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.zimbradesktop_s.jpg" alt="zimbradesktop" style="display:block; margin:0 auto;" title="zimbradesktop, mai 2009" /></a></p>
<h2>L'interface d'administration</h2>
<p>En https en précisant le port et le dossier :7071/zimbraAdmin/
Ça m'a l'air complet, et c'est suffisement simple pour déléguer (lors de mes congés ou autre)
<a href="https://blog-du-grouik.tinad.fr/public/zimbra/interfaceadmin.png"><img src="https://blog-du-grouik.tinad.fr/public/zimbra/.interfaceadmin_m.jpg" alt="admin" style="float:right; margin: 0 0 1em 1em;" title="admin, mai 2009" /></a></p>
<h2>Conclusion</h2>
<p>C'est tout pour aujourd'hui.</p>
<p>Je vais me pencher à présent sur les questions comment séparer les VHost avec ce truc, et les boites maildir actuelles comment les migrer. A suivre.....</p>
<div class="footnotes"><h4>Notes</h4>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#rev-pnote-301-1" id="pnote-301-1">1</a>] Notamment en raison d'un turn-over assez important dans l'administration et au technique les mois derniers. </p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#rev-pnote-301-2" id="pnote-301-2">2</a>] Voir la liste là: http://www.zimbra.com/community/downloads.html</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#rev-pnote-301-3" id="pnote-301-3">3</a>] Ça n'engage que moi</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#rev-pnote-301-4" id="pnote-301-4">4</a>] PSSST... pour ceux qui cherchent, dans le paramétrage de l'interface réseau de chaque ordinateur invité il faut choisir "interface Hote" Ma freebox fait DHCP et leur attribuent une IP</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#rev-pnote-301-5" id="pnote-301-5">5</a>] La dernière fois que j'avais configuré bind 9 j'avais mis plusieurs heures. C'est un des rares trucs pour lequel webmin est bien foutu. J'ai triché</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2009/05/13/Test-zimbra#rev-pnote-301-6" id="pnote-301-6">6</a>] J'ai réussi à le taper correctement dans le terminal du premier coup.</p></div>