You want to log email Subject field into /var/log/maillog?
By default the email subject field is not logged to the maillog file. To log it, here is the trick.
Edit /etc/postfix/main.cf and uncomment the option below:
header_checks = regexp:/etc/postfix/header_checks
In the ‘/etc/postfix/header_checks’ file, write the line below in one line:
/^Subject:/ WARN
Then reload the postfix service using “postfix reload”
Tail the maillog file, you should see some logs similar like below:
Oct 26 18:32:28 mx-1 postfix/smtpd[7532]: 8C7255798B: client=unknown[xxx.xx.31.166], sasl_method=LOGIN, sasl_username=user@mydomain.com Oct 26 18:32:28 mx-1 postfix/cleanup[6701]: 8C7255798B: warning: header Subject: Room Rate - Weatherford Company from unknown[xxx.xx.31.166]; from= to= proto=ESMTP helo= Oct 26 18:32:28 mx-1 postfix/cleanup[6701]: 8C7255798B: message-id=<0CFA5E16DE5D67499273CF31D3949F7201B5FA0C@MEEXCH01.wft.root.loc> Oct 26 18:32:28 mx-1 postfix/qmgr[19610]: 8C7255798B: from=, size=70837, nrcpt=1 (queue active)
Ref: http://www.irbs.net/internet/postfix/0410/2142.html
Incoming search terms for this post:
- postfix log subject (9)
- opensolaris maillog (4)
- postfix log subject line (4)
- log subject postfix (3)
- postfix logs subject (3)
- postfix subject log (3)
- postfix maillog have no subject (2)
- /var/log/mail log subject field (2)
- mail log subject (2)
- postfix log subject of message (2)
- postfix maillog nrcpt=1 (queue active) (1)
- postfix maillog opensolaris (1)
- postfix maillog queue active (1)
- postfix maillog subject (1)
- postfix subject log howto (1)
- what is postfix/qmgr in /var/log/maillog (1)
- wft root (1)
- view postfix maillog using php tail -f (1)
- subject maillog (1)
- subject is not coming in postfix mailog (1)



Comments