# Postfix / Dovecot : 54% rejected !

**URL:** <https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372>\
**Category:** Support Debian\
**Created:** [Avril 12, 2018, 7:00 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372 "2018-04-12T07:00:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 12, 2018, 7:00 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/1 "2018-04-12T07:00:03Z")

</div>

Hello,

Tous les jours, je reçois une copie d’un **usr/sbin/pflogsumm -d today /var/log/mail.log**. Usuellement, le taux de rejected est de 2% à 10%, mais depuis une ou deux semaines, on est passé de 20% à 54% dès ce matin !

Là je commence à sérieusement m’inquiéter car je n’arrive pas à identifier où est le problème dans la mesure où en dehors des mails dont les destinataires ne sont pas bons (ça il y en a quelqu’uns et je les sors régulièrement de notre base de mail), je ne comprends pas pourquoi ce taux explose comme ça.

J’ai tout récemment mis en place une règle d’auto apprentissage de SpamAssassin dans une cron ( **00 02 \* \* \* /usr/bin/sa-learn --spam /var/spool/mail/vhosts/mesdomaines._/_/mail/.Spam/cur** ), est-ce que ce serait lié à ça ?

Voilà le rapport rien que pour ce matin :

```nohighlight
 /usr/sbin/pflogsumm -d today /var/log/mail.log
Postfix log summaries for Apr 12

Grand Totals
------------
messages

    257 received
    436 delivered
      0 forwarded
     22 deferred (132 deferrals)
      0 bounced
    521 rejected (54%)
      0 reject warnings
      0 held
      0 discarded (0%)

  48567k bytes received
  77210k bytes delivered
     39 senders
     16 sending hosts/domains
    183 recipients
     32 recipient hosts/domains

Per-Hour Traffic Summary
------------------------
    time received delivered deferred bounced rejected
    --------------------------------------------------------------------
    0000-0100 38 39 19 0 58
    0100-0200 3 3 22 0 58
    0200-0300 9 13 16 0 58
    0300-0400 3 7 15 0 58
    0400-0500 54 119 9 0 59
    0500-0600 4 4 13 0 58
    0600-0700 27 81 10 0 60
    0700-0800 23 69 13 0 59
    0800-0900 96 101 15 0 53
    0900-1000 0 0 0 0 0
    1000-1100 0 0 0 0 0
    1100-1200 0 0 0 0 0
    1200-1300 0 0 0 0 0
    1300-1400 0 0 0 0 0
    1400-1500 0 0 0 0 0
    1500-1600 0 0 0 0 0
    1600-1700 0 0 0 0 0
    1700-1800 0 0 0 0 0
    1800-1900 0 0 0 0 0
    1900-2000 0 0 0 0 0
    2000-2100 0 0 0 0 0
    2100-2200 0 0 0 0 0
    2200-2300 0 0 0 0 0
    2300-2400 0 0 0 0 0

```

[…]

```nohighlight
 **Ici je n'ai pas pu tout mettre, mais voici un échantillon (tous les defered sont là par contre)**
Host/Domain Summary: Message Delivery
--------------------------------------
 sent cnt bytes defers avg dly max dly host/domain
 -------- ------- ------- ------- ------- -----------
     81 9058k 0 25.4 s 4.6 m gmail.com
     57 7121k 0 19.7 s 5.3 m orange.fr
     30 294031 0 31.3 s 4.0 m wanadoo.fr
     19 1470k 0 18.9 s 4.8 m free.fr
     14 2740k 87 24.2 h 60.8 h laposte.net
      4 8887 0 1.3 m 5.0 m hotmail.com
      2 92895 0 5.7 s 7.9 s protonmail.com
      2 12348 0 4.5 s 5.9 s numericable.fr
      2 12348 0 1.7 s 3.0 s bbox.fr
      2 12348 0 3.3 s 3.6 s outlook.com
      0 0 16 0.0 s 16.5 h gmail.co
      0 0 8 0.0 s 116.8 h gmail.fr

message deferral detail
-----------------------
  error (total: 53)
        34 4.3.2 All server ports are busy
        19 4.3.2 No system resources
  smtp (total: 81)
        26 4.3.2 All server ports are busy
        23 Relay access denied (in reply to RCPT TO command
         7 4.3.2 No system resources
         6 gmail.co[216.58.204.133]:25: Connection timed out
         4 gmail.co[216.58.213.165]:25: Connection timed out
         3 gmail.fr[216.58.209.229]:25: Connection timed out
         2 gmail.co[216.58.204.101]:25: Connection timed out
         2 gmail.fr[216.58.204.133]:25: Connection timed out
         2 gmail.co[216.58.201.229]:25: Connection timed out
         2 gmail.fr[216.58.201.229]:25: Connection timed out
         1 gmail.fr[216.58.213.165]:25: Connection timed out
         1 4.7.1 Service unavailable - try again later (in reply to e...
         1 gmail.co[216.58.209.229]:25: Connection timed out
         1 gmail.co[74.125.206.83]:25: Connection timed out

message bounce detail (by relay): none

message reject detail
---------------------
  RCPT
    Helo command rejected: Host not found (total: 536)
         **520 sfr.net**
           8 eusalud.com
           8 ibxhre06.i-bp.banquepopulaire.fr

message reject warning detail: none

message hold detail: none

message discard detail: none

smtp delivery failures: none

Warnings
--------
  smtpd (total: 112)
        14 125.242.12.80.zen.spamhaus.org: RBL lookup error: Host or domai...
        14 orange.fr.zen.spamhaus.org: RBL lookup error: Host or domain na...
        10 82.188.26.109.zen.spamhaus.org: RBL lookup error: Host or domai...
         7 gmail.com.zen.spamhaus.org: RBL lookup error: Host or domain na...
         7 dmarc.yahoo.com.zen.spamhaus.org: RBL lookup error: Host or dom...
         6 62.190.48.181.zen.spamhaus.org: RBL lookup error: Host or domai...
         6 19.95.108.217.zen.spamhaus.org: RBL lookup error: Host or domai...
         4 wanadoo.fr.zen.spamhaus.org: RBL lookup error: Host or domain n...
         2 70.185.163.66.zen.spamhaus.org: RBL lookup error: Host or domai...
         2 251.189.163.66.zen.spamhaus.org: RBL lookup error: Host or doma...
         2 251.190.163.66.zen.spamhaus.org: RBL lookup error: Host or doma...
         2 131.242.12.80.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 hostname no-reverse-dns-configured.com does not resolve to addr...
         1 102.255.237.109.zen.spamhaus.org: RBL lookup error: Host or dom...
         1 6.229.33.178.zen.spamhaus.org: RBL lookup error: Host or domain...
         1 161.214.52.193.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 193.128.85.209.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 41.160.85.209.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 45.214.85.209.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 178.217.85.209.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 46.218.85.209.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 171.223.85.209.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 195.223.85.209.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 21.17.227.212.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 4.42.27.212.zen.spamhaus.org: RBL lookup error: Host or domain ...
         1 5.42.27.212.zen.spamhaus.org: RBL lookup error: Host or domain ...
         1 67.1.107.40.zen.spamhaus.org: RBL lookup error: Host or domain ...
         1 44.4.107.40.zen.spamhaus.org: RBL lookup error: Host or domain ...
         1 190.187.163.66.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 33.187.163.66.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 190.189.163.66.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 172.82.125.74.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 41.82.125.74.zen.spamhaus.org: RBL lookup error: Host or domain...
         1 44.82.125.74.zen.spamhaus.org: RBL lookup error: Host or domain...
         1 46.82.125.74.zen.spamhaus.org: RBL lookup error: Host or domain...
         1 132.242.12.80.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 133.242.12.80.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 42.111.216.82.zen.spamhaus.org: RBL lookup error: Host or domai...
         1 216.189.135.91.zen.spamhaus.org: RBL lookup error: Host or doma...
         1 yahoo.com.zen.spamhaus.org: RBL lookup error: Host or domain na...
         1 apyvet.fr.zen.spamhaus.org: RBL lookup error: Host or domain na...
         1 bpce-it.fr.zen.spamhaus.org: RBL lookup error: Host or domain n...
         1 fip-group.fr.zen.spamhaus.org: RBL lookup error: Host or domain...
         1 free.fr.zen.spamhaus.org: RBL lookup error: Host or domain name...
         1 gmx.fr.zen.spamhaus.org: RBL lookup error: Host or domain name ...
         1 groupe-heracles.fr.zen.spamhaus.org: RBL lookup error: Host or ...
         1 slst.fr.zen.spamhaus.org: RBL lookup error: Host or domain name...
         1 hermes.univ-tours.fr.zen.spamhaus.org: RBL lookup error: Host o...

Fatal Errors: none

Panics: none

Master daemon messages
----------------------
      1 reload -- version 2.11.0, configuration /etc/postfix

```

D’après ce que je comprends, ce sont principalement les mails de/vers [sfr.net](http://sfr.net) qui posent problèmes ?

Est-ce que ça vous parle ? Comment pourrais-je identifier d’où vient ce problème ?

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Avril 12, 2018, 7:30 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/2 "2018-04-12T07:30:49Z")

</div>

Salut

_Helo command rejected: Host not found (total: 536)_  
_520 sfr.net_

[sfr.net](http://sfr.net) n’existe pas

[![](https://www.debian-fr.org/uploads/default/original/2X/0/05344087e6764816362156dd4f038e95c9480ccc.png)](http://pix.toile-libre.org/?img=1523518311.png)  
ça parait normal que ça soit rejeté

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 12, 2018, 7:32 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/3 "2018-04-12T07:32:55Z")

</div>

@grandtoubab tu m’as doublé 🙂

Réponse de moi à moi :

La partie message reject detail est intéressante :

> message reject detail  
> RCPT  
> Helo command rejected: Host not found (total: 536)  
> 520 [sfr.net](http://sfr.net)  
> 8 [eusalud.com](http://eusalud.com)  
> 8 [ibxhre06.i-bp.banquepopulaire.fr](http://ibxhre06.i-bp.banquepopulaire.fr)

On voit qu’il y a, à ce jour, 520 messages qui essayent de partir (en toute logique ce sont des envois) vers le domaine [sfr.net](http://sfr.net), or celui-ci n’existe pas !!

Si c’est bien ça, ça explique pourquoi j’ai ce taux hallucinant de rejected, non ?

Comment puis-je retrouver dans mes logs qui essayent de joindre ce domaine ?

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Avril 12, 2018, 7:36 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/4 "2018-04-12T07:36:52Z")

</div>

_Comment puis-je retrouver dans mes logs qui essayent de joindre ce domaine ?_

en lisant les log généralement quelque part dans /var/log

Par exemple, j’utilise exim4 les logs sont dans

```auto
root@debian:/var/log/exim4# ls -alrt
total 68
-rw-r--r-- 1 Debian-exim adm 0 oct. 24 07:58 paniclog
-rw-r----- 1 Debian-exim adm 595 avril 3 06:51 mainlog.10.gz
-rw-r----- 1 Debian-exim adm 893 avril 4 08:28 mainlog.9.gz
-rw-r----- 1 Debian-exim adm 673 avril 5 19:20 mainlog.8.gz
-rw-r----- 1 Debian-exim adm 367 avril 6 08:23 mainlog.7.gz
-rw-r----- 1 Debian-exim adm 496 avril 7 07:37 mainlog.6.gz
-rw-r----- 1 Debian-exim adm 633 avril 8 07:18 mainlog.5.gz
-rw-r----- 1 Debian-exim adm 810 avril 9 11:24 mainlog.4.gz
-rw-r----- 1 Debian-exim adm 566 avril 10 08:45 mainlog.3.gz
-rw-r----- 1 Debian-exim adm 760 avril 11 09:10 mainlog.2.gz
-rw-r----- 1 Debian-exim adm 19566 avril 12 08:27 mainlog.1
drwxr-s--- 2 Debian-exim adm 4096 avril 12 08:29 .
drwxr-xr-x 12 root root 4096 avril 12 08:29 ..
-rw-r----- 1 Debian-exim adm 653 avril 12 09:24 mainlog

```

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Avril 12, 2018, 7:48 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/5 "2018-04-12T07:48:09Z")

</div>

il y a des commandes postfix

[http://www.postfix.org/postfix-manuals.html](http://www.postfix.org/postfix-manuals.html)

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 12, 2018, 7:49 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/6 "2018-04-12T07:49:06Z")

</div>

Oui, en fait j’étais en train de faire un tail sur la /var/log/mail.log et je vois ceci qui tourne en boucle :

```nohighlight
Apr 12 09:40:32 monserveur postfix/smtpd[26778]: connect from 82.188.26.109.rev.sfr.net[109.26.188.82]
Apr 12 09:40:32 monserveur postfix/smtpd[26778]: setting up TLS connection from 82.188.26.109.rev.sfr.net[109.26.188.82]
Apr 12 09:40:32 monserveur postfix/smtpd[26778]: 82.188.26.109.rev.sfr.net[109.26.188.82]: TLS cipher list "aNULL:-aNULL:ALL:+RC4:@STRENGTH"
Apr 12 09:40:32 monserveur postfix/smtpd[26778]: 82.188.26.109.rev.sfr.net[109.26.188.82]: Reusing old session
Apr 12 09:40:32 monserveur postfix/smtpd[26778]: Anonymous TLS connection established from 82.188.26.109.rev.sfr.net[109.26.188.82]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
Apr 12 09:40:32 monserveur postfix/smtpd[26778]: NOQUEUE: reject: RCPT from 82.188.26.109.rev.sfr.net[109.26.188.82]: 450 4.7.1 <SERV03.domaineinconnu.local>: Helo command rejected: Host not found; from=<user_remplace@domaineinconnu.comto=<ADRESSELOCALE@MONDOMAINE.comproto=ESMTP helo=<SERV03.domaineinconnu.local>
Apr 12 09:40:32 monserveur postfix/smtpd[26778]: disconnect from 82.188.26.109.rev.sfr.net[109.26.188.82]

```

Par souci de confidentialité, j’ai modifié 2/3 noms, mais en gros, telle que je comprends la log : La personne qui utilise l’adresse **[ADRESSELOCALE@MONDOMAINE.com](mailto:ADRESSELOCALE@MONDOMAINE.com)** (qui est donc de ma responsabilité) essaye d’envoyer un mail à **[user\_remplace@domaineinconnu.com](mailto:user_remplace@domaineinconnu.com)** à travers un serveur smtp qui est [82.188.26.109.rev.sfr.net](http://82.188.26.109.rev.sfr.net) (au lieu d’utiliser le notre), serveur qui ne répond pas.

En fait, je ne sais pas trop ce que fiche mon utilisateur… ni le domaine **[sfr.net](http://sfr.net)**, ni le domaine **[domaineinconnu.com](http://domaineinconnu.com)** n’existent !

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Avril 12, 2018, 7:57 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/7 "2018-04-12T07:57:29Z")

</div>

ça sent le mail frauduleux quand même

personnellement je bloquerai cet utilisateur indélicat jusqu’à ce qu’il se manifeste de vive voix

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 12, 2018, 8:03 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/8 "2018-04-12T08:03:53Z")

</div>

Oui, je lui ai fait un mail en ce sens.

Le nslookup du [domaineinconnu.com](http://domaineinconnu.com) donne [ceci](http://www.whois-raynette.fr/whois/ecf-formapro.com). Donc le domaine existe, mais il n’y a rien derrière… Et pour [sfr.net](http://sfr.net), ça existe aussi, il y a bien un serveur [smtp](http://www.whois-raynette.fr/whois/sfr.net).

J’en déduis qu’il utilise sa boite mail de mon domaine, avec le serveur smtp de [sfr.net](http://sfr.net), pour envoyer un mail vers un destinataire qui vraisemblablement n’existe pas (ou du moins dont le serveur imap/pop3/dns n’est pas configuré comme il faut).

Ce qui me parait étrange, c’est qu’il puisse envoyer un mail sur ce smtp distant, sans authentification à l’envoi…

En tout cas @grandtoubab merci pour ton aide !

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Avril 12, 2018, 8:42 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/9 "2018-04-12T08:42:48Z")

</div>

[82.188.26.109.rev.sfr.net](http://82.188.26.109.rev.sfr.net)

[https://geoiptool.com/fr/?ip=82.188.26.109](https://geoiptool.com/fr/?ip=82.188.26.109)

le localise en Italie

[![](https://www.debian-fr.org/uploads/default/original/2X/2/2ba5a32d396f7c59f94b7171e87f01a3be22dff1.png)](http://pix.toile-libre.org/?img=1523522518.png)

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 12, 2018, 12:24 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/10 "2018-04-12T12:24:11Z")

</div>

Un truc m’échappe quand même, je ne suis pas sûre de bien comprendre la définition du message complet ci-dessous :

```nohighlight
Apr 12 13:36:30 monserveur postfix/smtpd[1884]: connect from 82.188.26.109.rev.sfr.net[109.26.188.82]
Apr 12 13:36:30 monserveur postfix/smtpd[1884]: setting up TLS connection from 82.188.26.109.rev.sfr.net[109.26.188.82]
Apr 12 13:36:30 monserveur postfix/smtpd[1884]: 82.188.26.109.rev.sfr.net[109.26.188.82]: TLS cipher list "aNULL:-aNULL:ALL:+RC4:@STRENGTH"
Apr 12 13:36:30 monserveur postfix/smtpd[1884]: 82.188.26.109.rev.sfr.net[109.26.188.82]: Reusing old session
Apr 12 13:36:30 monserveur postfix/smtpd[1884]: Anonymous TLS connection established from 82.188.26.109.rev.sfr.net[109.26.188.82]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
Apr 12 13:36:31 monserveur postfix/smtpd[1884]: NOQUEUE: reject: RCPT from 82.188.26.109.rev.sfr.net[109.26.188.82]: 450 4.7.1 <SERV03.tsp-toto.local>: Helo command rejected: Host not found; from=<nt@tsp-toto.comto=<bibi@turlutu.comproto=ESMTP helo=<SERV03.tsp-toto.local>
Apr 12 13:36:31 monserveur postfix/smtpd[1884]: disconnect from 82.188.26.109.rev.sfr.net[109.26.188.82]

```

Moi je gère le domaine **[turlutu.com](http://turlutu.com)**, mes serveurs d’envois & réception sont chez moi. Je n’ai pas trop l’habitude de postfix (du moins dans ce mode là), je ne suis pas sûre de vraiment comprendre le sens du message d’erreur.

Pour moi, **[nt@tsp-toto.com](mailto:nt@tsp-toto.com)** a essayé d’envoyer un mail à **[bibi@turlutu.com](mailto:bibi@turlutu.com)** en arrivant par le serveur **SERV03.tsp-toto.local** , mais ce dernier n’a pas reconnu le domaine **[tsp-toto.com](http://tsp-toto.com)** et a donc renvoyé un refus explicite. Refus explicite qui a été renvoyé à mon serveur et qui incrémente mon compteur de rejected pour le domaine **[sfr.net](http://sfr.net)**.

Est-ce que ma compréhension est bonne ?

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Avril 12, 2018, 1:50 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/11 "2018-04-12T13:50:25Z")

</div>

j’interprete ça ainsi:

_connect from [82.188.26.109.rev.sfr.net](http://82.188.26.109.rev.sfr.net)[109.26.188.82]_

cette machine s’est connectée a ton serveur

_[from=nt@tsp-toto.com](mailto:from=nt@tsp-toto.com) [to=bibi@turlutu.com](mailto:to=bibi@turlutu.com)_

pour que [nt@tsp-toto.com](mailto:nt@tsp-toto.com) envoie un mail à [bibi@turlutu.com](mailto:bibi@turlutu.com)

_\<SERV03.tsp-toto.local\>: Helo command rejected: Host not found;_

Mais ton serveur ne peut pas relayer car il ne sait pas trouver le host

je ne suis pas du tout un expert en postfix

On trouve quelque chose d’approchant et une explication plausible ici

[https://www.howtoforge.com/community/threads/postfix-issue-and-filters.77042/#post-363847](https://www.howtoforge.com/community/threads/postfix-issue-and-filters.77042/#post-363847)

---

<div class="post-metadata">

**Author:** ![Baruch](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@Baruch](https://www.debian-fr.org/u/Baruch)\
**Post date:** [Avril 16, 2018, 5:59 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/12 "2018-04-16T05:59:43Z")

</div>

pour être plus précis,

> \<SERV03.tsp-toto.local\>: Helo command rejected: Host not found;

ne signifie pas que le nom d’hote de la machine qui gère le mail de l’expéditeur est introuvable. C’est au niveau de la commande Helo que le serveur de l’expéditeur s’annonce comme SERV03.tsp-toto.local  
Ton serveur essaye de voir si ce nom d’hote existe réellement (c’est à dire s’il existe un enregistrement dns y correspondant) car tu doit avoir ‹&nbsp;reject\_unknown\_helo\_hostname&nbsp;› quelque part dans ta conf.  
A ma connaissance pouvoir resoudre le nom helo d’un serveur ne fait pas partie des standards du protocole smtp mais constitue une sécurité supplémentaire contre le spam. J’utilise moi aussi cette vérification et de temps en temps j’ai effectivement un expéditeur qui passe pas…

A partir de là 3 solutions: Soit tu vires ‹&nbsp;reject\_unknown\_helo\_hostname&nbsp;› de ta config. Soit tu dois ajouter avant un ‹&nbsp;check\_client\_acces&nbsp;› pointant vers un fichier hash qui indique d’accepter les mail provenant de ce serveur particulier… Soit tu joins l’admin de ce domaine pour lui demander de configurer son serveur de façon à avoir un helo résolvable…

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 16, 2018, 7:25 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/13 "2018-04-16T07:25:23Z")

</div>

Ok, l’admin a déjà été contacté, donc dans le cas présent, le problème ne vient pas de moi, mais des hôtes distantes, du moins, du serveur smtp dont le nom n’est pas correctement décrit côté dns.

En revanche, ce weekend ça a été la folie au niveau des hosts rejected, voici une partie du rapport d’hier :

```nohighlight
Postfix log summaries for Apr 15

Grand Totals
------------
messages

   2585 received
   3062 delivered
      0 forwarded
     11 deferred (99 deferrals)
      7 bounced
    508 rejected (14%)
      0 reject warnings
      0 held
      0 discarded (0%)

 164514k bytes received
    601m bytes delivered
    181 senders
     36 sending hosts/domains
    922 recipients
     64 recipient hosts/domains

Per-Hour Traffic Summary
------------------------
    time received delivered deferred bounced rejected
    --------------------------------------------------------------------
    0000-0100 0 0 0 0 0 
    0100-0200 0 0 0 0 0 
    0200-0300 0 0 0 0 0 
    0300-0400 0 0 0 0 0 
    0400-0500 0 0 0 0 0 
    0500-0600 0 0 0 0 0 
    0600-0700 6 6 1 0 5 
    0700-0800 50 50 5 0 72 
    0800-0900 262 228 6 0 31 
    0900-1000 99 185 6 1 19 
    1000-1100 72 76 5 0 106 
    1100-1200 70 90 4 0 13 
    1200-1300 160 162 5 0 98 
    1300-1400 48 48 5 0 11 
    1400-1500 48 76 5 0 9 
    1500-1600 62 62 6 0 8 
    1600-1700 254 259 6 0 11 
    1700-1800 63 81 6 1 17 
    1800-1900 191 351 4 1 15 
    1900-2000 188 201 7 1 21 
    2000-2100 378 286 5 0 15 
    2100-2200 397 398 6 2 10 
    2200-2300 231 497 9 1 8 
    2300-2400 6 6 8 0 39 

message deferral detail
-----------------------
  smtp (total: 99)
        45 Relay access denied (in reply to RCPT TO command
        16 gmail.co[216.58.208.229]:25: Connection timed out
        13 gmail.co[216.58.201.229]:25: Connection timed out
        11 gmail.fr[216.58.208.229]:25: Connection timed out
         8 gmail.fr[216.58.201.229]:25: Connection timed out
         2 mx.bbox.fr[194.158.98.50]:25: Connection refused
         1 4.7.1 Service unavailable - try again later (in reply to M...
         1 gmail.co[216.58.215.37]:25: Connection timed out
         1 gmail.fr[216.58.215.37]:25: Connection timed out
         1 lost connection with mx-eu.mail.am0.yahoodns.net[188.125.69.79...

message bounce detail (by relay)
--------------------------------
  mx-aol.mail.gm0.yahoodns.net[98.136.96.73]:25 (total: 1)
         1 dd This user doesn't have a aol.com account (tips-cs@aol....
  smtp-in.orange.fr[193.252.22.65]:25 (total: 2)
         2 5.1.1 Boite du destinataire pleine. Recipient overquota. OF...
  smtp-in.orange.fr[80.12.242.9]:25 (total: 3)
         3 5.1.1 Adresse d au moins un destinataire invalide. Invalid ...
  smtpz4.laposte.net[194.117.213.1]:25 (total: 1)
         1 5.5.0 Adresse destinataire invalide. Invalid recipient. LPN...

message reject detail
---------------------
  RCPT
    cannot find your hostname (total: 342)
          14 103.41.188.10
          10 203.153.100.152
           9 118.144.82.146
           8 190.86.252.51
           8 221.2.156.61
           5 122.225.75.86
           4 61.161.141.120
           3 193.34.174.3
           3 182.239.42.72
           2 177.234.7.162
           2 69.50.208.13
           2 202.131.241.166
           2 103.19.129.106
           2 103.59.74.210
           2 103.58.116.30
           2 103.24.118.20
           2 111.207.124.1
           2 42.114.20.194
           2 31.41.82.83
           2 42.119.159.215
           1 62.150.58.38
           1 176.19.168.138
           1 46.167.148.133
           1 46.143.25.182
           1 184.22.127.184
           1 93.169.1.161
           1 123.23.151.19
           1 182.30.24.20
           1 2.180.126.133
           1 2.176.171.167
           1 2.191.13.94
           1 14.175.95.130
           1 14.161.135.10
           1 14.191.6.8
           1 27.3.176.167
           1 27.131.32.91
           1 27.0.52.112
           1 31.177.162.191
           1 14.189.93.137
           1 14.189.31.39
           1 188.158.167.52
           1 190.147.137.55
           1 188.55.57.7
           1 14.189.229.145
           1 41.189.228.165
           1 190.174.134.199
           1 188.159.137.233
           1 188.158.201.168
           1 14.188.184.73
           1 190.238.103.210
           1 49.0.212.153
           1 172.58.185.136
           1 185.98.225.19
           1 182.185.232.28
           1 185.103.20.250
           1 94.49.204.12
           1 178.132.44.74
           1 50.116.100.216
           1 178.135.251.252
           1 1.55.11.64
           1 1.55.37.178
           1 62.4.55.101
           1 1.55.235.173
           1 24.55.78.47
           1 37.56.53.59
           1 37.56.83.79
           1 14.164.6.57
           1 58.96.224.37
           1 45.7.229.155
           1 184.22.229.124
           1 197.183.0.147
           1 183.196.62.152
           1 195.158.31.14
           1 195.181.14.189
           1 193.188.92.216
           1 14.126.229.65
           1 196.229.177.150
           1 196.203.110.33
           1 195.175.204.62
           1 37.27.170.239
           1 182.65.108.96
           1 14.174.224.244
           1 197.243.50.210
           1 41.193.223.188
           1 37.142.227.218
           1 197.25.250.109
           1 14.229.120.202
           1 197.221.232.230
           1 176.224.90.43
           1 197.254.80.18
           1 37.36.98.11
           1 58.187.67.159
           1 14.231.138.16
           1 14.231.197.29
           1 123.231.111.94
           1 171.231.182.113
           1 123.17.166.100
           1 27.68.38.181
           1 123.25.240.239
           1 46.100.107.38
           1 182.215.147.101
           1 201.163.44.166
           1 177.232.91.47
           1 200.37.95.41
           1 14.168.162.235
           1 200.46.179.130
           1 201.179.73.72
           1 200.11.140.170
           1 201.230.81.152
           1 203.177.226.78
           1 171.232.196.82
           1 5.232.126.199
           1 2.132.101.240
           1 151.233.18.69
           1 202.134.171.200
           1 203.155.38.234
           1 187.200.173.239
           1 200.106.89.170
           1 203.243.11.143
           1 41.202.79.99
           1 176.235.245.118
           1 203.81.71.162
           1 5.200.114.89
           1 202.84.126.4
           1 202.138.252.2
           1 200.41.86.226
           1 5.234.119.226
           1 200.87.24.83
           1 202.88.246.226
           1 203.153.46.254
           1 14.174.23.103
           1 103.58.92.6
           1 103.229.83.146
           1 175.143.103.201
           1 103.233.116.134
           1 1.22.103.103
           1 103.216.215.59
           1 103.83.144.66
           1 103.84.238.244
           1 27.6.205.131
           1 5.236.96.1
           1 5.236.134.247
           1 14.177.236.92
           1 177.239.20.158
           1 14.236.99.82
           1 14.236.68.195
           1 27.73.232.132
           1 58.236.138.202
           1 43.239.205.78
           1 37.105.75.154
           1 177.73.107.146
           1 187.237.164.210
           1 31.206.219.58
           1 177.237.15.90
           1 61.19.148.106
           1 27.106.5.197
           1 106.212.178.112
           1 176.106.40.217
           1 37.107.91.21
           1 93.75.194.231
           1 93.168.107.77
           1 182.76.238.98
           1 5.76.249.39
           1 77.29.193.226
           1 182.77.75.187
           1 77.29.242.215
           1 171.77.145.210
           1 27.78.21.133
           1 41.78.73.8
           1 14.171.110.214
           1 78.90.131.19
           1 42.111.11.149
           1 211.24.191.134
           1 14.242.12.18
           1 210.187.25.151
           1 27.2.127.244
           1 1.186.62.25
           1 171.245.53.96
           1 213.57.165.96
           1 111.94.72.102
           1 211.107.101.133
           1 93.79.212.132
           1 213.248.181.117
           1 31.59.246.80
           1 79.125.161.223
           1 210.16.84.158
           1 186.251.2.234
           1 111.119.248.37
           1 171.245.120.63
           1 42.112.73.133
           1 125.16.22.113
           1 113.172.22.1
           1 113.176.191.28
           1 113.161.1.92
           1 113.190.42.25
           1 113.189.184.249
           1 113.190.122.57
           1 113.173.43.197
           1 113.172.196.74
           1 113.167.105.63
           1 113.176.239.145
           1 113.183.78.163
           1 113.164.79.161
           1 113.175.246.62
           1 113.186.178.41
           1 113.23.116.215
           1 113.161.160.92
           1 113.160.251.43
           1 182.177.114.171
           1 82.102.224.84
           1 175.25.26.115
           1 154.115.20.2
           1 14.175.83.230
           1 115.72.15.29
           1 115.73.183.217
           1 115.74.154.54
           1 115.77.7.66
           1 115.214.184.210
           1 162.223.107.48
           1 183.182.116.91
           1 5.116.24.10
           1 116.98.93.98
           1 116.98.208.37
           1 116.100.215.117
           1 116.102.24.129
           1 116.104.83.90
           1 116.104.251.230
           1 116.105.178.83
           1 116.73.154.238
           1 116.111.60.128
           1 116.118.0.43
           1 117.158.27.96
           1 94.250.145.27
           1 94.183.249.156
           1 46.252.43.150
           1 14.141.85.230
           1 14.166.252.198
           1 176.218.39.232
           1 191.85.173.108
           1 14.184.85.244
           1 176.217.17.245
           1 117.220.166.19
           1 171.252.87.182
           1 171.249.255.190
           1 95.86.19.69
           1 86.104.238.223
           1 118.81.192.239
           1 118.127.88.102
           1 119.56.121.103
           1 168.187.87.195
           1 119.193.49.201
           1 87.97.218.73
           1 119.148.135.76
           1 119.92.186.3
           1 119.156.85.14
           1 41.87.7.90
           1 27.64.120.194
           1 88.233.36.57
           1 27.2.64.255
           1 121.65.158.132
           1 123.27.121.235
           1 89.165.71.133
           1 41.221.216.66
           1 37.255.248.68
           1 121.120.100.50
           1 121.121.97.114
           1 121.122.173.220
           1 145.255.160.32
           1 125.18.128.90
           1 122.176.47.48
           1 182.191.122.189
           1 122.164.73.161
           1 46.2.254.166
           1 41.222.181.76
           1 222.254.251.12
           1 160.178.2.47
    Helo command rejected: Host not found (total: 91)
          67 mail.xxgl.cn
          24 asahi-net.or.jp

 Relay access denied (total: 67)
          63 proxad.net
           3 www.dnslookup.fr
           1 mou03-h02-176-128-242-22.dsl.sta.abo.bbox.fr

```

J’ai une tonne de **cannot find your hostname** , et ça ça m’effraie un peu. Je ne suis pas sûre de moi, mais c’est comme si mon domaine était la cible de spammers.

J’ai tenté des résolutions dns (depuis un autre serveur sans rapport avec celui là) sur la plupart de ces ips, et beaucoup de rendent rien.

Qu’est-ce que ça vous évoque ?

Au passage, voici ma conf postfix :

```nohighlight
#
#######################
## GENERALS SETTINGS ##
#######################
#
disable_vrfy_command = yes
biff = no
append_dot_mydomain = no
readme_directory = no
delay_warning_time = 4h
mailbox_command = procmail -a "$EXTENSION"
recipient_delimiter = +
message_size_limit = 20480000
mailbox_size_limit = 512000000
inet_interfaces = all
inet_protocols = ipv4
myhostname = mail.tototiti.net
mydomain = tototiti.net
myorigin = $mydomain
mydestination = localhost localhost.$mydomain
mynetworks = 127.0.0.0/8 x.x.x.x/32
relayhost =
relay_domains =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#
###############################
## FLUX ##
###############################
#
# 10 mails par seconde vers un domaine/destination, par défaut
default_destination_concurrency_limit = 100
default_destination_rate_delay = 10s
# 10 mails / seconde vers dovecot
lmtp_destination_concurrency_limit = 100
lmtp_destination_rate_delay = 10s
# 10 mails / seconde vers les boites internes
dovecot_destination_concurrency_limit = 100
dovecot_destination_rate_delay = 10s
dovecot_destination_recipient_limit = 1
# 100 process par défaut
default_process_limit = 100
#
###############################
## SMTP (Client Emission) ##
###############################
#
# par défaut était 30s
smtp_connect_timeout = 20s
# par défaut était 300s
smtp_helo_timeout = 200s
# par défaut était 600s
smtp_data_done_timeout = 400s
# par défaut était 300s
smtp_mail_timeout = 200s
#
smtp_tls_loglevel = 2
smtp_tls_security_level = may
smtp_tls_protocols = !SSLv2, !SSLv3
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtp_tls_mandatory_ciphers = high
smtp_tls_note_starttls_offer = yes
#
smtp_tls_CAfile = /etc/ssl/certs/net_chain.crt
#
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache
#
###############################
## SMTPD (Serveur Réception) ##
###############################
#
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_helo_required = yes
# nombre de message livrés par minute (au lieu de 100 avant)
smtpd_client_message_rate_limit = 600
#
## TLS IN
## ------
#
smtpd_tls_loglevel = 2
smtpd_tls_auth_only = yes
smtpd_tls_security_level = may
smtpd_tls_received_header = yes
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_ciphers = high
smtpd_tls_CAfile = $smtp_tls_CAfile
smtpd_tls_cert_file = $smtp_tls_CAfile
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_tls_dh512_param_file = /etc/ssl/dh512.pem
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
#
tls_preempt_cipherlist = yes
tls_random_source = dev:/dev/urandom
#
## PARAMETRES SASL
## ---------------
#
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes

#
## RESTRICTIONS POUR ACCUEIL MESSAGE
## ---------------------------------
#
## restrictions au moment de la connexion
#
smtpd_client_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_unknown_client_hostname,
     check_client_access hash:/etc/postfix/client_access,
     reject_rbl_client zen.spamhaus.org,
     permit_inet_interfaces
#
## restrictions après réception de la commande « HELO ou EHLO »
#
smtpd_helo_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_invalid_helo_hostname,
     reject_non_fqdn_helo_hostname,
     reject_unknown_helo_hostname
#
## restrictions après réception de la commande « MAIL FROM »
#
smtpd_sender_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_unknown_sender_domain,
     reject_unlisted_sender,
     reject_non_fqdn_sender,
     check_sender_access hash:/etc/postfix/sender_access,
     reject_rhsbl_sender zen.spamhaus.org
#
## restrictions après réception de la commande « RCPT TO »
#
smtpd_recipient_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_unauth_destination,
     reject_unlisted_recipient,
     reject_non_fqdn_recipient,
     reject_unknown_recipient_domain,
     reject_unauth_pipelining,
     check_recipient_access hash:/etc/postfix/recipient_access
#
## restrictions après réception de la commande « DATA »
#
smtpd_data_restrictions =
     reject_unauth_pipelining
#
## restrictions mécanisme ETRN
#
smtpd_etrn_restrictions = reject
#
##############################
## LMTP ##
##############################
#
# par défaut était: 0s
lmtp_connect_timeout = 0s
# par défaut était: 300s
lmtp_lhlo_timeout = 100s
# Par défaut était 600s
lmtp_data_done_timeout = 200s
# Par défaut était 300s
lmtp_mail_timeout = 100s
#
lmtp_tls_session_cache_database = btree:/var/lib/postfix/lmtp_scache
#
#############################################
## PAAMETRES GENERAUX DES COMPTES VIRTUELS ##
#############################################
#
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_minimum_uid = 5000
virtual_mailbox_base = /var/mail
# virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_transport = dovecot
#
###########################################
## COMPTES ET DOMAINES VIRTUELS / MYSQL ##
###########################################
#
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

#
######################
## ERRORS REPORTING ##
######################
#
notify_classes = bounce, software
#notify_classes = resource, software, protocol, policy
error_notice_recipient = admin@tototiti.net
#
######################
## FILTRES ACTIFS ##
######################
#
## liaison avec OPENDKIM
## -----------------------
#
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = $smtpd_milters
#
## pour liaison avec ==AMAVIS ==CLAMAV / SPAMASSASSIN
## ------------------------------------------------------
#
content_filter = smtp-amavis:[127.0.0.1]:10024

```

---

<div class="post-metadata">

**Author:** ![Baruch](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@Baruch](https://www.debian-fr.org/u/Baruch)\
**Post date:** [Avril 16, 2018, 8:15 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/14 "2018-04-16T08:15:06Z")

</div>

vérifie juste que le resolveur dns de ton serveur mail fonctionne correctement. Tu as bien un resolveur dédié (et non pas un forwarder)? Après moi j’ai plusieurs connexion par minute de spam, dés que tu ouvres le port 25 sur une machine c’est la folie 😉

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 16, 2018, 8:52 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/15 "2018-04-16T08:52:10Z")

</div>

Voilà ma configuration côté bind, ça m’a l’air bon (j’ai bien un résolveur dédié, et je renvoie vers un forwarder si jamais pas de réponse trouvée) :

```nohighlight
/etc/bind/named.conf.options
acl "trusted" {
   127.0.0.1/8; # VP2 en boucle locale
   x.x.x.x; # VP1
  x.x.x.y; # VP2
};

options {
   directory "/var/cache/bind";

   # Activer DNSSEC
   dnssec-enable yes;
   dnssec-validation auto;
   auth-nxdomain no; # RFC1035

   # Interfaces d'écoute
   listen-on { any; };
   listen-on-v6 { none; };

   # Autoriser les requêtes récursives locales uniquement
   allow-recursion { trusted ; };

   # résolution en dernier ressort
   forwarders { 213.251.188.141; };
   #forwarders { 8.8.8.8; };
   # Ne pas transférer les informations des zones aux DNS secondaires
   allow-transfer { none; };

   # Ne pas autoriser la mise à jour des zones maîtres
   allow-update { none; };

   # Masquage du serveur
   version none;
   hostname none;
   server-id none;

};

```

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 16, 2018, 11:44 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/16 "2018-04-16T11:44:47Z")

</div>

J’ai modifé les règles anti spam ce jour, avec ceci :

```nohighlight
#
## restrictions au moment de la connexion
#
smtpd_client_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_unknown_client_hostname,
     check_client_access hash:/etc/postfix/client_access,
     #reject_rbl_client zen.spamhaus.org,
     # modifié le 16/04/18
     reject_rbl_client all.spam-rbl.fr,
     permit_inet_interfaces
#
## restrictions après réception de la commande « HELO ou EHLO »
#
smtpd_helo_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_invalid_helo_hostname,
     reject_non_fqdn_helo_hostname,
     reject_unknown_helo_hostname
#
## restrictions après réception de la commande « MAIL FROM »
#
smtpd_sender_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_unknown_sender_domain,
     reject_unlisted_sender,
     reject_non_fqdn_sender,
     check_sender_access hash:/etc/postfix/sender_access,
     # modifié le 16/04/18
     #reject_rhsbl_sender zen.spamhaus.org
     reject_rhsbl_sender dsn.rfc-ignorant.org,
     reject_rbl_client b.barracudacentral.org,
#
## restrictions après réception de la commande « RCPT TO »
#
smtpd_recipient_restrictions =
     permit_mynetworks,
     permit_sasl_authenticated,
     reject_unauth_destination,
     reject_unlisted_recipient,
     reject_non_fqdn_recipient,
     reject_unknown_recipient_domain,
     reject_unauth_pipelining,
     check_recipient_access hash:/etc/postfix/recipient_access,
     # modifié le 16/04/18
     reject_rbl_client bl.spamcop.net,
     reject_rbl_client cbl.abuseat.org,
     reject_rbl_client dnsbl.sorbs.net,
     reject_rbl_client b.barracudacentral.org,
     reject_rbl_client bl.spameatingmonkey.net,
     reject_rbl_client bl.spamcop.net,
     reject_rbl_client dnsbl.njabl.org,
     reject_rbl_client bl.tiopan.com,
     reject_rbl_client spamsources.fabel.dk,
     reject_rbl_client truncate.gbudb.net,
     reject_rbl_client ubl.unsubscore.com,
     reject_rbl_client aspews.ext.sorbs.net,
     reject_rbl_client dnsbl.sorbs.net,
     reject_rbl_client backscatter.spameatingmonkey.net,
     reject_rbl_client bl.spameatingmonkey.net,

```

Est-ce que ça vous parait propre ?

---

<div class="post-metadata">

**Author:** ![Baruch](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@Baruch](https://www.debian-fr.org/u/Baruch)\
**Post date:** [Avril 16, 2018, 11:46 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/17 "2018-04-16T11:46:02Z")

</div>

Tu ne dois pas utiliser un forwarder pour résoudre les adresse de spamhaus, c’est le meilleur moyen de se retrouver à rejeter plein de mail en bloc. Un grand nombre de forwarders interceptent les requêtes NXDOMAIN (c’est à dire répondant que le domain n’existe pas) les filtres de spamhaus fonctionnent de telle façon que NXDOMAIN = non listé = accepter le mail. Si ton forwarder intercepte les requêtes, ton mail va se mettre à tout rejeter. Ça m’est arrivé, ça fait mal 😉 .  
Même s’il ne le fait pas, il pourrait décider de le faire du jour au lendemain…  
Donc tu dois configurer ton dns pour qu’il interroge les serveurs racines .

---

<div class="post-metadata">

**Author:** ![jhfra](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jhfra](https://www.debian-fr.org/u/jhfra)\
**Post date:** [Avril 16, 2018, 12:01 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/18 "2018-04-16T12:01:42Z")

</div>

mon dns n’arrive justement pas à résoudre spamhaus, je ne comprends pas pourquoi. Je suis donc parti sur des autres bloqueurs (voir la conf plus tôt). Qu’en penses-tu ?

---

<div class="post-metadata">

**Author:** ![Baruch](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@Baruch](https://www.debian-fr.org/u/Baruch)\
**Post date:** [Avril 16, 2018, 12:31 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/19 "2018-04-16T12:31:04Z")

</div>

il y en a beaucoup trop et en plus certains sont en double comme [bl.spamcop.net](http://bl.spamcop.net) par exemple. Tu te rends compte que chaque fois tu reçois/envoie un mail ton serveur va devoir faire 20 résolution dns??? Il vaut mieux en avoir 2 ou 3 bon et bien complémentaires… Voir par exemple ici:  
[http://analyse.inps.de/?type=monthly&lang=en&service=dnsbl](http://analyse.inps.de/?type=monthly&lang=en&service=dnsbl)

Moi j’utilise juste ça:

```nohighlight
  	reject_rbl_client zen.spamhaus.org,
        reject_rbl_client cbl.abuseat.org,
 	reject_rhsbl_sender rhsbl.sorbs.net,
	reject_rhsbl_client rhsbl.sorbs.net,

```

D’autre part dans ta conf, il vaut mieux mettre tout les reject après smtpd\_recipient\_restrictions, même ceux ciblant les client, helo ou sender

En effet le serveur examine tous les éléments du mail 1 par 1 dans l’ordre:

```nohighlight
smtpd_client_restrictions 
smtpd_helo_restrictions
smtpd_sender_restrictions
smtpd_recipient_restrictions

```

Du coup quand un mail est rejeté à cause de son ip ou de son helo tu n’a aucune info dans les log concernant son expéditeur ou destinataire… ce qui est bien pratique pour savoir si on à affaire à du spam ou pas…

---

<div class="post-metadata">

**Author:** ![Baruch](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@Baruch](https://www.debian-fr.org/u/Baruch)\
**Post date:** [Avril 16, 2018, 12:44 UTC](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372/20 "2018-04-16T12:44:01Z")

</div>

le même raisonnement est valable pour toutes les restrictions: par exemple voici ma configuration:

```nohighlight
smtpd_client_restrictions = 
smtpd_helo_restrictions = 
smtpd_sender_restrictions = 
smtpd_recipient_restrictions =
	reject_invalid_hostname,
	reject_non_fqdn_hostname,
	reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
	reject_unknown_recipient_domain,
	permit_mynetworks,
	permit_sasl_authenticated,
        reject_unauth_destination,
	check_helo_access hash:/etc/postfix/filters/hash/helo_checks,
	check_client_access hash:/etc/postfix/filters/hash/client_checks,
	check_client_access pcre:/etc/postfix/filters/pcre/client_checks.pcre,
	check_sender_access hash:/etc/postfix/filters/hash/sender_checks,
	check_sender_access pcre:/etc/postfix/filters/pcre/sender_checks.pcre,
	check_recipient_access hash:/etc/postfix/filters/hash/recipient_checks,
	check_recipient_access pcre:/etc/postfix/filters/pcre/recipient_checks.pcre,
	reject_invalid_helo_hostname,
	reject_non_fqdn_helo_hostname,
	reject_unknown_helo_hostname,
	reject_unknown_sender_domain,
	check_policy_service unix:private/policy,
  	reject_rbl_client zen.spamhaus.org,
        reject_rbl_client cbl.abuseat.org,
 	reject_rhsbl_sender rhsbl.sorbs.net,
	reject_rhsbl_client rhsbl.sorbs.net,
        permit

```

[Page suivante](https://www.debian-fr.org/t/postfix-dovecot-54-rejected/76372.md?page=2)
