united states of america usa  linkedinfacebook
Enable subject logging in Postfix

postfix1Q. We would like to enable subject logging in Postfix, how do we go about doing that?

A. First, you need to install postfix-pcre package (Perl Compatible Regular Expressions support for postfix). We were doing it on Ubuntu 12, so:

apt-get install postfix-pcre

Create a file to check the headers: eg /etc/postfix/header_checks

/^Subject:/ INFO

In the /etc/postfix/main.cf add the following line:
header_checks = pcre:/etc/postfix/header_checks

Restart postfix:

/etc/init.d/postfix restart

The logs should reflect the changes:

Mar 20 13:41:04 mailserver postfix/cleanup[20753]: C3EDC2214AA: info: header Subject: test from unknown[207.27.131.19]; from=<This email address is being protected from spambots. You need JavaScript enabled to view it.>; to=<This email address is being protected from spambots. You need JavaScript enabled to view it.>; proto=ESMTP helo=<[10.10.10.103]>

 

Tel: (786) 646-6461   |   Toll-Free: (877) 454-0758
1990 NE 163rd St, Suite 215, North Miami Beach, FL 33162, USA
Privacy Policy