<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://uname.pingveno.net/blog/index.php/feed/rss2/xslt" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title># uname -a - Mot-clé - postfix</title>
    <link>https://uname.pingveno.net/blog/index.php/</link>
    <atom:link href="https://uname.pingveno.net/blog/index.php/feed/tag/postfix/rss2" rel="self" type="application/rss+xml" />
    <description>Le blog de uname.pingveno.net</description>
    <language>fr</language>
    <pubDate>Tue, 18 Aug 2026 13:46:21 +0200</pubDate>
    <copyright>Mathieu Pellegrin</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Dotclear</generator>
          <item>
        <title>C'est l'histoire d'un spam Partie 1: petit cours d'anatomie</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2016/04/28/C-est-l-histoire-d-un-spam-Partie-1</link>
        <guid isPermaLink="false">urn:md5:06779a5b5e416b7931e49ff3f692ba7f</guid>
        <pubDate>Mon, 02 May 2016 15:48:00 +0200</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Informatique</category>
                          <category>mail</category>
                  <category>postfix</category>
                  <category>serie-mail-postfix-spam</category>
                  <category>spam</category>
                <description>&lt;p&gt;Le SPAM par mail, c'est pénible. C'est du travail à temps plein si on veut s'en débarrasser en gênant le moins les utilisateurs. De la stricte application des RFC aux paramètres secrets de spamassassin, je vais essayer dans cette nouvelle série d'articles essayer de vous en faire mieux comprendre les techniques, et proposer à mon échelle les quelques solutions &quot;qui marchent&quot;, du moins pour moi.&lt;/p&gt;

&lt;p&gt;Voici donc pour cette première partie un cours d'autopsie. Le SPAM que nous décortiquer aujourd'hui est un mail est est resté coincé en &lt;em&gt;queue&lt;/em&gt; sur le serveur mail. Bien que tous les mails en queue ne soient pas du SPAM, il est important de surveiller la taille de cette liste de mails &quot;en transit&quot; ; un grand nombre de mails dans cette liste indiquant souvent un problème d'envoi ou de réception.&lt;/p&gt;

&lt;p&gt;Affichons donc la queue :&lt;/p&gt;

&lt;pre&gt;
# mailq
1430281C33     8589 Thu Apr 28 14:51:58  MAILER-DAEMON
             (connect to serveurspamserveur.net.ae[86.96.xxx.xxx]:25: Connection refused)
                                         spammeur@serveurspamserveur.net.ae
&lt;/pre&gt;

&lt;p&gt;Première constatation : l'adresse source ne correspond pas à une adresse gérée par le serveur, ce n'est donc pas un mail envoyé par un des utilisateurs du serveur. Mais alors comment ça se fait que je route des mails qui ne viennent pas de chez moi, et qui ne vont pas chez moi ? Mon serveur serait configuré en &lt;a href=&quot;https://en.wikipedia.org/wiki/Open_mail_relay&quot;&gt;OpenRelay&lt;/a&gt; (ça serait inquiétant) ?&lt;/p&gt;

&lt;p&gt;Examinons le contenu brut du mail à partir de son ID. La commande postcat permet de le faire pour Postfix, à adapter selon votre MTA.&lt;/p&gt;

&lt;pre&gt;
# postcat -q 1430281C33&lt;/pre&gt;          &lt;p&gt;Ci-dessous la sortie de la commande postcat que j'ai colorisée :&lt;/p&gt;

&lt;pre&gt;
&lt;span style=&quot;color:#696969;&quot;&gt;*** ENVELOPE RECORDS deferred/1/1430281C33 ***&lt;/span&gt;
&lt;span style=&quot;color:#696969;&quot;&gt;message_size:            8589             234               1               0            8589
message_arrival_time: Thu Apr 28 14:51:58 2016
create_time: Thu Apr 28 14:51:58 2016
named_attribute: log_message_origin=local
named_attribute: trace_flags=0
sender:
original_recipient: spammeur@spamserveur.net.ae
recipient: spammeur@spamserveur.net.ae&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;*** MESSAGE CONTENTS deferred/1/1430281C33 ***
Received: by monserveur.com (Postfix)
    id 1430281C33; Thu, 28 Apr 2016 14:51:58 +0200 (CEST)
Date: Thu, 28 Apr 2016 14:51:58 +0200 (CEST)
From: MAILER-DAEMON@monserveur.com (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: spammeur@spamserveur.net.ae
Auto-Submitted: auto-replied
MIME-Version: 1.0&lt;/span&gt;
&lt;span style=&quot;color:#FF0000;&quot;&gt;Content-Type: multipart/report; report-type=delivery-status;
    boundary=&quot;B25FA81C32.1461847918/monserveur.com&quot;&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Transfer-Encoding: 8bit
Message-Id: &amp;lt;20160428125158.1430281C33@monserveur.com&amp;gt;&lt;/span&gt;

&lt;strong&gt;This is a MIME-encapsulated message.&lt;/strong&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--B25FA81C32.1461847918/monserveur.com&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Description: Notification
Content-Type: text/plain; charset=us-ascii&lt;/span&gt;

&lt;strong&gt;This is the mail system at host monserveur.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

&amp;lt;monclient@gmail.com&amp;gt;: host
    gmail-smtp-in.l.google.com[2a00:1450:400c:xxxx::xxxx] said: 552-5.7.0 This
    message was blocked because its content presents a potential 552-5.7.0
    security issue. Please visit 552-5.7.0
    https://support.google.com/mail/answer/6590 to review our message 552 5.7.0
    content and attachment content guidelines. cw9si10769736wjb.20 - gsmtp (in
    reply to end of DATA command)&lt;/strong&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--B25FA81C32.1461847918/monserveur.com&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; monserveur.com
X-Postfix-Queue-ID: B25FA81C32
X-Postfix-Sender: rfc822; spammeur@spamserveur.net.ae
Arrival-Date: Thu, 28 Apr 2016 14:51:57 +0200 (CEST)

Final-Recipient: rfc822; monclient@gmail.com
Original-Recipient: rfc822;monclient@gmail.com
Action: failed
Status: 5.7.0
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 552-5.7.0 This message was blocked because its content
    presents a potential 552-5.7.0 security issue. Please visit 552-5.7.0
    https://support.google.com/mail/answer/6590 to review our message 552 5.7.0
    content and attachment content guidelines. cw9si10769736wjb.20 - gsmtp&lt;/span&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--B25FA81C32.1461847918/monserveur.com&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Description: Undelivered Message
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit

Return-Path: &amp;lt;spammeur@spamserveur.net.ae&amp;gt;
Received: from localhost (localhost [127.0.0.1])
    by monserveur.com (Postfix) with ESMTP id B25FA81C32
    for &amp;lt;monclient@gmail.com&amp;gt;; Thu, 28 Apr 2016 14:51:57 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at monserveur.com
Received: from monserveur.com ([127.0.0.1])
    by localhost (monserveur.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id vn_xZRLJ3EKq for &amp;lt;monclient@gmail.com&amp;gt;;
    Thu, 28 Apr 2016 14:51:51 +0200 (CEST)
Received: by monserveur.com (Postfix, from userid 5000)
    id BE51181C31; Thu, 28 Apr 2016 14:51:51 +0200 (CEST)
X-Sieve: Pigeonhole Sieve 0.4.2
X-Sieve-Redirected-From: contact@monclient.com
Delivered-To: contact@monclient.com
Received: from localhost (localhost [127.0.0.1])
    by monserveur.com (Postfix) with ESMTP id 95E2581C33
    for &amp;lt;contact@monclient.com&amp;gt;; Thu, 28 Apr 2016 14:51:51 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at monserveur.com
Received: from monserveur.com ([127.0.0.1])
    by localhost (monserveur.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id 8agkFLPzF_vy for &amp;lt;contact@monclient.com&amp;gt;;
    Thu, 28 Apr 2016 14:51:44 +0200 (CEST)
Received: from bba148580.serveurspam.net.ae (bba148580.serveurspam.net.ae [217.165.xxx.xxx])
    by monserveur.com (Postfix) with ESMTP id 774C481C27
    for &amp;lt;contact@monclient.com&amp;gt;; Thu, 28 Apr 2016 14:51:44 +0200 (CEST)
Received: from www.serveurspam.net.ae ([127.0.0.1]) by AMAZONA-F00CA66 with Microsoft SMTPSVC(7.5.7601.17514);
     Thu, 28 Apr 2016 16:51:42 +0400
Date: Thu, 28 Apr 2016 16:51:42 +0400
To: &quot;contact@monclient.com&quot; &amp;lt;contact@monclient.com&amp;gt;
From: xxxx xxxx &amp;lt;spammeur@spamserveur.net.ae&amp;gt;
Subject: [SPAM] FW: Invoice
Message-ID: &amp;lt;be0fa65c2e77bf81d3fd1b0216e8e742@www.serveurspam.net.ae&amp;gt;
X-Priority: 3
X-Mailer: PHPMailer [version 1.73]
MIME-Version: 1.0&lt;/span&gt;
&lt;span style=&quot;color:#FF0000;&quot;&gt;Content-Type: multipart/mixed;
    boundary=&quot;b1_be0fa65c2e77bf81d3fd1b0216e8e742&quot;&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;X-OriginalArrivalTime: 28 Apr 2016 16:51:42.0538 (UTC) FILETIME=[40C0DFC0:01D1A068]&lt;/span&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--b1_be0fa65c2e77bf81d3fd1b0216e8e742&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Type: multipart/alternative;
    boundary=&quot;b2_be0fa65c2e77bf81d3fd1b0216e8e742&quot;&lt;/span&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--b2_be0fa65c2e77bf81d3fd1b0216e8e742&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Type: text/plain; charset = &quot;iso-8859-1&quot;
Content-Transfer-Encoding: 8bit&lt;/span&gt;

&lt;strong&gt;Please find attached invoice #726990

Have a nice day

Rowena Pittman
Executive Director Sales Account Management Training Performance Support&lt;/strong&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--b2_be0fa65c2e77bf81d3fd1b0216e8e742&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Type: text/html; charset = &quot;iso-8859-1&quot;
Content-Transfer-Encoding: 8bit&lt;/span&gt;

&lt;strong&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;p&amp;gt;Please find attached invoice #726990&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Have a nice day&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Rowena Pittman&amp;lt;br&amp;gt;
Executive Director Sales Account Management Training Performance Support&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/strong&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--b2_be0fa65c2e77bf81d3fd1b0216e8e742--
--b1_be0fa65c2e77bf81d3fd1b0216e8e742&lt;/span&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Content-Type: application/zip; name=&quot;B1095_scan-invoice_0B0C3F.zip&quot;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=&quot;B1095_scan-invoice_0B0C3F.zip&quot;&lt;/span&gt;

&lt;strong&gt;UEsDBBQAAAAIAIRenEiR5N/wYgcAAHQTAAAKAAAAMTk0MGMwOS5qc9VYaW/TMBj+DBL/IUQC
ElYGLacoCNJr7Wh6LKVrixBKHCdxDid17oz9d+ys45IzBN+YtmWLX7/v4+c93Uwnwgha4xSe

...&lt;/strong&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--b1_be0fa65c2e77bf81d3fd1b0216e8e742--&lt;/span&gt;

&lt;span style=&quot;color:#FF0000;&quot;&gt;--B25FA81C32.1461847918/monserveur.com--&lt;/span&gt;
&lt;span style=&quot;color:#696969;&quot;&gt;*** HEADER EXTRACTED deferred/1/1430281C33 ***
named_attribute: encoding=8bit
*** MESSAGE FILE END deferred/1/1430281C33 ***&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Les lignes que j'ai mises en &lt;span style=&quot;color:#696969;&quot;&gt;gris&lt;/span&gt; ne sont pas très intéressantes : il s'agit de l'enveloppe et des informations fournies par le système qui gère la queue, intéressons-nous plutôt au reste.&lt;/p&gt;

&lt;p&gt;Les lignes en &lt;span style=&quot;color:#0000FF;&quot;&gt;bleu&lt;/span&gt; sont les en-têtes, ce sont elles qui retracent à la fois le format du message, mais aussi leur trajet à travers les différents serveurs mails qui l'ont manipulé. Comme une liste de tampons sur un passeport. Ce sont en particulier les lignes commençant par &lt;span style=&quot;color:#0000FF;&quot;&gt;Received&lt;/span&gt;, qui tracent le trajet des mails à travers les échanges entre les serveurs. La première ligne Received correspondant au dernier échange réalisé, et la dernière ligne &lt;span style=&quot;color:#0000FF;&quot;&gt;Received&lt;/span&gt; au premier échange réalisé.&lt;/p&gt;

&lt;p&gt;Dans l'en-tête on retrouve aussi l'ID du message, &lt;strong&gt;1430281C33&lt;/strong&gt;, et son parcours entre les seveurs mail. Chaque serveur par lequel le mail passe va rajouter une ligne, la première ligne correspondant au dernier serveur ayant reçu le message.&lt;/p&gt;

&lt;p&gt;Les lignes en &lt;span style=&quot;color:#FF0000;&quot;&gt;rouge&lt;/span&gt; sont ce que l'on appelle les boundaries (et leurs déclarations). Ce sont des lignes de séparation permettant de dissocier les pièces jointes du reste du message. Ici on en a plusieurs, parce qu'en fait à chaque échange, le mail s'est fait attacher à un autre mail. Ce n'est pas courant, à moins que le mail n'ai été enrichi d'informations supplémentaire après un &quot;rejet&quot; du serveur de destination. Ici, il s'est donc probablement fait &quot;jeter&quot; plusieurs fois !&lt;/p&gt;

&lt;p&gt;Commençons notre analyse par la fin du message. Le mail original contenait visiblement lui aussi une pièce jointe, et à en juger par le texte invitant à ouvrir la pièce jointe, il est fort possible que ça soit un SCAM. Un message vous invitant à ouvrir un faux fichier PDF qui va infecter l'ordinateur. Heureusement donc que ce mail n'est pas arrivé jusqu'à sa destination.&lt;/p&gt;

&lt;p&gt;Remontons un peu, on constate que le mail a été envoyé avec PHPMailer, et qu'il a été marqué en [SPAM] dans le sujet par mon filtre antispam. La première trace de l'arrivée du mail est la suivante :&lt;/p&gt;

&lt;pre&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Received: from bba148580.serveurspam.net.ae (bba148580.serveurspam.net.ae [217.165.xxx.xxx]) by monserveur.com (Postfix) with ESMTP id 774C481C27 for &amp;lt;contact@monclient.com&amp;gt;; Thu, 28 Apr 2016 14:51:44 +0200 (CEST)
Received: from www.serveurspam.net.ae ([127.0.0.1]) by AMAZONA-F00CA66 with Microsoft SMTPSVC(7.5.7601.17514); Thu, 28 Apr 2016 16:51:42 +0400&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;La ligne au-dessus, c'est la trace du passage à l'antispam et à l'antivirus :&lt;/p&gt;

&lt;pre&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Received: from localhost (localhost [127.0.0.1]) by monserveur.com (Postfix) with ESMTP id 95E2581C33 for &amp;lt;contact@monclient.com&amp;gt;; Thu, 28 Apr 2016 14:51:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at monserveur.com
Received: from monserveur.com ([127.0.0.1]) by localhost (monserveur.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8agkFLPzF_vy for &amp;lt;contact@monclient.com&amp;gt;; Thu, 28 Apr 2016 14:51:44 +0200 (CEST)&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Rien de spécial, l'antivirus et l'antispam sont installés en local et ont fait leur job dès que le message a été reçu. Continuons.&lt;/p&gt;

&lt;pre&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;X-Sieve: Pigeonhole Sieve 0.4.2
X-Sieve-Redirected-From: contact@monclient.com&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Ça c'est le mécanisme qui gère les alias de mon serveur. &lt;a href=&quot;https://fr.wikipedia.org/wiki/Sieve&quot;&gt;Sieve&lt;/a&gt; va rediriger l'adresse contact@monclient.com vers la bonne adresse de destination, l'adresse contact@monclient.com étant un alias.&lt;/p&gt;

&lt;pre&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Received: from monserveur.com ([127.0.0.1]) by localhost (monserveur.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vn_xZRLJ3EKq for &amp;lt;monclient@gmail.com&amp;gt;; Thu, 28 Apr 2016 14:51:51 +0200 (CEST)
Received: by monserveur.com (Postfix, from userid 5000) id BE51181C31; Thu, 28 Apr 2016 14:51:51 +0200 (CEST)&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;On transfère tout ça au MTA local pour envoi à la destination finale :&lt;/p&gt;

&lt;pre&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Received: from localhost (localhost [127.0.0.1]) by monserveur.com (Postfix) with ESMTP id B25FA81C32 for &amp;lt;monclient@gmail.com&amp;gt;; Thu, 28 Apr 2016 14:51:57 +0200 (CEST)&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Fin du premier message, on traverse la boundary pour voir ce qu'il s'est passé ensuite :&lt;/p&gt;

&lt;pre&gt;
&lt;strong&gt;&amp;lt;monclient@gmail.com&amp;gt;: host gmail-smtp-in.l.google.com[2a00:1450:400c:xxxx::xxxx] said: 552-5.7.0 This message was blocked because its content presents a potential 552-5.7.0 security issue.&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;Ça c'est moins cool. En gros, gmail a jeté le message, parce que la pièce jointe était sans doute contaminée. Mon antivirus n'a rien vu, il va falloir chercher pourquoi (plus tard).&lt;/p&gt;

&lt;p&gt;On continue de remonter, et au-dessus de la dernière boundary, on a :&lt;/p&gt;

&lt;pre&gt;
&lt;span style=&quot;color:#00FFFF;&quot;&gt;Received: by monserveur.com (Postfix) id 1430281C33; Thu, 28 Apr 2016 14:51:58 +0200 (CEST)&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Ok, gmail m'a renvoyé le message plus ou moins gentiement en m'expliquant qu'il n'en voulait pas, et mon serveur essaie de le transférer au spammeur original qui nous a fermé sa porte. Le mail reste donc en queue jusqu'à son expiration... Voilà pourquoi il traîne dans la queue des mails et qu'il n'a été envoyé ni par moi ni pour moi...&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;J'espère que cette courte plongée dans les en-têtes d'un mail vous a permis de vous familiariser avec le &quot;vrai&quot; contenu d'un mail.&lt;/p&gt;

&lt;p&gt;Ici je ne peux plus faire grand chose avec ce mail à part le supprimer de la queue mail, le spammeur ayant certainement déjà été bloqué par son hébergeur ou changé d'adresse IP pour continuer à envoyer sans se faire prendre par les blacklists.&lt;/p&gt;

&lt;p&gt;À bientôt pour un nouvel article. &lt;img src=&quot;/blog/themes/mathedit_material3/smilies/smile.png&quot; alt=&quot;:)&quot; class=&quot;smiley&quot;&gt;&lt;/p&gt;</description>
        
              </item>
          <item>
        <title>Diminuer le taux de rejet des mails sortants pour un fournisseur de boîtes mail</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2016/02/09/Diminuer-le-taux-de-rejet-des-mails-sortants-pour-un-fournisseur-de-bo%C3%AEtes-mail</link>
        <guid isPermaLink="false">urn:md5:de20367e11d0beb125dad9998acb8bf6</guid>
        <pubDate>Tue, 09 Feb 2016 21:06:00 +0100</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Informatique</category>
                          <category>exim</category>
                  <category>mail</category>
                  <category>postfix</category>
                  <category>serveur</category>
                <description>&lt;p&gt;En théorie, tout le monde peut s’improviser fournisseur d’emails, il suffit d’une machine avec les ports ouverts sur Internet et de quelques connaissances pour configurer le serveur mail (Postfix, Exim…)&lt;/p&gt;

&lt;p&gt;En pratique, les fournisseurs de mails subissent la «&amp;nbsp;concurrence déloyale&amp;nbsp;» de leur camarades, car envoyer un mail c’est bien, faire en sorte qu’il soit reçu c’est mieux. Les «&amp;nbsp;concurrents&amp;nbsp;» ce sont les fournisseurs de service comme Hotmail, Gmail, Yahoo, et bien d’autres. Afin de lutter contre le SPAM, ces sociétés sont de plus en plus strictes sur la source des mails qui sont reçus par leurs services.&lt;/p&gt;

&lt;p&gt;Une des conséquences c’est que les petits opérateurs, comme une start-up qui fournit de l’hébergement, un FAI associatif, ou même un particulier qui veut se réapproprier Internet, se font bloquer assez rapidement avec peu de solutions de recours, le support faisant souvent la sourde oreille.&lt;/p&gt;

&lt;p&gt;Dans cet article, je vais donc explorer quelques pistes pour vous permettre d’abord d’éviter de vous retrouver bloqués, et ensuite contourner le blocage le cas échéant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ce billet est le produit de mes expériences avec l'hébergeur &lt;a href=&quot;http://wellhosted.ch&quot;&gt;wellhosted&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;          &lt;h3&gt;Réputation (et monitoring)&lt;/h3&gt;

&lt;p&gt;Déjà, si vous avez une adresse IP dynamique, oubliez l’envoi de mails. Il est très difficile avec une IP dynamique d’assurer à la fois une réception correcte (même avec un MX pointant sur un DynDNS), et un envoi qui réussisse à tous les coups. D’ailleurs, la plupart des opérateurs proposant des IPs dynamiques bloquent le port 25, rendant l’envoi des mails «&amp;nbsp;entre serveurs&amp;nbsp;» impossible.&lt;/p&gt;

&lt;p&gt;Ensuite, la seconde bonne raison pour avoir une IP fixe, c’est que les contrôlent antispam reposent en grande partie sur la réputation des IPs qui leur envoient des mails. Ce mécanisme s’appelle le &lt;a href=&quot;https://fr.wikipedia.org/wiki/Lutte_anti-spam#RBL&quot;&gt;RBL&lt;/a&gt; pour Realtime Block List. Les serveurs s’abonnent à des listes d'adresses IP connues pour émettre du SPAM, et refusent de recevoir les mails depuis ces IPs. Pas de chance si vous avez hérité d’une IP « qui pue », il vous faudra patiemment demander votre retrait de la liste de blocage au cas par cas.&lt;/p&gt;

&lt;p&gt;Il existe des outils pour tester votre IP sur un grand nombre de RBL&amp;nbsp; : &lt;a href=&quot;http://mxtoolbox.com/blacklists.aspx&quot;&gt;mxtoolbox.com/blacklists.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vous pouvez également mettre en place une surveillance automatique de votre réputation sur plusieurs blocklists, soit &lt;a href=&quot;https://exchange.nagios.org/directory/Plugins/Email-and-Groupware/check_rbl/details&quot;&gt;avec un simple plugin Nagios&lt;/a&gt;, soit avec un outil comme &lt;a href=&quot;http://www.rblmon.com/&quot;&gt;RBLMon&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A noter que certaines listes ne permettent pas de faire «&amp;nbsp;retirer&amp;nbsp;» votre IP de la liste. Pas d’inquiétude pour ces listes, personne ne les utilise. Il existe par contre des fournisseurs de service qui ne publient pas leurs listes, et qui ont un processus contraignant pour se faire débloquer (Microsoft par exemple).&lt;/p&gt;

&lt;p&gt;Une fois que votre IP est fixe et qu'elle est propre, l’étape suivante c’est conserver la réputation de votre IP et être irréprochable sur les mails que vous envoyez, mail nous verrons cela dans la suite.&lt;/p&gt;

&lt;h3&gt;IPv6&lt;/h3&gt;

&lt;p&gt;Même si ce n’est pas indispensable, IPv6 est le futur d'Internet, et de nombreux serveurs mails parlent IPv6. En utilisant IPv6, vous aurez aussi l’avantage que beaucoup de RBL ne sont pas prêtes pour IPv6, et donc votre IP ne sera certainement pas bloquée sur ces listes.&lt;/p&gt;

&lt;p&gt;Revers de la médaille : oubliez l’utilisation d’une IPv6 exclusive, certains fournisseurs de mail utilisent encore exclusivement IPv4, il vous faudra donc une configuration réseau supportant les deux adressages pour être certain de pouvoir livrer vos mails.&lt;/p&gt;

&lt;h3&gt;Reverse, PTR, et Hostname&lt;/h3&gt;

&lt;p&gt;Le « &lt;a href=&quot;https://en.wikipedia.org/wiki/Reverse_DNS_lookup&quot;&gt;Reverse&lt;/a&gt; », parfois nommé « PTR », est une résolution DNS inverse. De la même façon qu'une résolution DNS permet de passer d'un nom de domaine à une adresse IP, le DNS inverse permet de passer d'une adresse IP à un nom de domaine. Ce mécanisme existe aussi bien pour IPv4 que pour IPv6.&lt;/p&gt;

&lt;p&gt;Si votre fournisseur de service (la personne chez qui vous louez les IPs ou les serveurs) ne vous permet pas de changer le Reverse, changez de prestataire immédiatement ! L'envoi d'un mail à partir d'une adresse IP sans Reverse est souvent rédhibitoire pour le serveur mail de destination (pas de reverse, pas de livraison).&lt;/p&gt;

&lt;p&gt;De plus, votre Reverse doit être consistant :&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;L'adresse IP doit résoudre vers un domaine, et ce même domaine doit résoudre vers l'adresse IP.&lt;/li&gt;
	&lt;li&gt;Le serveur mail doit également fournir son nom de domaine principal dans le processus de négociation, et ce nom doit résoudre correctement vers son IP. Réglez donc les &lt;strong&gt;/etc/hostname&lt;/strong&gt; ; &lt;strong&gt;/etc/mailname&lt;/strong&gt; et &lt;strong&gt;myhostname&lt;/strong&gt; (pour Postfix) correctement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Une inconsistance à un quelconque niveau est pire qu'une absence de reverse : le serveur de destination considérera qu'il y a peut-être usurpation de l'IP.&lt;/p&gt;

&lt;p&gt;Encore une fois, n'oubliez pas de régler aussi le reverse IPv6 si vous utilisez IPv6 sur votre serveur.&lt;/p&gt;

&lt;h3&gt;Postmaster, Hostmaster, et RFC&lt;/h3&gt;

&lt;p&gt;Certains serveurs mails sont un peu soupe au lait. Par exemple, il peut arriver que votre réputation descende en flèche juste parce que le propriétaire du serveur n’a pas de moyen automatisé de vous contacter.&lt;/p&gt;

&lt;p&gt;J’explique : dans les &lt;a href=&quot;https://fr.wikipedia.org/wiki/Request_for_comments&quot;&gt;RFC&lt;/a&gt; (Request For Comment, la base des normes et protocoles sur Internet), il est prévu qu’un serveur mail émettant du courrier possède des adresses particulières, à savoir &lt;a href=&quot;mailto:postmaster@ledomaine.com&quot;&gt;postmaster@ledomaine.com&lt;/a&gt; et &lt;a href=&quot;mailto:hostmaster@ledomaine.com&quot;&gt;hostmaster@ledomaine.com&lt;/a&gt; permettant de recevoir les mails envoyés automatiquement par ses pairs.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;postmaster&lt;/strong&gt; recevra principalement les plaintes pour SPAM, notification de traffic inhabituel sur les mails, et autres requêtes relatives aux mails&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;hostmaster&lt;/strong&gt; recevra les mails relatifs à la gestion du nom de domaine lui-même (demandes de transfert, contact légal du propriétaire - même si on préfère souvent écrire aux contacts du whois), ou parfois pour la réservation d’un certificat SSL (vérification de la propriété du nom de domaine avant délivrance automatique du certificat).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;L’absence d’une adresse postmaster@ valide sur votre serveur vous fait donc paraître pour le serveur mail de destination comme un spammeur qui n’a même pas pris la peine d’implémenter correctement le protocole mail.&lt;/p&gt;

&lt;p&gt;A noter qu’un alias de postmaster@&amp;nbsp;vers une adresse de votre choix fonctionne aussi, même si cette adresse est un trou noir. Mais vous ne devriez pas ignorer les notifications automatiques de blocage et de plaintes envoyées à postmaster…&lt;/p&gt;

&lt;p&gt;De la même façon, préférez un logiciel de serveur mail respectueux des standards (Postfix, Exim) au tout-dernier-serveur-mail-a-la-mode, dont les réponses ne sont peut-être pas entièrement conformes aux RFC.&lt;/p&gt;

&lt;h3&gt;Limites&lt;/h3&gt;

&lt;p&gt;Là on touche au grand dilemme du fournisseur de mails en serveur mutualisé : offrir plus de possibilités aux utilisateurs, ou se protéger contre les usages abusifs ?&lt;/p&gt;

&lt;p&gt;Concrètement, imaginons qu’un de vos utilisateurs décide d’envoyer de la publicité aux 500 adresses mail de sa liste de contacts. Les serveurs recevant un tel volume de messages d’un seul coup ne vont peut-être pas apprécier ce trafic non sollicité et encombrant (de la pub ? du SPAM ? Paf, bloqué).&lt;/p&gt;

&lt;p&gt;Pire : imaginez qu’un de vos utilisateurs se fasse pirater sa boîte mail, et devienne un émetteur de SPAM ou de virus à partir de votre serveur mail ? Vous pensez que les serveurs de destinations seront compréhensifs s’ils reçoivent des centaines de mails par seconde provenant de votre serveur mail ? Ils ne chercheront pas à comprendre : paf, bloqué.&lt;/p&gt;

&lt;p&gt;La solution dans un premier temps c’est de limiter le nombre de mails envoyés par votre serveur, par adresse et par jour. Chaque utilisateur ne devrait par exemple envoyer que 300 mails par jour. Au-delà, le compte sera bloqué en attendant que l’on détermine si c’est une utilisation légitime ou non. La limite est bien entendu à calibrer selon les utilisateurs et les services que vous voulez offrir.&lt;/p&gt;

&lt;p&gt;Il existe plusieurs solutions pour implémenter ce comportement, voici la mienne : &lt;a href=&quot;https://github.com/mpellegrin/ratelimit-policyd&quot;&gt;github.com/mpellegrin/ratelimit-policyd&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Diminuer la vitesse d’envoi&lt;/h3&gt;

&lt;p&gt;Ça peut paraître un comble au moment où l’on veut recevoir les informations le plus vite possible, et pourtant c’est souvent nécessaire pour l’envoi de mails. Afin d’éviter d’envoyer trop vite un grand volume de mail d’un coup, il peut être nécessaire de mettre en place une limite de mails sortants par seconde et par domaine de destination. Ainsi, le serveur mail de destination ne sera pas inondé sous le poids des mails à traiter, et sera plus coopératif pour les recevoir (en résumé : il ne vous bloquera pas pour usage abusif de sa bande passante).&lt;/p&gt;

&lt;p&gt;La mitigation du taux d’envoi peut être faite au moyen de simples paramètres pour le serveur mail &lt;a href=&quot;http://steam.io/2013/04/01/postfix-rate-limiting/&quot;&gt;steam.io/2013/04/01/postfix-rate-limiting/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;DKIM et SPF&lt;/h3&gt;

&lt;p&gt;Avoir un enregistrement &lt;a href=&quot;https://fr.wikipedia.org/wiki/Sender_Policy_Framework&quot;&gt;SPF&lt;/a&gt; valide pour le domaine avec lequel vous envoyez vos mails est pratiquement obligatoire : non seulement cela vous permettra de confirmer que le serveur qui envoie vos mails y est bien autorisé, mais cela vous protégera (un peu) contre les usurpations d'adresses mail. Un exemple de SPF serait :&lt;/p&gt;

&lt;pre&gt;
v=spf1 +a +mx -all&lt;/pre&gt;

&lt;p&gt;Si vous voulez un effet positif maximal, préférez un réglage strict (&quot;-all&quot;) au réglage de debug (&quot;?all&quot;), quitte à élargir votre jeu de règles en insérant toutes vos IPs. Par contre, ne mettez pas un TTL trop haut sur les enregistrements SPF, on ne sait jamais.&lt;/p&gt;

&lt;p&gt;Attention également, pour configurer votre domaine, &lt;a href=&quot;https://mxtoolbox.com/problem/spf/spf-record-deprecated&quot;&gt;le champ de type &quot;SPF&quot; est obsolète&lt;/a&gt;, utilisez un champ de type TXT pour vos enregistrements SPF.&lt;/p&gt;

&lt;p&gt;En complément au mécanisme SPF, parce que le SPF n'est pas toujours suffisant pour assurer au serveur de destination que le mail est légitime, vous pouvez mettre en place le &lt;a href=&quot;https://fr.wikipedia.org/wiki/DomainKeys_Identified_Mail&quot;&gt;DKIM&lt;/a&gt; pour tous vos mails sortants. La configuration est plus complexe, mais elle vaut largement le coup pour vous faire sortir de l'ornière d'une réputation trop faible de votre adresse IP dans les premiers mois.&lt;/p&gt;

&lt;p&gt;Le principe du DKIM c'est d'ajouter une signature aux mails, cette signature étant calculée à partir d'une clef privée. La clef publique est quant à elle publiée dans un enregistrement TXT dans le nom de domaine, permettant au serveur recevant le mail de vérifier la validité de la signature, et donc la légitimité du message envoyé à partir du nom de domaine.&lt;/p&gt;

&lt;h3&gt;Smarthosts&lt;/h3&gt;

&lt;p&gt;Si finalement tout ce dont j'ai parlé plus haut n'a pas fonctionné, et que vous vous êtes fait bloquer sur le réseau d'un des grands fournisseurs de boîtes mail (Google, Microsoft, yahoo...), voici votre dernier recours.&lt;/p&gt;

&lt;p&gt;Outre changer d'adresse IP, ce qui pose souvent d'autres problèmes, votre solution c'est d'utiliser un Smarthost. Le Smarthost, c'est tout simplement un serveur mail qui transfère des mails. C'est ce que l'on appelle aussi un relay mail, qui va renvoyer tous vos mails à la place de votre serveur bloqué.&lt;/p&gt;

&lt;p&gt;Dans l'idéal vous devriez avoir plusieurs smarthosts, pour pouvoir répartir la charge de traitement, et les échanger lorsque l'adresse IP de l'un d'eux se fait bloquer. Ainsi vous ne touchez pas à vos MX, et vous avez un réseau permettant de faire sortir des mails indépendemment de votre réseau de réception.&lt;/p&gt;

&lt;p&gt;Le routage vers le Smarthost se règle très simplement dans Postfix, &lt;a href=&quot;http://postfix.traduc.org/index.php/STANDARD_CONFIGURATION_README.html&quot;&gt;en utilisant la directive &lt;strong&gt;transport_maps&lt;/strong&gt; de Postfix&lt;/a&gt; et en configurant un second serveur mail (le smarthost) en mode Relay.&lt;/p&gt;

&lt;p&gt;Attention cependant au moment de créer votre smarthost à ne pas créer de configuration en &quot;Open Relay&quot;, qui permettrait à n'importe qui d'envoyer des mails à travers le smarthost, la sentence sera immédiate lorsque des spammeurs s'en apercevront. Réglez bien votre &lt;strong&gt;mynetwork&lt;/strong&gt;, et &lt;strong&gt;sender_restrictions&lt;/strong&gt; (&lt;a href=&quot;http://www.postfix.org/SMTPD_ACCESS_README.html#global&quot;&gt;par exemple avec Postfix&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;Pour aller plus loin&lt;/h3&gt;

&lt;p&gt;Voici une liste d'outils assez pratique lorsque l'on configure ou que l'on cherche la cause d'un problème de délivrance sur un serveur mail :&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://www.mail-tester.com/&quot;&gt;Mail Tester&lt;/a&gt; (indispensable pour vérifier votre configuration)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://mxtoolbox.com&quot;&gt;MXToolbox&lt;/a&gt; (le couteau suisse des tests sur les serveurs mails)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://support.google.com/mail/answer/81126?hl=fr&quot;&gt;Quelques conseils de Google&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quelques liens pour (essayer de) se faire retirer de la Blocklist :&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://postmaster.live.com/snds/index.aspx&quot;&gt;Pour se faire dé-bannir par Microsoft&lt;/a&gt; (sans garanties...)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://support.google.com/mail/contact/bulk_send_new?hl=en&amp;amp;rd=1&quot;&gt;Pour se faire dé-bannir par Google&lt;/a&gt; (sans garanties)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html&quot;&gt;Pour se faire débannir par Yahoo&lt;/a&gt; (sans garanties)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://postmaster.aol.com/whitelist-request&quot;&gt;Pour se faire débannir par AOL&lt;/a&gt; (sans garanties)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Les programmes de monitoring de réputation :&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://postmaster.google.com&quot;&gt;Google Postmaster Tools&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://sendersupport.olc.protection.outlook.com/pm/services.aspx&quot;&gt;Services de Microsoft&lt;/a&gt;, dont :
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;https://sendersupport.olc.protection.outlook.com/snds/&quot;&gt;Outlook.com Smart Network Data Services (SNDS)&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;https://sendersupport.olc.protection.outlook.com/snds/JMRP.aspx&quot;&gt;Junk Mail Report Program (JMRP)&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://help.yahoo.com/kb/postmaster/sign-manage-yahoo-complaint-feedback-loop-program-sln3438.html?guce_referrer=aHR0cHM6Ly9oZWxwLnlhaG9vLmNvbS9rYi9wb3N0bWFzdGVyLz9ndWNlX3JlZmVycmVyPWFIUjBjSE02THk5M2QzY3VjWGRoYm5RdVkyOXRMdyZndWNlX3JlZmVycmVyX3NpZz1BUUFBQUxFa3d6SjZia2U1LWgtOHExaWtkd3prNmJYUFRtdV81bDZHcVlWbHBjcVVNNm5PNDRlRDZFN0F0TmtjdjlUTmxJSHE0RWlJTC0tbjgteGRyNjVueXEyZUdnQmFrYlFhWjdKa0hLbzg5cFlZdVRoS19waFRfZG9qWFkxaFV0NnlUakhYMW5sZEdhY0J2ZTZwNzFmaUdvdTkxS2U2YkRXLXJBdzhjSjJhT1FiQiZfZ3VjX2NvbnNlbnRfc2tpcD0xNTk3MTg3Mzk3&amp;amp;guce_referrer_sig=AQAAADXcyLkhrnEIWxifEsj79itT56DobcqMVN0QwUcHJzVyohNuP5BfaUg_mtqZ60g_-s7a_L2QHy7IwWqA9NHXmzTnBFSmAGIBh67-9hFpKz63Kb3ojU1XzLWuHWKK1YQiwWZiJogj1Ij6bYWhR2o8cu8--JvB2O9XEoIv8oh2w2US&amp;amp;_guc_consent_skip=1597187419&quot;&gt;Yahoo Complaint Feedback Loop (CFL)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
        
              </item>
          <item>
        <title>Postfix : configure postmaster, hostmaster, and abuse catchall  for RFC compliance</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2015/08/29/Postfix-%3A-configure-postmaster%2C-hostmaster%2C-and-abuse-catchall-for-RFC-compliance</link>
        <guid isPermaLink="false">urn:md5:2236b92a9adc8066108e9709c6c32959</guid>
        <pubDate>Sat, 29 Aug 2015 18:02:00 +0200</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Hacks</category>
                          <category>catchall</category>
                  <category>debian</category>
                  <category>mail</category>
                  <category>postfix</category>
                  <category>server</category>
                <description>          &lt;p&gt;This short howto will show you how to set up a catchall for common required email addresses. Some mail servers are testing if mail is accepted on this addresses to detect spammymail servers. Hostmaster address can also be used for domain Trading, to check the ownership of the domain.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1. &lt;/strong&gt;Create a file named &lt;strong&gt;/etc/postfix/regexp-catchall.cf&lt;/strong&gt; with the following content:&lt;/p&gt;&lt;pre&gt;# Catchall to comply with RFC standards
/^postmaster@/    youshouldreadit@mydomain.com
/^hostmaster@/    youshouldreadit@mydomain.com
/^abuse@/         youshouldreadit@mydomain.com&lt;/pre&gt;&lt;p&gt;Replace &lt;em&gt;youshouldreadit@mydomain.com&lt;/em&gt; with a mail address you actually read.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Open &lt;strong&gt;/etc/postfix/main.cf&lt;/strong&gt; and locate (or create) the line &lt;strong&gt;virtual_alias_maps&lt;/strong&gt;, and add at the end &lt;strong&gt;regexp:/etc/postfix/regexp-catchall.cf&lt;/strong&gt;, for instance:&lt;/p&gt;&lt;pre&gt;virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, regexp:/etc/postfix/regexp-catchall.cf&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;3. &lt;/strong&gt;Restart Postfix.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Warning&amp;#160;: read &lt;a href=&quot;http://uname.pingveno.net/blog/index.php/post/2015/08/29/Postfix-%3A-configure-postmaster%2C-hostmaster%2C-and-abuse-catchall-for-RFC-compliance#c73895&quot;&gt;comment #4&lt;/a&gt; for issues with this setup&lt;/strong&gt;.&lt;/p&gt;</description>
        
              </item>
          <item>
        <title>Configure sender rate limits to prevent spam, using cluebringer (policyd) with Postfix</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2015/03/11/Configure-sender-rate-limits-to-prevent-spam%2C-using-cluebringer-%28policyd%29-with-Postfix</link>
        <guid isPermaLink="false">urn:md5:11c6569b7382d3cd707a41e60deae65c</guid>
        <pubDate>Fri, 13 Mar 2015 09:18:00 +0100</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Hacks</category>
                          <category>cluebringer</category>
                  <category>debian</category>
                  <category>mail</category>
                  <category>policyd</category>
                  <category>postfix</category>
                  <category>server</category>
                <description>&lt;p&gt;This small how-to will show you how to configure cluebringer (aka policyd) to set a per-hour/per-user limit for sent mails. Note that sending to multiple recipient will count like multiple mails were sent.&lt;/p&gt;

&lt;p&gt;This how-to is Debian-oriented but should apply to any unix operating system.&lt;/p&gt;          &lt;h3&gt;Requirements&lt;/h3&gt;

&lt;p&gt;A mail server with Postfix installed.&lt;/p&gt;

&lt;h3&gt;Installation&lt;/h3&gt;

&lt;p&gt;Install a DBMS (MySQL for instance), cluebringer, and cluebringer-webui&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
apt-get install mysql-server cluebringer cluebringer-mysql cluebringer-webui&lt;/pre&gt;

&lt;p&gt;Note that cluebringer-webui will install apache as a dependency if you don&amp;#8217;t already have a webserver.&lt;/p&gt;

&lt;h3&gt;Set-up the Cluebringer database&lt;/h3&gt;

&lt;p&gt;Get the initial database schema that correspond to your DBMS, for instance mysql&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
cp /usr/share/doc/postfix-cluebringer/database/policyd-db.mysql.gz ~/ &amp;amp;&amp;amp; gunzip ~/policyd-db.mysql.gz&lt;/pre&gt;

&lt;p&gt;Create the database, and populate it with the initial dump&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
# cd  ~/ &amp;amp;&amp;amp; mysql -u root -p
mysql&amp;gt; CREATE DATABASE cluebringer;
mysql&amp;gt; CREATE USER 'cluebringer'@'localhost' IDENTIFIED BY 'mypassword';
mysql&amp;gt; GRANT ALL PRIVILEGES ON cluebringer.* TO 'cluebringer'@'localhost';
mysql&amp;gt; \. policyd-db.mysql
mysql&amp;gt; quit
mysql&amp;gt; Bye
&lt;/pre&gt;

&lt;p&gt;Note that on Debian I had to modify the dump to make it work, &lt;em&gt;TYPE=InnoDB&lt;/em&gt; was rejected by MySQL as an invalid syntax.&lt;/p&gt;

&lt;h3&gt;Configure Cluebringer&lt;/h3&gt;

&lt;p&gt;Add your DBMS credentials to the file &lt;strong&gt;/etc/cluebringer/cluebringer.conf&lt;/strong&gt;&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
DSN=DBI:mysql:dbname=cluebringer;host=localhost

DB_Type=mysql
DB_Host=localhost
DB_Port=3306
DB_Name=cluebringer
Username=cluebringer
Password=mypassword&lt;/pre&gt;

&lt;p&gt;And start it&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
service postfix-cluebringer start&lt;/pre&gt;

&lt;h3&gt;Configure Cluebringer webui&lt;/h3&gt;

&lt;p&gt;Configure the file &lt;strong&gt;/etc/cluebringer/cluebringer-webui.conf&lt;/strong&gt; with your DBMS credentials&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;?php

$DB_DSN=&quot;mysql:host=localhost;dbname=cluebringer&quot;;
$DB_USER=&quot;cluebringer&quot;;
$DB_PASS=&quot;mypassword&quot;;&lt;/pre&gt;

&lt;p&gt;Cluebringer Webui needs a web server to run. Copy the sample configuration from the package documentation&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
cp /usr/share/doc/postfix-cluebringer-webui/examples/httpd/cluebringer-httpd.conf /etc/apache2/conf.d/&lt;/pre&gt;

&lt;p&gt;Restart Apache&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
service apache2 restart&lt;/pre&gt;

&lt;p&gt;You may need to adjust a few things to access it from the outside. If you a really lazy, just make a ssh tunnel to access the webserver from localhost&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
ssh -L 8008:localhost:80 mylogin@mymailserver&lt;/pre&gt;

&lt;p&gt;Don&amp;#8217;t forget&amp;#160;: you have to make this tunnel from the outside, do not run this command on server, it won&amp;#8217;t work.&lt;/p&gt;

&lt;p&gt;You should now be able to open http://localhost:8080/ and see your fresh new Cluebinger Webui&amp;#160;!&lt;/p&gt;

&lt;h3&gt;Configure Cluebringer using its webui&lt;/h3&gt;

&lt;h4&gt;Add a policy&lt;/h4&gt;

&lt;p&gt;Under &lt;strong&gt;Policies&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Main&lt;/strong&gt;, disable Test policy (select policy and choose &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Change&lt;/strong&gt; and switch &lt;strong&gt;Disabled&lt;/strong&gt; to &lt;strong&gt;yes&lt;/strong&gt;, validate)&lt;/p&gt;

&lt;p&gt;Add a new policy&amp;#160;: &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Add&lt;/strong&gt;, give it a name and a description&lt;/p&gt;

&lt;p&gt;Activate your new policy&amp;#160;: select policy and choose &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Change&lt;/strong&gt; (switch &lt;strong&gt;Disabled&lt;/strong&gt; to &lt;strong&gt;no&lt;/strong&gt;)&lt;/p&gt;

&lt;p&gt;Add a new member to your policy&amp;#160;: select it and choose &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Members&lt;/strong&gt;, and then &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Add&lt;/strong&gt;. Specify &lt;strong&gt;any&lt;/strong&gt; as source and &lt;strong&gt;any&lt;/strong&gt; as destination.&lt;/p&gt;

&lt;p&gt;Go back to your policy, choose &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Members&lt;/strong&gt;, and the select your member, do &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Change&lt;/strong&gt;, and activate your new member (switch &lt;strong&gt;Disabled&lt;/strong&gt; to &lt;strong&gt;no&lt;/strong&gt;).&lt;/p&gt;

&lt;h4&gt;Add a quota&lt;/h4&gt;

&lt;p&gt;Under &lt;strong&gt;Quotas&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Configure&lt;/strong&gt;, disable Test quotas.&lt;/p&gt;

&lt;p&gt;Add a new quota&amp;#160;: Choose &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Add&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Name&amp;#160;: whatever you want&lt;/li&gt;
	&lt;li&gt;Track&amp;#160;: &lt;strong&gt;user@domain&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Period (seconds)&amp;#160;: &lt;strong&gt;3600&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Link to policy&amp;#160;: specify the policy you created here&lt;/li&gt;
	&lt;li&gt;Verdict&amp;#160;: &lt;strong&gt;Defer&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Data&amp;#160;: set a custom error message here&lt;/li&gt;
	&lt;li&gt;Comment&amp;#160;: whatever you want&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Activate your quota&amp;#160;: switch &lt;strong&gt;Disabled&lt;/strong&gt; to &lt;strong&gt;no&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Add a limit to your quota&amp;#160;: select your quota, and choose &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Limits&lt;/strong&gt;, then &lt;strong&gt;Action&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Add&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Type&amp;#160;: &lt;strong&gt;MessageCount&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Counter Limit&amp;#160;: &lt;strong&gt;200&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Activate your limit&amp;#160;: switch &lt;strong&gt;Disabled&lt;/strong&gt; to &lt;strong&gt;no&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;Configure Postfix to call Cluebringer for each mail sent&lt;/h3&gt;

&lt;p&gt;Open &lt;strong&gt;/etc/postfix/main.cf&lt;/strong&gt; and locate the line &lt;strong&gt;smtpd_sender_restrictions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Add &lt;strong&gt;check_policy_service inet:127.0.0.1:10031&lt;/strong&gt; at the end of the line, for instance&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf&lt;strong&gt;, check_policy_service inet:127.0.0.1:10031&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;If the line does not exists, simply add it.&lt;/p&gt;

&lt;p&gt;Don&amp;#8217;t forget to restart Postfix&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
service postfix restart&lt;/pre&gt;

&lt;h3&gt;Check your config&lt;/h3&gt;

&lt;p&gt;You can now send some mails to see what happens. To check if these mails are passed to Cluebringer, connect to MySQL as the cluebringer user&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
# mysql -u cluebringer -p cluebringer&lt;/pre&gt;

&lt;p&gt;And execute the query&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
mysql&amp;gt; SELECT * FROM quotas_tracking;&lt;/pre&gt;

&lt;p&gt;You should see the value LastUpdate and Counter updating when sending a mail. Note that sending to multiple recipient will count like multiple mails were sent.&lt;/p&gt;

&lt;h3&gt;Pitfalls, bleeding edges, etc&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Cluebringer versions prior to 2.1.x does not support IPv6&lt;/strong&gt;, your customers won&amp;#8217;t be able to send any mail if they have an IPv6 connection.&lt;/p&gt;

&lt;p&gt;Unfortunately, the Debian stable version (wheezy) provides Cluebringer 2.0.10 within its repositories, as well as the experimental release of Debian (sid). As an alternative, you should consider &lt;a href=&quot;http://wiki.policyd.org/download&quot;&gt;installing the 2.1.x experimental Cluebringer&lt;/a&gt; from official website instead of Debian packages from repositories.&lt;/p&gt;

&lt;h3&gt;References&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://wiki.policyd.org/installing&quot; hreflang=&quot;en&quot;&gt;Installing Policyd&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://imanudin.net/2014/09/09/zimbra-tips-how-to-configure-rate-limit-sending-message-on-policyd/&quot; hreflang=&quot;en&quot;&gt;Configuring Policyd for Zimbra&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://jrklein.com/2014/03/09/debian-wheezy-postfix-cluebringer-policyd-v2-ipv6/&quot; hreflang=&quot;en&quot;&gt;Debian, Cluebringer, IPv6&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
        
              </item>
          <item>
        <title>Configure Postfix as standalone single-domain SMTP server using Unix users and PAM on Debian</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2014/02/01/Configure-Postfix-as-STMP-standalone-single-domain-server-using-Unix-users-and-PAM-on-Debian</link>
        <guid isPermaLink="false">urn:md5:e8f08f8049c5bf438f9d352254044c7f</guid>
        <pubDate>Sat, 01 Feb 2014 22:05:00 +0100</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Hacks</category>
                          <category>debian</category>
                  <category>mail</category>
                  <category>note</category>
                  <category>pam</category>
                  <category>postfix</category>
                  <category>sasl</category>
                  <category>server</category>
                <description>          &lt;p&gt;Here is a quick setup to configure Postfix mail server, using existing Unix users.&lt;/p&gt;

&lt;p&gt;The server will process mails for only one domain, and every existing user on the server will have a mail box inside his home directory.&lt;/p&gt;

&lt;h3&gt;Abstract&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Postfix&lt;/strong&gt; is an &lt;strong&gt;SMTP&lt;/strong&gt; server, it receives incoming mail from other &lt;strong&gt;SMTP&lt;/strong&gt; servers, and allows client to send mails to other &lt;strong&gt;SMTP&lt;/strong&gt; servers.&lt;/p&gt;

&lt;p&gt;What we don't want is an open mail relay. A mail relay is a &lt;strong&gt;SMTP&lt;/strong&gt; server that take anything from any client, and send it to any &lt;strong&gt;SMTP&lt;/strong&gt; server. We only want trusted users to send emails, to prevent anonymous clients from sending spam.&lt;/p&gt;

&lt;p&gt;Incoming mail will be processed either if :&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;The domain name of one of the recipient matches the mail server domain, and the mail user name is also a system user (&lt;strong&gt;SMTP&lt;/strong&gt; servers can send us incoming mails).&lt;/li&gt;
	&lt;li&gt;The client who tries to sends the mail has successfully authenticated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Postfix&lt;/strong&gt; authentication for clients can be handled by &lt;strong&gt;SASL&lt;/strong&gt;. &lt;strong&gt;SASL&lt;/strong&gt; is a standard protocol to provide an authentication layer. It can query &lt;strong&gt;PAM&lt;/strong&gt;, or other authentication providers (MySQL users, etc).&lt;/p&gt;

&lt;p&gt;Notes :&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;em&gt;We will use PAM for Unix users SMTP authentication.&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;Unix users are stored in&lt;code&gt; /etc/passwd&lt;/code&gt; and their passwords are stored in &lt;code&gt;/etc/shadow&lt;/code&gt;&lt;/em&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;Mails will be stored in the ~/Maildir/ of each users, in Maildir format.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Postfix : installation and configuration&lt;/h3&gt;

&lt;p&gt;Install Postfix : &lt;code&gt;apt-get install postfix&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Answer the questions during installation to setup your mail domain (the &quot;example.com&quot; in user@example.com).&lt;/p&gt;

&lt;p&gt;Modify config files :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;/etc/postfix/main.cf&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;Configure TLS and Maildir :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;# TLS parameters&lt;br /&gt;
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key&lt;br /&gt;
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem&lt;br /&gt;
smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt&lt;br /&gt;
smtpd_use_tls=yes&lt;br /&gt;
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache&lt;br /&gt;
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache&lt;br /&gt;
&lt;br /&gt;
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for&lt;br /&gt;
# information on enabling SSL in the smtp client.&lt;br /&gt;
&lt;br /&gt;
myhostname = mail.example.com&lt;br /&gt;
alias_maps = hash:/etc/aliases&lt;br /&gt;
alias_database = hash:/etc/aliases&lt;br /&gt;
myorigin = /etc/mailname&lt;br /&gt;
mydestination = example.com, localhost&lt;br /&gt;
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128&lt;br /&gt;
mailbox_size_limit = 0&lt;br /&gt;
recipient_delimiter = +&lt;br /&gt;
&lt;br /&gt;
home_mailbox = Maildir/&lt;br /&gt;
&lt;br /&gt;
# These are the &quot;no relay&quot; restrictions&lt;br /&gt;
smtpd_recipient_restrictions = permit_mynetworks permit_inet_interfaces permit_sasl_authenticated reject_unauth_destination&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;/etc/postfix/master.cf&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;Enable TLS and alternate (submission) ports :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;submission inet n&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; smtpd&lt;br /&gt;
&amp;nbsp; -o syslog_name=postfix/submission&lt;br /&gt;
&amp;nbsp; -o smtpd_tls_security_level=encrypt&lt;br /&gt;
&amp;nbsp; -o smtpd_sasl_auth_enable=yes&lt;br /&gt;
&amp;nbsp; -o smtpd_client_restrictions=permit_sasl_authenticated,reject&lt;br /&gt;
&amp;nbsp; -o milter_macro_daemon_name=ORIGINATING&lt;br /&gt;
smtps&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet&amp;nbsp; n&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; smtpd&lt;br /&gt;
&amp;nbsp; -o syslog_name=postfix/smtps&lt;br /&gt;
&amp;nbsp; -o smtpd_tls_wrappermode=yes&lt;br /&gt;
&amp;nbsp; -o smtpd_sasl_auth_enable=yes&lt;br /&gt;
&amp;nbsp; -o smtpd_client_restrictions=permit_sasl_authenticated,reject&lt;br /&gt;
&amp;nbsp; -o milter_macro_daemon_name=ORIGINATING&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;SASL : installation and configuration&lt;/h3&gt;

&lt;p&gt;SASL plugin for Postfix (Cyrus) is part of the dependencies of Postfix server.&lt;/p&gt;

&lt;p&gt;Install SASL administration tools : &lt;code&gt;apt-get install sasl2-bin&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Enable SASL daemon at startup : edit &lt;strong&gt;/etc/default/saslauthd&lt;/strong&gt; and switch &lt;code&gt;START&lt;/code&gt; to &lt;code&gt;yes&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Start it manually for the first time : &lt;code&gt;service saslauthd start&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;Enable PAM authentication for SASL&lt;/h3&gt;

&lt;p&gt;Check that PAM is part of the MECHANISMS variable in &lt;strong&gt;/etc/default/saslauthd&lt;/strong&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;MECHANISMS=&quot;pam&quot;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create &lt;strong&gt;/etc/pam.d/smtp&lt;/strong&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;#&lt;br /&gt;
# /etc/pam.d/smtp - specify PAM SMTP behavior&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
@include common-auth&lt;br /&gt;
@include common-account&lt;br /&gt;
@include common-password&lt;br /&gt;
@include common-session&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Enable SASL for Postfix&lt;/h3&gt;

&lt;p&gt;Add to &lt;strong&gt;/etc/postfix/main.cf&lt;/strong&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;smtpd_sasl_auth_enable = yes&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create &lt;strong&gt;/etc/postfix/sasl/smtpd.conf&lt;/strong&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;pwcheck_method: saslauthd&lt;br /&gt;
mech_list: PLAIN LOGIN&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Adjust &lt;code&gt;OPTIONS&lt;/code&gt; in &lt;strong&gt;/etc/default/saslauthd&lt;/strong&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;OPTIONS=&quot;-c -m /var/spool/postfix/var/run/saslauthd&quot;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Add &lt;strong&gt;postfix user&lt;/strong&gt; to &lt;strong&gt;sasl group&lt;/strong&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;adduser postfix sasl&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Configuration check&lt;/h3&gt;

&lt;p&gt;Restart all services (postfix, salsauthd).&lt;/p&gt;

&lt;p&gt;Try authentication using SASL : &lt;code&gt;testsaslauthd -u user -p password&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Try authentication from command line, without mail client : &lt;a href=&quot;https://qmail.jms1.net/test-auth.shtml&quot; hreflang=&quot;en&quot;&gt;https://qmail.jms1.net/test-auth.shtml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try SMTP reception by sending mail to your domain (your MX fields in domain has to be configured accordingly).&lt;/p&gt;

&lt;h3&gt;Sources&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.postfix.org/SASL_README.html#saslauthd&quot; hreflang=&quot;en&quot;&gt;Postfix SASL Howto&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.postfix.org/SASL_README.html#testing_saslauthd&quot; hreflang=&quot;en&quot;&gt;Testing SASL auth&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.ntrippy.net/2008/05/warning-sasl-authentication-failure.html&quot; hreflang=&quot;en&quot;&gt;Fixing SASL authentication failure: cannot connect to saslauthd server: No such file or directory&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.faqforge.com/linux/how-to-enable-port-587-submission-in-postfix/&quot; hreflang=&quot;en&quot;&gt;How to enable submission ports in Postfix&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://www.howtoforge.com/community/threads/cannot-connect-to-saslauthd-server-permission-denied.22730/&quot; hreflang=&quot;en&quot;&gt;Cannot connect to saslauthd : permission denied&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
        
              </item>
      </channel>
</rss>
