Hello,

for incoming mails logging the X-Headers works pretty fine by using:

header_checks = regexp:/etc/postfix/header_checks

the file header_checks contains:
/^X-.*:/        INFO

Logfile:

Aug 17 16:56:31 mta01 postfix/cleanup[15387]: 3xY8Rz2rFJzDxk2: info: header X-TEST: value from localhost[127.0.0.1]:54582; from=<f...@example.com> to=<r...@example.com> proto=ESMTP helo=<mta01.dev.local>

For sending mails using `smtp_header_checks` it _only_ logs the headers if a connection to the destination server was established:

Aug 17 16:48:48 mta01 postfix/smtp[14811]: 3xY8Rz2rFJzDxk2: info: header X-TEST: value

in case of a tempfail there is no header logged, is it possible to change this behavior to always log the headers for each delivery attempt?


No header in delivery attampt:

Aug 17 16:49:57 mta01 postfix-10.223.1.218/smtp[14811]: connect to 127.0.0.1[127.0.0.1]:25666: Connection refused Aug 17 16:49:57 mta01 postfix-10.223.1.218/smtp[14811]: 3xY8Hj5zmDzDxjx: to=<badr...@tempfail.example.com>, relay=none, delay=36, delays=36/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:25666: Connection refused)


Best regards


Matthias Schneider

Reply via email to