Gerben Wierda:
> When I remove the forced error
>
> check_client_access regexp:/opt/local/etc/postfix/rna_rbl_whitelist_clients
>
> I see nothing. No ?connect from unknown[192.168.2.67]?. Nothing.
> This baffles me. Why do I only see logging in my maillog (including
> debug_peer) when I introduce an unrelated error in main.cf? I?d
> like to see logging for each mail delivery.
With confiuration error:
# postconf maillog_file debug_peer_list smtpd_client_restrictions
maillog_file = /tmp/log/maillog
debug_peer_list = 127.0.0.1
smtpd_client_restrictions = regexp:/non/existent
# date; telnet 127.0.0.1 25
Sun Oct 6 10:05:53 EDT 2019
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 tail.porcupine.org ESMTP Postfix
quit
221 2.0.0 Bye
Connection closed by foreign host.
#
Logfile:
Oct 06 10:04:03 tail postfix/master[2062]: reload -- version 3.5-20190922,
configuration /etc/postfix
Oct 06 10:05:53 tail postfix/smtpd[2518]: error: open /non/existent: No such
file or directory
Oct 06 10:05:53 tail postfix/smtpd[2518]: connect from localhost[127.0.0.1]
Oct 06 10:05:53 tail postfix/smtpd[2518]: smtp_stream_setup: maxtime=300
enable_deadline=0
Oct 06 10:05:53 tail postfix/smtpd[2518]: > localhost[127.0.0.1]: 220
tail.porcupine.org ESMTP Postfix
...
Oct 06 10:05:58 tail postfix/smtpd[2518]: < localhost[127.0.0.1]: quit
Oct 06 10:05:58 tail postfix/smtpd[2518]: > localhost[127.0.0.1]: 221 2.0.0 Bye
Oct 06 10:05:58 tail postfix/smtpd[2518]: disconnect from localhost[127.0.0.1]
quit=1 commands=1
After removing the configuration error:
# postconf maillog_file debug_peer_list smtpd_client_restrictions
maillog_file = /tmp/log/maillog
debug_peer_list = 127.0.0.1
smtpd_client_restrictions =
# date; telnet 127.0.0.1 25
Sun Oct 6 10:08:18 EDT 2019
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 tail.porcupine.org ESMTP Postfix
quit
221 2.0.0 Bye
Connection closed by foreign host.
#
Logfile:
Oct 06 10:08:02 tail postfix/master[2062]: reload -- version 3.5-20190922,
configuration /etc/postfix
Oct 06 10:08:18 tail postfix/smtpd[2545]: connect from localhost[127.0.0.1]
Oct 06 10:08:18 tail postfix/smtpd[2545]: smtp_stream_setup: maxtime=300
enable_deadline=0
Oct 06 10:08:18 tail postfix/smtpd[2545]: > localhost[127.0.0.1]: 220
tail.porcupine.org ESMTP Postfix
...
Oct 06 10:08:20 tail postfix/smtpd[2545]: < localhost[127.0.0.1]: quit
Oct 06 10:08:20 tail postfix/smtpd[2545]: > localhost[127.0.0.1]: 221 2.0.0 Bye
Oct 06 10:08:20 tail postfix/smtpd[2545]: disconnect from localhost[127.0.0.1]
quit=1 commands=1
In other words, this still works as intended. Code changes since
Postfix 3.4.5 are totally unrelated to error handling or logging.
Wietse
Wietse