Our application already inserts the custom header into the email. If we can get postfix to log the custom private ID, then the goal is to schedule another application once a day to grab the archived mail log and parse the information out so we can match up our private msg ID with postfix's msg ID.
Thomas, you are correct: If I didn't misunderstand him he already has those X-Info-MessageID headers in his mail headers, what he wants is Postfix to do is writing them to syslog. I'll try the WARN action and see if I can get it to work. Thanks for everyone's input. Robert -----Original Message----- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of Thomas Gelf Sent: Wednesday, August 12, 2009 10:54 AM To: postfix-users@postfix.org Subject: Re: need to add custom header parameter/value to postfix logging. Noel Jones wrote: > To log an existing header, use the header_checks WARN action. > http://www.postfix.org/header_checks.5.html Thank you! > The log entry would look something like: > Aug 12 10:29:59 mgate2 postfix/cleanup[29258]: 7C773797ADF: warning: > header X-Info-Messageid: l6oL1rHPRUyklkQzdkW3kg from > client.example.com[192.168.1.123]; from=<u...@example.com> > to=<recipi...@example.org> proto=ESMTP helo=<[192.168.1.123]> Does it automagically log the whole matching header? Or do I need to add some backreference to "WARN optional text..."? Regards, Thomas