# Postfix et distribution locale

**URL:** <https://www.debian-fr.org/t/postfix-et-distribution-locale/23702>\
**Category:** Support Debian\
**Created:** [Février 20, 2016, 9:09 UTC](https://www.debian-fr.org/t/postfix-et-distribution-locale/23702 "2016-02-20T21:09:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antalgeek1](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@antalgeek1](https://www.debian-fr.org/u/antalgeek1)\
**Post date:** [Février 20, 2016, 9:09 UTC](https://www.debian-fr.org/t/postfix-et-distribution-locale/23702/1 "2016-02-20T21:09:56Z")

</div>

Salut,

J’ai un petit problème avec mon serveur de mail (postfix-dovecot sous lenny amd64).  
Maintenant il refuse la distribution locale des mails.  
Si je fais un :`echo "mail de test" | mail -s "sujet" root@localhost`  
Ben ça ne fonctionne pas et j’ai ces lignes dans mail.warn:

```auto
Dec 7 13:58:24 hector postfix/smtp[29331]: warning: host hector.deb-indus.org[mon-ip-publique]:25 greeted me with my own hostname hector.deb-indus.org
Dec 7 13:58:24 hector postfix/smtp[29331]: warning: host hector.deb-indus.org[mon-ip-publique]:25 replied to HELO/EHLO with my own hostname hector.deb-indus.org
```

et dans mail.log

```auto
Dec 7 13:58:23 hector postfix/pickup[28950]: CEB6BBB24: uid=0 from=<root>
Dec 7 13:58:23 hector postfix/cleanup[29328]: CEB6BBB24: message-id=<20091207125823.CEB6BBB24@hector.deb-indus.org>
Dec 7 13:58:23 hector postfix/qmgr[2498]: CEB6BBB24: from=<root@hector.deb-indus.org>, size=338, nrcpt=1 (queue active)
Dec 7 13:58:23 hector postfix/smtp[29331]: CEB6BBB24: to=<jordi@localhost.deb-indus.org>, orig_to=<jordi@localhost>, relay=none, delay=0.1,$Dec 7 13:58:23 hector postfix/cleanup[29328]: E69BFBB25: message-id=<20091207125823.E69BFBB25@hector.deb-indus.org>
Dec 7 13:58:23 hector postfix/bounce[29332]: CEB6BBB24: sender non-delivery notification: E69BFBB25
Dec 7 13:58:23 hector postfix/qmgr[2498]: E69BFBB25: from=<>, size=2350, nrcpt=1 (queue active)
Dec 7 13:58:23 hector postfix/qmgr[2498]: CEB6BBB24: removed
Dec 7 13:58:24 hector postfix/smtpd[29333]: connect from hector.deb-indus.org[81.56.159.67]
Dec 7 13:58:24 hector postfix/smtp[29331]: warning: host hector.deb-indus.org[81.56.159.67]:25 greeted me with my own hostname hector.deb-i$Dec 7 13:58:24 hector postfix/smtp[29331]: warning: host hector.deb-indus.org[81.56.159.67]:25 replied to HELO/EHLO with my own hostname he$Dec 7 13:58:24 hector postfix/smtp[29331]: E69BFBB25: to=<root@hector.deb-indus.org>, relay=hector.deb-indus.org[81.56.159.67]:25, delay=0.$Dec 7 13:58:24 hector postfix/qmgr[2498]: E69BFBB25: removed
Dec 7 13:58:24 hector postfix/smtpd[29333]: disconnect from hector.deb-indus.org[81.56.159.67]
```

De même tous les mails envoyés par cron terminent dans le puits.  
Ce qui me trouble c’est que ça fonctionnait avant.  
Je n’ai fait que deux modifications sur la machine :

- installation de cups (rien à voir)
- activation du relais sur authentification --\> ça serait ça ?

Du côté du [main.cf](http://main.cf) j’ai ces règles :

[code]smtpd\_client\_restrictions = permit\_mynetworks,  
permit\_sasl\_authenticated,  
reject\_unknown\_client\_hostname,  
reject\_unknown\_reverse\_client\_hostname

smtpd\_recipient\_restrictions = permit\_mynetworks,  
permit\_sasl\_authenticated,  
reject\_unauth\_destination,  
reject\_unknown\_recipient\_domain,  
reject\_non\_fqdn\_recipient,  
warn\_if\_reject reject\_unverified\_recipient

smtpd\_sender\_restrictions = reject\_non\_fqdn\_sender,  
reject\_unknown\_sender\_domain,  
warn\_if\_reject reject\_unverified\_sender

smtpd\_helo\_restrictions = warn\_if\_reject reject\_invalid\_helo\_hostname,  
warn\_if\_reject reject\_non\_fqdn\_helo\_hostname,  
warn\_if\_reject reject\_unknown\_helo\_hostname  
[/code]

Je mets tout le [main.cf](http://main.cf) ou bien ?

---

<div class="post-metadata">

**Author:** ![antalgeek1](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@antalgeek1](https://www.debian-fr.org/u/antalgeek1)\
**Post date:** [Février 20, 2016, 9:09 UTC](https://www.debian-fr.org/t/postfix-et-distribution-locale/23702/2 "2016-02-20T21:09:59Z")

</div>

Mmm, j’ai trouvé une solution mais je ne sais pas si celle-ci est bien valable.  
J’ai modifié mon [main.cf](http://main.cf) de la sorte (ajouts en gras):

```auto

```

Dans la mesure où j’ai rendu la bible de postfix à son propriétaire je ne peux pas vérifier ça mais ça me semble cohérent.
