# Postfix - Comment loguer les rejets

**URL:** <https://www.debian-fr.org/t/postfix-comment-loguer-les-rejets/91445>\
**Category:** Support Debian\
**Tags:** postfix\
**Created:** [Août 17, 2025, 10:51 UTC](https://www.debian-fr.org/t/postfix-comment-loguer-les-rejets/91445 "2025-08-17T10:51:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PmGs](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/p/dfb087/32.png) [@PmGs](https://www.debian-fr.org/u/PmGs)\
**Post date:** [Août 17, 2025, 10:51 UTC](https://www.debian-fr.org/t/postfix-comment-loguer-les-rejets/91445/1 "2025-08-17T10:51:45Z")

</div>

J’ai cette config pour essai dans main.cf  
compatibility\_level = 3.6

```
myhostname = modoboa1
mydomain = local
myorigin = $mydomain
mydestination = $myhostname

mynetworks = 127.0.0.0/8, [::1]/128

# Logging
maillog_file = 

# Restrictions
smtpd_recipient_restrictions =
    reject
smtpd_sender_restrictions =
    reject

debug_peer_level = 9

```

Je lance ce test :  
swaks --server 127.0.0.1 --from toto@local --to titi@local  
=== Trying 127.0.0.1:25…  
=== Connected to 127.0.0.1.  
 ← 220 modoboa1 ESMTP Postfix  
 → EHLO modoboa1  
 ← 250-modoboa1  
 ← 250-PIPELINING  
 ← 250-SIZE 10240000  
 ← 250-VRFY  
 ← 250-ETRN  
 ← 250-ENHANCEDSTATUSCODES  
 ← 250-8BITMIME  
 ← 250-DSN  
 ← 250-SMTPUTF8  
 ← 250 CHUNKING  
 → MAIL FROM:[toto@local](mailto:toto@local)  
 ← 250 2.1.0 Ok  
 → RCPT TO:[titi@local](mailto:titi@local)  
\<\*\* 554 5.7.1 [toto@local](mailto:toto@local): Sender address rejected: Access denied  
 → QUIT  
 ← 221 2.0.0 Bye  
=== Connection closed with remote host.

Le rejet est normal au regard de ma conf, mais je ne le vois pas dans les logs!  
Un lecteur a-t-il une idée?

---

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Août 17, 2025, 11:52 UTC](https://www.debian-fr.org/t/postfix-comment-loguer-les-rejets/91445/2 "2025-08-17T11:52:47Z")

</div>

Tu n’a pas de configuration de log dans ton fichier de conf, donc il ne trace pas.

---

<div class="post-metadata">

**Author:** ![PmGs](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/p/dfb087/32.png) [@PmGs](https://www.debian-fr.org/u/PmGs)\
**Post date:** [Août 17, 2025, 1:22 UTC](https://www.debian-fr.org/t/postfix-comment-loguer-les-rejets/91445/3 "2025-08-17T13:22:29Z")

</div>

Si via rsyslog et systemd

[http://www.postfix.org/postconf.5.html](http://www.postfix.org/postconf.5.html)

**maillog\_file (default: empty)**

The name of an optional logfile that is written by the Postfix [postlogd(8)](http://www.postfix.org/postlogd.8.html) service. An empty value selects logging to syslogd(8).

Et j’ai vérifié en enlevant les reject, les mais qui passent sont bien logués.

---

<div class="post-metadata">

**Author:** ![PmGs](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/p/dfb087/32.png) [@PmGs](https://www.debian-fr.org/u/PmGs)\
**Post date:** [Août 17, 2025, 2:38 UTC](https://www.debian-fr.org/t/postfix-comment-loguer-les-rejets/91445/4 "2025-08-17T14:38:28Z")

</div>

Piégé par mon niveau de log défini dans /etc/systemd/journald.conf !

notice → info

et les logs de rejets apparaissent.
