Clemens Mayer: > Hello Wietse & Friends, > > /etc/postfix/main.cf looks like this: > header_checks = regexp:/etc/postfix/header_checks > smtp_header_checks = regexp:/etc/postfix/header_checks > > /etc/postfix/header_checks looks like this: > /^Subject:/ WARN > > Two issues: > 1. I have a really long subject.
For saftey reasons Postfix programs will log only a limited amount of mesasage content, to avoid logfile spamming. > -cleanup logs the whole thing just fine, 110 characters, but smtp only logs > 52 characters of it. The cleanup_act_log() function logs logs up to 200 characters. The SMTP client's smtp_hbc_logger() function was added 10 years later, and it logs only 60. It does not matter what the number is, you just cannot asume that Postfix will log all headers in their full glory. It just is NOT SAFE. > 2. I cannot figure out if there is a way to log email subject on the same > smtp log line with delivery status. There is no such feature. Fortunately, computers can do the work for you and combine different logfile records from the same mail transaction. In Postfiox source code there is a collate tool that can serve as a starting point. Wietse