<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>L&#039;admin sous GNU / Linux - Blog Libre &#187; postfix</title> <atom:link href="http://blog.admin-linux.org/tag/postfix/feed" rel="self" type="application/rss+xml" /><link>http://blog.admin-linux.org</link> <description>Vous trouverez des howtos, des news, des astuces sur les logiciels libres. Les sujets traités y sont la messagerie (postfix, cyrus...), les systèmes (ubuntu, debian, gentoo...), la supervision (nagios, zabbix, centreon...), les base des données (mysql, postgresql), le web (apache et autres...) et tout le reste</description> <lastBuildDate>Thu, 26 Jan 2012 13:31:34 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Supervision de postfix via mailgraph avec le plugin check_mailstat.pl via Nagios/Centreon</title><link>http://blog.admin-linux.org/supervision/supervision-de-postfix-via-mailgraph-avec-le-plugin-check_mailstat-pl-via-nagios-centreon</link> <comments>http://blog.admin-linux.org/supervision/supervision-de-postfix-via-mailgraph-avec-le-plugin-check_mailstat-pl-via-nagios-centreon#comments</comments> <pubDate>Thu, 08 Sep 2011 22:21:49 +0000</pubDate> <dc:creator>Pierre-Yves Dubreucq</dc:creator> <category><![CDATA[Supervision]]></category> <category><![CDATA[centreon]]></category> <category><![CDATA[mailgraph]]></category> <category><![CDATA[nagios]]></category> <category><![CDATA[Planet-Libre]]></category> <category><![CDATA[postfix]]></category><guid isPermaLink="false">http://blog.admin-linux.org/?p=2684</guid> <description><![CDATA[Voici une procédure permettant de contrôler l&#8217;activité d&#8217;un serveur de messagerie postfix via Nagios / Centreon. Pour cela nous allons utiliser le plugins check_mailstat.pl avec une petite adaptation du script...]]></description> <content:encoded><![CDATA[<p><a href="http://blog.admin-linux.org/wp-content/uploads/2011/09/Centreon_graph_mailstat_home.png"><img class="aligncenter size-full wp-image-2704" title="Centreon_graph_mailstat_home" src="http://blog.admin-linux.org/wp-content/uploads/2011/09/Centreon_graph_mailstat_home.png" alt="Centreon graph mailstat home Supervision de postfix via mailgraph avec le plugin check mailstat.pl via Nagios/Centreon" width="465" height="240" /></a></p><p>Voici une procédure permettant de contrôler l&#8217;activité d&#8217;un serveur de messagerie <a title="postfix" href="http://blog.admin-linux.org/tag/postfix" target="_blank">postfix</a> via Nagios / Centreon.</p><p>Pour cela nous allons utiliser le plugins <a title="check_mailstat.pl" href="http://www.linuxplayer.org/2010/12/check_mailstat-pl-a-nagios-plugin-for-monitoring-mail-server-statistics" target="_blank">check_mailstat.pl</a> avec une petite adaptation du script afin de le rendre compatible avec la génération de graphe sous Centreon.</p><p>Le plugin check_mailstat.pl va récupérer depuis des données depuis <a title="mailgraph" href="http://mailgraph.schweikert.ch/" target="_blank">mailgraph</a> qui permet de générer des graphes via <a title="RRDTool" href="http://oss.oetiker.ch/rrdtool/" target="_blank">RRDTool</a></p><p>Tout d&#8217;abord, il faut installer Mailgraph sur l&#8217;hôte à superviser, ici une Debian.</p><h2>Installation de Mailgraph</h2><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mailgraph</pre></div></div><p>Si l&#8217;installation ne vous a pas poser les questions propres au paramétrage, lancer :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure mailgraph</pre></div></div><p>Voici les questions et réponse à fournir :</p><p>Mailgraph doit-il être lancé au démarrage ? OUI</p><p>Fichier de journalisation à utiliser par mailgraph : /var/log/mail.log (à adapter)</p><p>Faut-il compter les courriels entrants comme des courriels sortants ? NON (J&#8217;utilise Amavis, donc j&#8217;ai choisi cette option, encore une fois à adapter.</p><h2>Paramétrage et sécurisation de l&#8217;accès web Mailgraph</h2><p>On va ensuite créer un un espace web dédié avec virtualhost afin de restreindre l&#8217;accès à l&#8217;interface web :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <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>mailgraph <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <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>mailgraph<span style="color: #000000; font-weight: bold;">/</span>cgi-bin
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <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>mailgraph
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>mailgraph.cgi <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>mailgraph<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>.</pre></div></div><p>Voici un Virtual Host type avec prise en charge du ssl :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ServerName votre.hostname.com
&nbsp;
ServerAdmin votre<span style="color: #000000; font-weight: bold;">@</span>mail.com
DocumentRoot <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>mailgraph
&nbsp;
<span style="color: #666666; font-style: italic;"># Mise en place du SSL</span>
SSLEngine on
SSLCertificateFile    <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span>mailgraph.crt
SSLCertificateKeyFile <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span>mailgraph.key
&nbsp;
SSLOptions +StdEnvVars
&nbsp;
Options FollowSymLinks MultiViews
Options +ExecCGI
AddHandler cgi-script .cgi
SSLOptions +StdEnvVars
&nbsp;
<span style="color: #666666; font-style: italic;"># Restriction par mot de passe basique</span>
AuthUserFile <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>mailgraph<span style="color: #000000; font-weight: bold;">/</span>.htpasswd
AuthGroupFile <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
AuthName <span style="color: #ff0000;">&quot;Veuillez vous identifier&quot;</span>
AuthType Basic
&nbsp;
require valid-user
&nbsp;
<span style="color: #666666; font-style: italic;"># Restriction par adresse IP</span>
AllowOverride none
&nbsp;
Order deny,allow
Deny from all
Allow from 192.168.1.0
&nbsp;
ErrorLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mailgraph-error.log
<span style="color: #666666; font-style: italic;"># Possible values include: debug, info, notice, warn, error, crit,</span>
<span style="color: #666666; font-style: italic;"># alert, emerg.</span>
LogLevel warn
CustomLog <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mailgraph-access.log combined</pre></div></div><p>Créer donc le fichier /etc/apache2/sites-available/mailgraph puis l&#8217;activer :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>mailgraph <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-enabled<span style="color: #000000; font-weight: bold;">/</span></pre></div></div><p>Empecher l&#8217;indexation par les moteurs de recherche, on ne sait jamais :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <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>mailgraph<span style="color: #000000; font-weight: bold;">/</span>robots.txt
User-agent: <span style="color: #000000; font-weight: bold;">*</span>
Disallow: <span style="color: #000000; font-weight: bold;">/</span></pre></div></div><p>Ensuite générer le certificat SSL :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl genrsa <span style="color: #660033;">-out</span> mailgraph.key <span style="color: #000000;">1024</span>
openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-x509</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">3650</span> <span style="color: #660033;">-key</span> mailgraph.key <span style="color: #660033;">-out</span> mailgraph.crt</pre></div></div><p>Déplacer les certificats/clefs à l&#8217;endroit paramétrer dans le Vhost</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> mailgraph.<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span>.</pre></div></div><p>S&#8217;assurer du bon paramétrage des ports apache (NameVirtualHost *:443)</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ports.conf
&nbsp;
NameVirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span>
Listen <span style="color: #000000;">80</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># If you add NameVirtualHost *:443 here, you will also have to change</span>
<span style="color: #666666; font-style: italic;"># the VirtualHost statement in /etc/apache2/sites-available/default-ssl</span>
<span style="color: #666666; font-style: italic;"># to &amp;lt;VirtualHost *:443&amp;gt;</span>
<span style="color: #666666; font-style: italic;"># Server Name Indication for SSL named virtual hosts is currently not</span>
<span style="color: #666666; font-style: italic;"># supported by MSIE on Windows XP.</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>NameVirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">443</span><span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
Listen <span style="color: #000000;">443</span>
Listen <span style="color: #000000;">4433</span></pre></div></div><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><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</pre></div></div><p>Génération de l&#8217;authentification Apache</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">htpasswd <span style="color: #660033;">-c</span> <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>mailgraph<span style="color: #000000; font-weight: bold;">/</span>.htpasswd admin</pre></div></div><p>Redémarrer Apache, ce qui n&#8217;est pas forcément nécessaire, mais bon&#8230;</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><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</pre></div></div><p>(un dernier pour la route)</p><p>Voilà, vous devriez avoir accès à Mailgraph en SSL avec restriction par IP et Authentification basique Apache</p><p>Vous pouvez voir votre Mailgraph via l&#8217;url :</p><p>https://votre.hostname.com/cgi-bin/mailgraph.cgi</p><h2>Installation du plugin chek_mailstat.pl</h2><h3>Installation des pré-requis</h3><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #c20cb9; font-weight: bold;">patch</span>
<span style="color: #c20cb9; font-weight: bold;">unzip</span> check_mailstat_plugin_v0.9.1.zip</pre></div></div><p>Afin d&#8217;utiliser mailgraph, il est nécessaire de le patcher :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> check_mailstat_plugin_v0.9.1
<span style="color: #c20cb9; font-weight: bold;">patch</span> <span style="color: #660033;">-b</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>mailgraph mailgraph.patch</pre></div></div><p>Là il faut attendre un peu afin que le fichier /var/tmp/mailstat soit créé. Le temps varie en fonction de la taille de votre fichier /var/log/mail.log</p><p>Attribuer les droits à l&#8217;utilisateur nagios</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> nagios:nagios <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mailstat
<span style="color: #c20cb9; font-weight: bold;">chown</span> nagios:nagios <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mailstat.old</pre></div></div><h3>Tests et paramétrage</h3><h4>Test en local</h4><p>Déplacer le script check_mailstat.pl là où se trouve tout les plugins</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> check_mailstat.pl ..</pre></div></div><p>Vous pouvez lancer le script perl avec l&#8217;option &laquo;&nbsp;-h&nbsp;&raquo; pour afficher l&#8217;aide</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>check_mailstat.pl <span style="color: #660033;">-h</span></pre></div></div><p>Voici comment cela fonctionne par l&#8217;exemple :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>server:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #666666; font-style: italic;"># ./check_mailstat.pl -w &lt;strong&gt;10&lt;/strong&gt;:0:0:0:0:0 -c &lt;strong&gt;20&lt;/strong&gt;:0:0:0:0:0</span>
OK: <span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>sent:<span style="color: #000000;">7.68</span><span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>   received:<span style="color: #000000;">5.66</span>   bounced:<span style="color: #000000;">0.00</span>   rejected:<span style="color: #000000;">0.40</span>   virus:<span style="color: #000000;">0.00</span>   spam:<span style="color: #000000;">0.00</span>   <span style="color: #000000; font-weight: bold;">|&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #007800;">sent</span>=<span style="color: #000000;">7.68</span><span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>   <span style="color: #007800;">received</span>=<span style="color: #000000;">5.66</span>   <span style="color: #007800;">bounced</span>=<span style="color: #000000;">0.00</span>   <span style="color: #007800;">rejected</span>=<span style="color: #000000;">0.40</span>   <span style="color: #007800;">virus</span>=<span style="color: #000000;">0.00</span>   <span style="color: #007800;">spam</span>=<span style="color: #000000;">0.00</span></pre></div></div><p>En gros, je déclenche un WARN dès que je suis à <strong>10</strong> mails envoyés et un CRITICAL dès que je suis à <strong>20</strong></p><p>Voici un autre exemple :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>server:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #666666; font-style: italic;"># ./check_mailstat.pl -w 0:0:0:0:0:&lt;strong&gt;10&lt;/strong&gt; -c 0:0:0:0:0:&lt;strong&gt;20&lt;/strong&gt;</span>
OK: sent:<span style="color: #000000;">7.68</span>   received:<span style="color: #000000;">5.66</span>   bounced:<span style="color: #000000;">0.00</span>   rejected:<span style="color: #000000;">0.40</span>   virus:<span style="color: #000000;">0.00</span>   <span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>spam:<span style="color: #000000;">0.00</span><span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>  <span style="color: #000000; font-weight: bold;">|</span><span style="color: #007800;">sent</span>=<span style="color: #000000;">7.68</span>   <span style="color: #007800;">received</span>=<span style="color: #000000;">5.66</span>   <span style="color: #007800;">bounced</span>=<span style="color: #000000;">0.00</span>   <span style="color: #007800;">rejected</span>=<span style="color: #000000;">0.40</span>   <span style="color: #007800;">virus</span>=<span style="color: #000000;">0.00</span>  <span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #007800;">spam</span>=<span style="color: #000000;">0.00</span><span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>Je déclenche un WARN dès que je suis à <strong>10</strong> spams envoyés et un CRITICAL dès que je suis à <strong>20</strong></p><p>On peut aussi tester plusieurs paramètres en même temps</p><p>root@server:/usr/lib/nagios/plugins# ./check_mailstat.pl -w <strong>20</strong>:0:0:0:0:<strong>10</strong> -c <strong>30</strong>:0:0:0:0:<strong>20</strong><br /> OK: <strong>sent:7.68</strong>   received:5.66   bounced:0.00   rejected:0.40   virus:0.00   <strong>spam:0.00</strong>   |<strong>sent=7.68 </strong>  received=5.66   bounced=0.00   rejected=0.40   virus=0.00   <strong>spam=0.00</strong></p><p>Je déclenche un WARN dès que je suis à <strong>20</strong> mails ou <strong>10</strong> spams envoyés et un CRITICAL dès que je suis à <strong>30</strong> mails ou <strong>20</strong>spams</p><h4>Paramétrage</h4><p>Il faut ajouter la commande afin que NRPE la connaisse :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>nrpe.cfg</pre></div></div><p>Ajouter la ligne ci-dessous :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">command</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>check_mailstat<span style="color: #7a0874; font-weight: bold;">&#93;</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>check_mailstat.pl <span style="color: #660033;">-w</span> <span style="color: #007800;">$ARG1</span>$ <span style="color: #660033;">-c</span> <span style="color: #007800;">$ARG2</span>$</pre></div></div><p>Puis redémarrer NRPE</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><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>nagios-nrpe-server restart</pre></div></div><h4>Test depuis le serveur de supervision</h4><p>Ici On demande à NRPE d&#8217;appeler la commande check_mailstat en posititionnant un WARN à 40 mails envoyés et un CRITICAL à 50</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>info59sup01:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #666666; font-style: italic;"># ./check_nrpe -H muscat.nexen.net -c check_mailstat -a 40:0:0:0:0:0 50:0:0:0:0:0</span>
OK: sent:<span style="color: #000000;">7.68</span>   received:<span style="color: #000000;">5.66</span>   bounced:<span style="color: #000000;">0.00</span>   rejected:<span style="color: #000000;">0.40</span>   virus:<span style="color: #000000;">0.00</span>   spam:<span style="color: #000000;">0.00</span>   <span style="color: #000000; font-weight: bold;">|</span><span style="color: #007800;">sent</span>=<span style="color: #000000;">7.68</span>   <span style="color: #007800;">received</span>=<span style="color: #000000;">5.66</span>   <span style="color: #007800;">bounced</span>=<span style="color: #000000;">0.00</span>   <span style="color: #007800;">rejected</span>=<span style="color: #000000;">0.40</span>   <span style="color: #007800;">virus</span>=<span style="color: #000000;">0.00</span>   <span style="color: #007800;">spam</span>=<span style="color: #000000;">0.00</span></pre></div></div><p>Si c&#8217;est OK, il faut mettre en place la supervision au niveau de Centreon</p><h2>Installation niveau Centreon</h2><p>Voici une façon d&#8217;utiliser Centreon. Personnellement, je l&#8217;utilise en me basant beaucoup sur les modèles pour n&#8217;avoir généralement que les arguments à renseigner lors de la mise en place de service, mais bon libre à vous <img src='http://blog.admin-linux.org/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Supervision de postfix via mailgraph avec le plugin check mailstat.pl via Nagios/Centreon" class='wp-smiley' title="Supervision de postfix via mailgraph avec le plugin check mailstat.pl via Nagios/Centreon" /></p><p>Les deux premiers points ne sont bien sur qu&#8217;à faire qu&#8217;une seule fois.</p><p>Je vais utiliser lancer mes vérifications via NRPE pour lancer ensuite en local le script check_mailstat.pl</p><p>&nbsp;</p><h3>Création de la Commande</h3><p>Aller dans Configuration -&gt; Commandes</p><p>Créer une sonde nommée check_nrpe_mailstat</p><p>Ligne de commande :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$USER1</span>$<span style="color: #000000; font-weight: bold;">/</span>check_nrpe <span style="color: #660033;">-H</span> <span style="color: #007800;">$HOSTADDRESS</span>$ <span style="color: #660033;">-c</span> check_mailstat <span style="color: #660033;">-a</span> <span style="color: #007800;">$ARG1</span>$ <span style="color: #007800;">$ARG2</span>$</pre></div></div><p>Exemple d&#8217;arguments :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">!</span><span style="color: #000000;">300</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #000000;">500</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span></pre></div></div><p>Modèle de graphique :</p><p>Mailstat (nous allons voir ensuite pour le créer)</p><p>Création du modèle de service</p><p>Aller dans Configuration -&gt; Services -&gt; Modèles</p><p>Créer un modèle nommé :</p><p>NRPE-MAILSTAT</p><p>Commande de vérification :</p><p>check_nrpe_mailstat (créer précédemment)</p><p>Ne pas donner d&#8217;argument pour laisser le paramètrage au niveau du service lui même</p><h3>Création de la sonde de Service</h3><p>Voici la partie qui serait à répeter en cas de déploiement</p><p>Aller dans Configuration -&gt; Services -&gt; Services par hôte</p><p>Créer un service nommé NRPE-MAILSTAT</p><p>Modèle de service :</p><p>NRPE-MAILSTAT</p><p>Arguments : (à adapter selon les besoins)</p><p>!40:0:0:0:0:0!50:0:0:0:0:0</p><p>Sauvegarder</p><p>Ensuite redémmarer le poller du Nagios concerné</p><p>Configuration -&gt; Nagios</p><p>Serveur :</p><p>Votre_Poller</p><p>Cochez :</p><p>Deplacer les fichiers générés<br /> Redémarrer Nagios</p><p>Et voilà, vous superviser ce qui circule au niveau de votre messagerie.</p><p>Vous avez même des graphiques sur les mails envoyés, enfin seulement sur la première donnée remontée à savoir les mails envoyés.</p><p>Il semblerait que les données de performances renvoyées ne soient pas tout à fait compatibles avec le format attendu par Centreon pour la génération de graphe.</p><p>En effet, seul le nombre d&#8217;éléments envoyés est graphé.</p><p>J&#8217;ai du modifier le script pour que cela fonctionne.</p><h3>Graphe des données de Performances via Centreon</h3><h4>Modification du script pour gestion des données de performance par Centreon</h4><p>Pour cela j&#8217;ai modifié le script Perl afin qu&#8217;il fournisse des données de performances comme attendu par Centreon</p><p>Voici ma modification ligne 97 :</p><p>Remplacer :</p><div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$perfdata</span> <span style="color: #339933;">=</span> <span style="color: #000066;">sprintf</span> <span style="color: #ff0000;">&quot;sent=%-6.2f received=%-6.2f bounced=%-6.2f rejected=%-6.2f virus=%-6.2f spam=%-6.2f&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">@stat_counter</span><span style="color: #339933;">;</span></pre></div></div><p>Par :</p><div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$perfdata</span> <span style="color: #339933;">=</span> <span style="color: #000066;">sprintf</span> <span style="color: #ff0000;">&quot;sent=%-6.2f;received=%-6.2f;bounced=%-6.2f;rejected=%-6.2f;virus=%-6.2f;spam=%-6.2f&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">@stat_counter</span><span style="color: #339933;">;</span></pre></div></div><p>Ceci permet de renvoyer des résultats de ce type :</p><div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">root<span style="color: #0000ff;">@server</span><span style="color: #339933;">:/</span>usr<span style="color: #339933;">/</span>lib<span style="color: #339933;">/</span>nagios<span style="color: #339933;">/</span>plugins<span style="color: #666666; font-style: italic;"># ./check_mailstat_new.pl -w 5:0:0:0:0:0 -c 10:0:0:0:0:0</span>
OK<span style="color: #339933;">:</span> sent<span style="color: #339933;">:</span><span style="color: #cc66cc;">3.12</span>   received<span style="color: #339933;">:</span><span style="color: #cc66cc;">6.25</span>   bounced<span style="color: #339933;">:</span><span style="color: #cc66cc;">0.62</span>   rejected<span style="color: #339933;">:</span><span style="color: #cc66cc;">0.00</span>   virus<span style="color: #339933;">:</span><span style="color: #cc66cc;">0.00</span>   spam<span style="color: #339933;">:</span><span style="color: #cc66cc;">0.00</span>   <span style="color: #339933;">|</span>sent<span style="color: #339933;">=</span><span style="color: #cc66cc;">3.12</span>  <span style="color: #339933;">;</span>received<span style="color: #339933;">=</span><span style="color: #cc66cc;">6.25</span>  <span style="color: #339933;">;</span>bounced<span style="color: #339933;">=</span><span style="color: #cc66cc;">0.62</span>  <span style="color: #339933;">;</span>rejected<span style="color: #339933;">=</span><span style="color: #cc66cc;">0.00</span>  <span style="color: #339933;">;</span>virus<span style="color: #339933;">=</span><span style="color: #cc66cc;">0.00</span>  <span style="color: #339933;">;</span>spam<span style="color: #339933;">=</span><span style="color: #cc66cc;">0.00</span></pre></div></div><p>Vous remarquerez l&#8217;apparition des points-virgules nécessaires au traitement de toutes les données de performances par Centreon.</p><h4>Création du modèle de graphique</h4><p>Nous allons maintenant créer un nouveau template de graphe pour accueillir et personnaliser les graphes qui vont être générés.</p><p>Aller dans Vues -&gt; Graphiques -&gt; Modèles</p><p>Choisir de dupliquer le modèle par défaut</p><p>Nom du Modèle : Mailstat (Celui qu&#8217;on a utilisé plus haut)</p><p>Label Vertical : Nombre</p><p>Vous aurez peut-être remarquer pour la création de la commande que j&#8217;ai utilisé ce modèle de graphique.</p><h4>Création des Courbes</h4><p>Aller dans Vues -&gt; Graphiques -&gt; Courbes</p><p>Pour rappel les données de performances sont :</p><p><strong>sent</strong>=3.12  ;received=6.25  ;bounced=0.62  ;rejected=0.00  ;virus=0.00  ;spam=0.00</p><p>Cliquer sur Ajouter :</p><p>Nom du Modèle de courbes : Mailstat-sent</p><p>Nom de la source de données : <strong>sent</strong> ( Cela correspond au nom présent dans les données de performances)</p><p>Voici un screenshot pour le reste des paramètres :</p><p>&nbsp;</p><p><a href="http://blog.admin-linux.org/wp-content/uploads/2011/09/Centreon_creation_modele_courbes.png"><img class="aligncenter size-medium wp-image-2703" title="Centreon_creation_modele_courbes" src="http://blog.admin-linux.org/wp-content/uploads/2011/09/Centreon_creation_modele_courbes-300x185.png" alt="Centreon creation modele courbes 300x185 Supervision de postfix via mailgraph avec le plugin check mailstat.pl via Nagios/Centreon" width="300" height="185" /></a></p><p>&nbsp;</p><p>Il faut répeter l&#8217;opération, en n&#8217;oubliant pas de personnaliser les couleurs, pour chaque élément de données de performances, soit :</p><p>sent<br /> received<br /> bounced<br /> rejected<br /> virus<br /> spam</p><p>On retrouvera donc des courbes au nom : (N&#8217;oubliez pas Mailstat en début pour identifier plus facilement les modèles de courbes que vous souhaitez)</p><p>Mailstat-sent<br /> Mailstat-received<br /> Mailstat-bounced<br /> Mailstat-rejected<br /> Mailstat-virus<br /> Mailstat-spam</p><p>Ce qui vous donnera au final un graphique de ce type :</p><p>Image:Centreon_graph_mailstat.png</p> ]]></content:encoded> <wfw:commentRss>http://blog.admin-linux.org/supervision/supervision-de-postfix-via-mailgraph-avec-le-plugin-check_mailstat-pl-via-nagios-centreon/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Ajouter le SMTP de Gmail en SmartHost avec Postfix sous Ubuntu Server</title><link>http://blog.admin-linux.org/messagerie/ajouter-le-smtp-de-gmail-en-smarthost-avec-postfix-sous-ubuntu-server</link> <comments>http://blog.admin-linux.org/messagerie/ajouter-le-smtp-de-gmail-en-smarthost-avec-postfix-sous-ubuntu-server#comments</comments> <pubDate>Mon, 12 Apr 2010 13:47:00 +0000</pubDate> <dc:creator>Pierre-Yves Dubreucq</dc:creator> <category><![CDATA[Messagerie]]></category> <category><![CDATA[Planet-Libre]]></category> <category><![CDATA[postfix]]></category> <category><![CDATA[ubuntu]]></category><guid isPermaLink="false">http://blog.admin-linux.org/?p=1915</guid> <description><![CDATA[Voici un petit tuto permettant d&#8217;utiliser le smtp de gmail en smarthost (relay) avec le serveur de messagerie Postfix sur la distribution Ubuntu Server, ici une 9.10. Bien sur, vous...]]></description> <content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-1924" title="postfix_gmail_smarthost" src="http://blog.admin-linux.org/wp-content/uploads/2010/04/postfix_gmail_smarthost.jpg" alt="postfix gmail smarthost Ajouter le SMTP de Gmail en SmartHost avec Postfix sous Ubuntu Server" width="480" height="225" /></p><p>Voici un petit tuto permettant d&#8217;utiliser le smtp de gmail en smarthost (relay) avec le serveur de messagerie <a title="Postfix" href="http://blog.admin-linux.org/tag/postfix" target="_blank">Postfix</a> sur la distribution <a title="Ubuntu" href="http://blog.admin-linux.org/tag/ubuntu" target="_blank">Ubuntu</a> Server, ici une 9.10.</p><p>Bien sur, vous devez avoir au préalable votre serveur Postfix d&#8217;installé.</p><p>Il vous faut générer un certificat SSL pour votre serveur</p><p>Aller dans votre $HOME</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;">#cd ~</span></pre></div></div><p>Puis générer le nouveau certificat :</p><h2>Création du fichier &laquo;&nbsp;Certificate Authority&nbsp;&raquo;</h2><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>misc<span style="color: #000000; font-weight: bold;">/</span>CA.pl <span style="color: #660033;">-newca</span>
CA certificate filename <span style="color: #7a0874; font-weight: bold;">&#40;</span>or enter to create<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
Making CA certificate ...
Generating a <span style="color: #000000;">1024</span> bit RSA private key
........................................++++++
.............................................................................................++++++
writing new private key to <span style="color: #ff0000;">'./demoCA/private/cakey.pem'</span>
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
<span style="color: #660033;">-----</span>
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter <span style="color: #ff0000;">'.'</span>, the field will be left blank.
<span style="color: #660033;">-----</span>
Country Name <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span> letter code<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>AU<span style="color: #7a0874; font-weight: bold;">&#93;</span>:FR
State or Province Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>full name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Some-State<span style="color: #7a0874; font-weight: bold;">&#93;</span>:Nord
Locality Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, city<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:
Organization Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, company<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Internet Widgits Pty Ltd<span style="color: #7a0874; font-weight: bold;">&#93;</span>:Votre Organisation
Organizational Unit Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, section<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:
Common Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, YOUR name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:votrehostname
Email Address <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com
&nbsp;
Please enter the following <span style="color: #ff0000;">'extra'</span> attributes
to be sent with your certificate request
A challenge password <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:
An optional company name <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:
Using configuration from <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>openssl.cnf
Enter pass phrase <span style="color: #000000; font-weight: bold;">for</span> .<span style="color: #000000; font-weight: bold;">/</span>demoCA<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>cakey.pem:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
c4:<span style="color: #000000;">22</span>:ea:<span style="color: #000000;">51</span>:7c:ba:<span style="color: #000000;">68</span>:9b
Validity
Not Before: Apr <span style="color: #000000;">12</span> 09:<span style="color: #000000;">52</span>:02 <span style="color: #000000;">2010</span> GMT
Not After : Apr <span style="color: #000000;">11</span> 09:<span style="color: #000000;">52</span>:02 <span style="color: #000000;">2013</span> GMT
Subject:
countryName               = FR
stateOrProvinceName       = Nord
organizationName          = Votre Organisation
commonName                = votrehostname
emailAddress              = <span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com
X509v3 extensions:
X509v3 Subject Key Identifier:
<span style="color: #000000;">72</span>:<span style="color: #000000;">94</span>:AE:2C:<span style="color: #000000;">47</span>:9E:A2:6E:<span style="color: #000000;">28</span>:6B:1A:<span style="color: #000000;">68</span>:<span style="color: #000000;">51</span>:E5:5A:3D:<span style="color: #000000;">93</span>:<span style="color: #000000;">86</span>:8C:<span style="color: #000000;">95</span>
X509v3 Authority Key Identifier:
keyid:<span style="color: #000000;">72</span>:<span style="color: #000000;">94</span>:AE:2C:<span style="color: #000000;">47</span>:9E:A2:6E:<span style="color: #000000;">28</span>:6B:1A:<span style="color: #000000;">68</span>:<span style="color: #000000;">51</span>:E5:5A:3D:<span style="color: #000000;">93</span>:<span style="color: #000000;">86</span>:8C:<span style="color: #000000;">95</span>
DirName:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">C</span>=FR<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">ST</span>=Nord<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">O</span>=Votre Organisation<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">CN</span>=votrehostname<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">emailAddress</span>=<span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com
serial:C4:<span style="color: #000000;">22</span>:EA:<span style="color: #000000;">51</span>:7C:BA:<span style="color: #000000;">68</span>:9B
&nbsp;
X509v3 Basic Constraints:
CA:TRUE
Certificate is to be certified <span style="color: #000000; font-weight: bold;">until</span> Apr <span style="color: #000000;">11</span> 09:<span style="color: #000000;">52</span>:02 <span style="color: #000000;">2013</span> GMT <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1095</span> days<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
Write out database with <span style="color: #000000;">1</span> new entries
Data Base Updated</pre></div></div><h2>Générer le certificat Serveur :</h2><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># openssl req -new -nodes -subj '/CN=votrehostname/O=Votre Organisation/C=FR/ST=Nord/emailAddress=test@gmail.com' -keyout FOO-key.pem -out FOO-req.pem -days 3650</span>
Generating a <span style="color: #000000;">1024</span> bit RSA private key
................................++++++
.++++++
writing new private key to <span style="color: #ff0000;">'FOO-key.pem'</span>
<span style="color: #660033;">-----</span></pre></div></div><p>Vous constaterez bien sur que j&#8217;utilise les valeurs données plus haut.</p><h2>Signer le certificat :</h2><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># openssl ca -out FOO-cert.pem -infiles FOO-req.pem</span>
Using configuration from <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>openssl.cnf
Enter pass phrase <span style="color: #000000; font-weight: bold;">for</span> .<span style="color: #000000; font-weight: bold;">/</span>demoCA<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>cakey.pem:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
c4:<span style="color: #000000;">22</span>:ea:<span style="color: #000000;">51</span>:7c:ba:<span style="color: #000000;">68</span>:9c
Validity
Not Before: Apr <span style="color: #000000;">12</span> 09:<span style="color: #000000;">57</span>:<span style="color: #000000;">23</span> <span style="color: #000000;">2010</span> GMT
Not After : Apr <span style="color: #000000;">12</span> 09:<span style="color: #000000;">57</span>:<span style="color: #000000;">23</span> <span style="color: #000000;">2011</span> GMT
Subject:
countryName               = FR
stateOrProvinceName       = Nord
organizationName          = Votre Organisation
commonName                = votrehostname
emailAddress              = <span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
D8:<span style="color: #000000;">65</span>:D7:DA:<span style="color: #000000;">68</span>:6C:<span style="color: #000000;">34</span>:00:<span style="color: #000000;">14</span>:<span style="color: #000000;">63</span>:<span style="color: #000000;">98</span>:B0:BD:C9:9D:<span style="color: #000000;">67</span>:A0:04:<span style="color: #000000;">74</span>:2E
X509v3 Authority Key Identifier:
keyid:<span style="color: #000000;">72</span>:<span style="color: #000000;">94</span>:AE:2C:<span style="color: #000000;">47</span>:9E:A2:6E:<span style="color: #000000;">28</span>:6B:1A:<span style="color: #000000;">68</span>:<span style="color: #000000;">51</span>:E5:5A:3D:<span style="color: #000000;">93</span>:<span style="color: #000000;">86</span>:8C:<span style="color: #000000;">95</span>
&nbsp;
Certificate is to be certified <span style="color: #000000; font-weight: bold;">until</span> Apr <span style="color: #000000;">12</span> 09:<span style="color: #000000;">57</span>:<span style="color: #000000;">23</span> <span style="color: #000000;">2011</span> GMT <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">365</span> days<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Sign the certificate? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>y<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000;">1</span> out of <span style="color: #000000;">1</span> certificate requests certified, commit? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>y<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
Write out database with <span style="color: #000000;">1</span> new entries
Data Base Updated</pre></div></div><h2>Copier les certificats dans votre dossier postfix :</h2><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># mkdir /etc/postfix/certif</span>
root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># cp demoCA/cacert.pem FOO-key.pem FOO-cert.pem /etc/postfix/certif</span>
root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># chmod 644 /etc/postfix/certif/FOO-cert.pem /etc/postfix/certif/cacert.pem</span>
root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># chmod 400 /etc/postfix/certif/FOO-key.pem</span></pre></div></div><p>Gmail utilise un certificat Thawte Premium Server CA.</p><p>Il vous faut l&#8217;ajouter dans le fichier :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem &amp;gt;&amp;gt; /etc/postfix/certif/cacert.pem</span></pre></div></div><p>Si vous ne faites pas ça, vous aurez le message suivant :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Server certificate not trusted</pre></div></div><p>Attention il semblerait que Gmail a changé de certificat, je m&#8217;en suis rendu compte le 27 Mai 2010.</p><p>Il n&#8217;utilise plus un certicat Thawte mais Equifax</p><p>J&#8217;ai rencontré ce message d&#8217;erreur :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">May <span style="color: #000000;">23</span> 06:<span style="color: #000000;">53</span>:<span style="color: #000000;">21</span> <span style="color: #c20cb9; font-weight: bold;">hostname</span> postfix<span style="color: #000000; font-weight: bold;">/</span>smtp<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">20658</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: certificate verification failed <span style="color: #000000; font-weight: bold;">for</span> smtp.gmail.com<span style="color: #7a0874; font-weight: bold;">&#91;</span>209.85.229.109<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000;">587</span>: untrusted issuer <span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">C</span>=US<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">O</span>=Equifax<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">OU</span>=Equifax Secure Certificate Authority</pre></div></div><p>Pour palier à ce problème, il suffit d&#8217;ajouter le bon certificat :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># cat /etc/ssl/certs/Equifax_Secure_CA.pem &amp;gt;&amp;gt; /etc/postfix/cacert.pem</span></pre></div></div><h2>Configuration du serveur Postfix :</h2><p>Pour cela, il faut modifier le fichier /etc/postfix/main.cf</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## TLS Settings</span>
<span style="color: #666666; font-style: italic;">#</span>
smtp_tls_CAfile = <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>certif<span style="color: #000000; font-weight: bold;">/</span>cacert.pem
smtp_tls_cert_file = <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>certif<span style="color: #000000; font-weight: bold;">/</span>FOO-cert.pem
smtp_tls_key_file = <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>certif<span style="color: #000000; font-weight: bold;">/</span>FOO-key.pem
smtp_tls_session_cache_database = btree:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>smtp_tls_session_cache
smtp_use_tls = <span style="color: #c20cb9; font-weight: bold;">yes</span>
smtpd_tls_CAfile = <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>certif<span style="color: #000000; font-weight: bold;">/</span>cacert.pem
smtpd_tls_cert_file = <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>certif<span style="color: #000000; font-weight: bold;">/</span>FOO-cert.pem
smtpd_tls_key_file = <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>certif<span style="color: #000000; font-weight: bold;">/</span>FOO-key.pem
smtpd_tls_received_header = <span style="color: #c20cb9; font-weight: bold;">yes</span>
smtpd_tls_session_cache_database =  btree:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>smtpd_tls_session_cache
smtpd_use_tls = <span style="color: #c20cb9; font-weight: bold;">yes</span>
tls_random_source = dev:<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>urandom
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">##  SASL Settings</span>
<span style="color: #666666; font-style: italic;"># This is going in to THIS server</span>
smtpd_sasl_auth_enable = no
smtp_sasl_auth_enable = <span style="color: #c20cb9; font-weight: bold;">yes</span>
smtp_sasl_password_maps = <span style="color: #7a0874; font-weight: bold;">hash</span>:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>sasl_passwd
smtpd_sasl_local_domain = <span style="color: #007800;">$myhostname</span>
smtp_sasl_security_options = noanonymous
<span style="color: #666666; font-style: italic;">#smtp_sasl_security_options =</span>
smtp_sasl_tls_security_options = noanonymous
smtpd_sasl_application_name = smtpd
&nbsp;
relayhost = <span style="color: #7a0874; font-weight: bold;">&#91;</span>smtp.gmail.com<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000;">587</span>
transport_maps = <span style="color: #7a0874; font-weight: bold;">hash</span>:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>transport</pre></div></div><p>Ajouter dans le fichier /etc/postfix/transport</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gmail.com               smtp:<span style="color: #7a0874; font-weight: bold;">&#91;</span>smtp.gmail.com<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000;">587</span></pre></div></div><p>Ajouter dans le fichier /etc/postfix/sasl_passwd</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">&#91;</span>smtp.gmail.com<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000;">587</span> <span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com:password</pre></div></div><p>Puis :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">postmap sasl_passwd
postmap transport
<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>postfix restart</pre></div></div><p>Voilà, votre serveur est configuré</p><h2>Nettoyer la création de certificat :</h2><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:~<span style="color: #666666; font-style: italic;"># cd ~</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> FOO-req.pem FOO-cert.pem FOO-key.pem <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> demoCA<span style="color: #000000; font-weight: bold;">/</span></pre></div></div><p>Tester l&#8217;envoie de mail :</p><p>J&#8217;ai pour habitude de tester l&#8217;envoie de mail via telnet :</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>votrehostname:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #666666; font-style: italic;"># telnet localhost 25</span>
Trying ::<span style="color: #000000;">1</span>...
Trying 127.0.0.1...
Connected to localhost.
Escape character is <span style="color: #ff0000;">'^]'</span>.
<span style="color: #000000;">220</span> <span style="color: #c20cb9; font-weight: bold;">hostname</span> ESMTP Postfix <span style="color: #7a0874; font-weight: bold;">&#40;</span>Ubuntu<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>EHLO <span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000;">250</span>-hostname
<span style="color: #000000;">250</span>-PIPELINING
<span style="color: #000000;">250</span>-SIZE <span style="color: #000000;">10240000</span>
<span style="color: #000000;">250</span>-VRFY
<span style="color: #000000;">250</span>-ETRN
<span style="color: #000000;">250</span>-STARTTLS
<span style="color: #000000;">250</span>-ENHANCEDSTATUSCODES
<span style="color: #000000;">250</span>-8BITMIME
<span style="color: #000000;">250</span> DSN
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>MAIL FROM:<span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000;">250</span> 2.1.0 Ok
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>RCPT TO:<span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">@</span>gmail.com<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000;">250</span> 2.1.5 Ok
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>DATA<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000;">354</span> End data with <span style="color: #000000; font-weight: bold;">&amp;</span>lt;CR<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;LF<span style="color: #000000; font-weight: bold;">&amp;</span>gt;.<span style="color: #000000; font-weight: bold;">&amp;</span>lt;CR<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;LF<span style="color: #000000; font-weight: bold;">&amp;</span>gt;
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>Subject:<span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">test</span> envoi de mail<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>.<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000;">250</span> 2.0.0 Ok: queued <span style="color: #c20cb9; font-weight: bold;">as</span> 9D381812
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>quit<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000;">221</span> 2.0.0 Bye
Connection closed by foreign host.</pre></div></div><p>Ce qui est en gras est a renseigner par vos soins bien sur <img src='http://blog.admin-linux.org/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Ajouter le SMTP de Gmail en SmartHost avec Postfix sous Ubuntu Server" class='wp-smiley' title="Ajouter le SMTP de Gmail en SmartHost avec Postfix sous Ubuntu Server" /></p><p>Pour vérifier, faite un petit</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mailq
&nbsp;
ou
&nbsp;
postqueue <span style="color: #660033;">-p</span></pre></div></div><p>Et vérifier dans le fichier /var/log/mail.log que vous n&#8217;avez pas d&#8217;erreur.</p><p>A noter : La flèche utilisée pour illustrer cet article est sous licence libre, mais je ne sais pas laquelle et a été trouvée sur <a title="icones.pro" href="http://icones.pro/fleche-bleu-en-avant-droit-image-png.html" target="_blank">icones.pro</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.admin-linux.org/messagerie/ajouter-le-smtp-de-gmail-en-smarthost-avec-postfix-sous-ubuntu-server/feed</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>MTA Postfix &#8211; Nouvelle version 2.6.0</title><link>http://blog.admin-linux.org/messagerie/mta-postfix-nouvelle-version-2-6-0</link> <comments>http://blog.admin-linux.org/messagerie/mta-postfix-nouvelle-version-2-6-0#comments</comments> <pubDate>Fri, 15 May 2009 10:13:00 +0000</pubDate> <dc:creator>Pierre-Yves Dubreucq</dc:creator> <category><![CDATA[Messagerie]]></category> <category><![CDATA[Planet-Libre]]></category> <category><![CDATA[postfix]]></category><guid isPermaLink="false">http://blog.admin-linux.org/non-classe/mta-postfix-nouvelle-version-2-6-0</guid> <description><![CDATA[La nouvelle version stable de Postfix vient de sortir (le 12 Mai) en version 2.6.0.Après que Postfix ait déclaré &#171;&#160;complet&#160;&#187; avec la version 2.3, la communauté s&#8217;est réorientée vers l&#8217;amélioration...]]></description> <content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_XySgBVSDH1I/Sg1I_G9xyBI/AAAAAAAAAPU/1fLtNsF__XU/s1600-h/mysza.gif"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 130px; height: 91px;" src="http://blog.admin-linux.org/wp-content/uploads/HLIC/1.bp.blogspot.com/_XySgBVSDH1I/Sg1I_G9xyBI/AAAAAAAAAPU/1fLtNsF__XU/s200/mysza.gif" border="0" alt="mysza MTA Postfix   Nouvelle version 2.6.0" id="BLOGGER_PHOTO_ID_5336001382542592018" title="MTA Postfix   Nouvelle version 2.6.0" /></a>La nouvelle version stable de Postfix vient de sortir (le 12 Mai) en version 2.6.0.<br />Après que Postfix ait déclaré &laquo;&nbsp;complet&nbsp;&raquo; avec la version 2.3, la communauté s&#8217;est réorientée vers l&#8217;amélioration du code, à la documentation et la mise à jour pour des environnements changeants.<br />Pour rappel Postfix est un Mail Transfert Agent Opensource fonctionnant sous Linux.<br />Il se charge de délivrer les mails et a été conçu de manière à remplacer Sendmail, en etant plus rapide, plus sécurisé et plus facilement configurable.<br />On le retrouve notamment chez de nombreux hébergeurs, dont j&#8217;ai fait parti, fût un temps&#8230;<br />Une alternative sérieuse à Postfix est QMail <img src='http://blog.admin-linux.org/wp-includes/images/smilies/icon_wink.gif' alt="icon wink MTA Postfix   Nouvelle version 2.6.0" class='wp-smiley' title="MTA Postfix   Nouvelle version 2.6.0" /> <br />Voici la liste des nouveautés de cette version :<br />- Support de la multi-instance en introduisant une nouvelle commande <a href="http://www.postfix.org/postmulti.1.html" target="_blank">postmulti</a> qui permet d&#8217;ajouter, de modifier ou de supprimer une instance de Postfix. La commande &laquo;&nbsp;postfix start&nbsp;&raquo; démarre désormais automatiquement les multiples  instances de Postfix.<br />- Le support de la multi-instance entraine le déplacement de quelques fichiers depuis le répertoire non-partagé $config_directory vers le répertoire partagé $daemon_directory. Les fichiers en question sont postfix-script, postfix-files et post-install.<br />- Mise à jour du support TLS (SSL) pour le cryptage Elliptic Curve Encryption. Cela requiert une version de OpenSSL 0.9.9 ou plus. Le client SMTP n&#8217;utilise plus le protocole SSLv2 par défaut.<br />- Le client Milter supporte désormais les requêtes Milter de Sendmail 8.14, incluant les requêtes de récipient d&#8217;adresse rejetées, et les requêtes de remplacement de l&#8217;adresse expéditrice.<br />- Le comportement stress-adaptive est ajouté par défaut. Cela permet à Postfix de réduire temporairement les limites de temps et les limites d&#8217;erreurs possible en cas de surcharge, comme du flood ou autre&#8230;<br />- &#8230;</p><p>Aucune fonctionnalité n&#8217;a été supprimée avec les anciennes versions, mais il est conseillé, comme toujours de mettre à jour vos version <img src='http://blog.admin-linux.org/wp-includes/images/smilies/icon_wink.gif' alt="icon wink MTA Postfix   Nouvelle version 2.6.0" class='wp-smiley' title="MTA Postfix   Nouvelle version 2.6.0" /></p><p>A noter que le même jour des mises à jour sont sorties également. Ce sont les versions 2.5.7, 2.4.11 et 2.3.17 qui corrige un certain nombre de bugs.</p><p>Liens utiles :<br /><a href="http://www.postfix.org/start.html" target="_blank">Site Officiel</a><br /><a href="http://www.postfix.org/announcements/postfix-2.6.0.html" target="_blank">Annonces de la release</a><br /><a href="http://postfix.traduc.org/" target="_blank">Site de la traduction de la documentation en Français</a> (très riche et très utile)</p> ]]></content:encoded> <wfw:commentRss>http://blog.admin-linux.org/messagerie/mta-postfix-nouvelle-version-2-6-0/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Artica, Interface de gestion de postfix</title><link>http://blog.admin-linux.org/messagerie/artica-interface-de-gestion-de-postfix</link> <comments>http://blog.admin-linux.org/messagerie/artica-interface-de-gestion-de-postfix#comments</comments> <pubDate>Mon, 12 Jan 2009 21:50:00 +0000</pubDate> <dc:creator>Pierre-Yves Dubreucq</dc:creator> <category><![CDATA[Messagerie]]></category> <category><![CDATA[amavis]]></category> <category><![CDATA[artica]]></category> <category><![CDATA[mail]]></category> <category><![CDATA[opensource]]></category> <category><![CDATA[Planet-Libre]]></category> <category><![CDATA[postfix]]></category> <category><![CDATA[spam]]></category> <category><![CDATA[spamassassin]]></category><guid isPermaLink="false">http://blog.admin-linux.org/non-classe/artica-interface-de-gestion-de-postfix/</guid> <description><![CDATA[Artica se veut avant tout une interface d&#8217;administration complète de postfix au travers d&#8217;une interface Ajax. Ainsi on y trouvera l&#8217;administration des boîtes aux lettres mais aussi l&#8217;administration de &#171;&#160;toutes&#160;&#187;...]]></description> <content:encoded><![CDATA[<p style="text-align: justify;">Artica se veut avant tout une interface d&#8217;administration complète de postfix au travers d&#8217;une interface Ajax.<br /> Ainsi on y trouvera l&#8217;administration des boîtes aux lettres mais aussi l&#8217;administration de &laquo;&nbsp;toutes&nbsp;&raquo; les fonctionnalités Postfix.<br /> Voici une liste des fonctionnalités de d&#8217;Artica sur Postfix :</p><p style="text-align: justify;">- Gestion multidomaine<br /> - Quarantaine par domaine / par utilisateur<br /> - Gestion de Virtual IP<br /> - Gestion de l&#8217;intégralité des paramètres Postfix<br /> - Annuaires basés sur OpenLDAP<br /> - Configuration par domaines / groupes / utilisateurs<br /> - Outils de statistiques avancés<br /> - Blacklistage.</p><p style="text-align: justify;">Enfin bref la liste de fonctionnalités est assez importantes.<br /> Artica permet également la gestion de serveur Squid et Samba.</p><p style="text-align: justify;">Voici une liste des logiciels utilisés via Artica ce qui vous permettra d&#8217;apprécier les possibilités qu&#8217;offre Artica :<br /> Postfix: Main MTA, Bogofilter: anti-spam Bayesien, SPFMilter: Application de vérification SPF, Milter-greylist: Démon de gestion de greylisting. SpamAssassin, MIMEDefang, Clam Antivirus, Amavis, OpenLDAP (pour la gestion des utilisateurs), les librairies SQLite, Cyrus-imap, Procmail, Fetchmail, DnsMasq:DNS forwarder et serveur DHCP, Mailman: Gestion de liste de diffusion, Sieve : Filtre d&#8217;utilisateur final, QueueGraph: Statistiques pour postfix, MailGraph: Statistiques pour postfix, AWSTats et le plugin geoip, renattach: filtre de pièces jointes, ntp, pure-ftpd avec ldap, Squid, DansGuardian : Filtrage d&#8217;URL, Samba, Bind,<br /> Et les produits propriétaires non obligatoire : Kaspersky Anti-spam, Kaspersky Anti-Virus et Kaspersky pour Squid.</p><p style="text-align: justify;">A savoir que nous n&#8217;avons pas encore testé ce produit, mais il me parait fortement prometteur.</p><p style="text-align: justify;">Voici les liens qui en parle :<br /> <a href="http://www.artica.fr/">Site Officiel</a><br /> <a href="http://sourceforge.net/projects/artica-postfix/files/">Sur Sourceforge</a><br /> <a href="http://www.artica.fr/screenshots.php">Quelques screenshots</a><br /> A noter que sur le site il y a de nombreux screenshots que je vous invite à visiter.</p><p style="text-align: justify;">A noter également que l&#8217;on peut rajouter des extensions comme le Webmail <a href="http://roundcube.net/">RoundCube</a> ou encore le groupware <a href="http://www.obm.org/doku.php">OBM</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.admin-linux.org/messagerie/artica-interface-de-gestion-de-postfix/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Postfix : Queue file write error + virtual_alias_maps map lookup problem</title><link>http://blog.admin-linux.org/astuces/postfix-queue-file-write-error-virtual_alias_maps-map-lookup-problem</link> <comments>http://blog.admin-linux.org/astuces/postfix-queue-file-write-error-virtual_alias_maps-map-lookup-problem#comments</comments> <pubDate>Tue, 14 Oct 2008 16:15:00 +0000</pubDate> <dc:creator>rdefaux</dc:creator> <category><![CDATA[Astuces]]></category> <category><![CDATA[Messagerie]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[mail]]></category> <category><![CDATA[Planet-Libre]]></category> <category><![CDATA[postfix]]></category><guid isPermaLink="false">http://blog.admin-linux.org/non-classe/postfix-queue-file-write-error-virtual_alias_maps-map-lookup-problem/</guid> <description><![CDATA[Si vous gérez plusieurs serveurs mails avec postfix, il vous est sûrement arrivé de voir cette erreur là dans vos logs : &#171;&#160;Queue file write error&#160;&#187;, de manière plus ou...]]></description> <content:encoded><![CDATA[<p style="text-align: justify;">Si vous gérez plusieurs serveurs mails avec postfix, il vous est sûrement arrivé de voir cette erreur là dans vos logs : &laquo;&nbsp;Queue file write error&nbsp;&raquo;, de manière plus ou moins aléatoire (un coup ça marche, un coup ça marche pas, avec exactement le même test).<br /> Moi ça m&#8217;est arrivé et j&#8217;ai mis vraiment du temps à trouver d&#8217;où venait le problème.</p><p style="text-align: justify;">Vite fait mon architecture :<br /> postfix configuré pour utiliser des domaines + utilisateurs virtuels<br /> mysql (avec la liste des alias virtuels en base)</p><p style="text-align: justify;">Si vous avez éliminé comme source possible du problème la plateforme anti-spam (c&#8217;est le conseil que l&#8217;on retrouve le plus souvent pour ce problème), optimisé mysql au max et vérifié l&#8217;état des bases, optimisé des options que vous n&#8217;aviez encore jamais vu sur postfix (il y en a tellement <img src='http://blog.admin-linux.org/wp-includes/images/smilies/icon_smile.gif' alt="icon smile Postfix : Queue file write error + virtual alias maps map lookup problem" class='wp-smiley' title="Postfix : Queue file write error + virtual alias maps map lookup problem" /> ), vérifié le système de fichier, la charge du serveur, et que tout va bien et que cette pu%$¤!§n d&#8217;érreur est encore là, essayez ceci :</p><p style="text-align: justify;">Changez le fichier de conf de votre accès à la base de ceci :<br /> user = user<br /> password = password<br /> dbname = mail<br /> table = remote_aliases<br /> select_field = rcpt<br /> where_field = alias<br /> hosts = 127.0.0.1<br /> (par exemple)</p><p style="text-align: justify;">en ceci :<br /> user = user<br /> password = password<br /> dbname = mail<br /> query = SELECT rcpt FROM remote_aliases WHERE alias = CONVERT(&#8216;%s&#8217; USING latin1)<br /> hosts = 127.0.0.1</p><p style="text-align: justify;">Pour moi ça a marché !!!</p> ]]></content:encoded> <wfw:commentRss>http://blog.admin-linux.org/astuces/postfix-queue-file-write-error-virtual_alias_maps-map-lookup-problem/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Gentoo Apache/POP3 très lent</title><link>http://blog.admin-linux.org/astuces/gentoo-apachepop3-tres-lent</link> <comments>http://blog.admin-linux.org/astuces/gentoo-apachepop3-tres-lent#comments</comments> <pubDate>Sat, 20 Sep 2008 00:12:00 +0000</pubDate> <dc:creator>rdefaux</dc:creator> <category><![CDATA[Astuces]]></category> <category><![CDATA[Messagerie]]></category> <category><![CDATA[Serveurs Web & d'Application]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[gentoo]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[mail]]></category> <category><![CDATA[optimisation]]></category> <category><![CDATA[Planet-Libre]]></category> <category><![CDATA[postfix]]></category><guid isPermaLink="false">http://blog.admin-linux.org/non-classe/gentoo-apachepop3-tres-lent/</guid> <description><![CDATA[Sous gentoo, suite à une mise à jour du noyau on s&#8217;est retrouvé avec une connection au pop super lente. Genre un telnet sur le port 110 qui met 30...]]></description> <content:encoded><![CDATA[<p style="text-align: justify;">Sous gentoo, suite à une mise à jour du noyau on s&#8217;est retrouvé avec une connection au pop super lente. Genre un telnet sur le port 110 qui met 30 secondes à répondre. Et pourtant tout fonctionne !<br /> On a résolu ce problème en modifiant le fichier <span style="font-weight:bold;"><span style="font-style:italic;">/etc/imapd.conf</span></span> et en ajoutant : <span style="font-weight:bold;"><span style="font-style:italic;">allowapop: 0</span></span></p><p style="text-align: justify;">C&#8217;était apparemment dû à une génération de nombre aléatoire trop lente.</p><p style="text-align: justify;">On a eu aussi le même problème avec apache2, qui mettait dix plombes à démarrer. C&#8217;était aussi lié à la génération de nombre aléatoire, mais cette fois on l&#8217;a résolu en installant rng-tools :<br /> <span style="font-weight:bold;"><span style="font-style:italic;">emerge -av rng-tools</span></span></p> ]]></content:encoded> <wfw:commentRss>http://blog.admin-linux.org/astuces/gentoo-apachepop3-tres-lent/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Erreur SMTP 450 vs 550</title><link>http://blog.admin-linux.org/messagerie/erreur-smtp-450-vs-550-2</link> <comments>http://blog.admin-linux.org/messagerie/erreur-smtp-450-vs-550-2#comments</comments> <pubDate>Thu, 18 Oct 2007 14:44:00 +0000</pubDate> <dc:creator>Pierre-Yves Dubreucq</dc:creator> <category><![CDATA[Messagerie]]></category> <category><![CDATA[Planet-Libre]]></category> <category><![CDATA[postfix]]></category> <category><![CDATA[spam]]></category><guid isPermaLink="false">http://blog.admin-linux.org/non-classe/erreur-smtp-450-vs-550-2/</guid> <description><![CDATA[Ce très bon article explique comment réduire de manière significative le flux de spams sur son serveur. La méthode est radicale, mais permet de limiter les réémissions de mail pour...]]></description> <content:encoded><![CDATA[<p style="text-align: justify;">Ce très bon article explique comment réduire de manière significative le flux de spams sur son serveur. La méthode est radicale, mais permet de limiter les réémissions de mail pour les utilisateurs qui n&#8217;existe pas, ce qui est une bonne chose <img src='http://blog.admin-linux.org/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Erreur SMTP 450 vs 550" class='wp-smiley' title="Erreur SMTP 450 vs 550" /><br /> Voici une image qui parle d&#8217;elle-même <img src='http://blog.admin-linux.org/wp-includes/images/smilies/icon_smile.gif' alt="icon smile Erreur SMTP 450 vs 550" class='wp-smiley' title="Erreur SMTP 450 vs 550" /></p><p><img id="BLOGGER_PHOTO_ID_5122690464094154818" style="border: 0pt none; margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://localhost/wordpress/wp-content/uploads/2009/05/450vs550.png" border="0" alt="450vs550 Erreur SMTP 450 vs 550" width="320" height="141" title="Erreur SMTP 450 vs 550" /></p><p><a href="http://systembash.com/content/450-vs-550-smtp-errors/" target="blank">systembash.com</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.admin-linux.org/messagerie/erreur-smtp-450-vs-550-2/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 1/22 queries in 0.021 seconds using apc
Object Caching 2035/2082 objects using apc

Served from: blog.admin-linux.org @ 2012-02-04 19:07:55 -->
