Enable “Subject:” logging in Postfix

Edit the Postfix’s main.cf file and add the following line (or uncomment it):

header_checks = regexp:/etc/postfix/header_checks

Create /etc/postfix/header_checks file and add the following line:

/^subject:/ WARN

Finally, reload/restart Postfix. From now on there will be a “warrning: header subject” in your maillog.

CentOS: Change default MTA (Mail Transfer Agent)

Here’s a simple way to change your default MTA on CentOS:

# alternatives --config mta

There are 2 programs which provide 'mta'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/sbin/sendmail.sendmail
   2           /usr/sbin/sendmail.ssmtp

Enter to keep the current selection[+], or type selection number: 2

# sendmail -V
sSMTP 2.61 (Not sendmail at all)