Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have postfix running as a relay server. In normal configuration, postfix does logging for "from" and "to" header. I would like postfix to log additional extension header eg. X-Mms-Originator-System and X- Mms-3GPP-MMS-Version as example below.

Does anyone have any idea how to log this kind of extension header in postfix?

Date: Thu, 9 Feb 2012 15:33:09 +0700 (ICT) 
From: +66846462383/TYPE=PLMN 
Sender: +66846462383/ 
To: +66815843236/TYPE=PLMN,+66892072043/TYPE=PLMN,+66838471846/TYPE=PLMN,+61434783265/TYPE=PLMN 
Message-ID: <542269348.734.1328776389955.JavaMail.root@mms-cmz-01> 
MIME-Version: 1.0 
Content-Type: multipart/related; type="application/smil"; start="<hISVa>"; .boundary="----=_Part_34_1141875874.1328776389677" 
X-Mms-3GPP-MMS-Version: 6.5.0 
share|improve this question
Actually, Postfix generally won't log the From and To headers from your email content. What it logs are the addresses used in the SMTP Envelope, which may be different. – mc0e Jan 16 '15 at 15:19

You can use a header check with the WARN target, this will log your header.

header_checks = regexp:/etc/postfix/header_checks

## header_checks
/^ X-Mms-Originator-System: / WARN 

should work

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.