I have Postfix listening on several ports for incoming mail. E.g. ports 25 and 587. I'd like to see in the logs the destination port of each incoming connection.
I have Postfix listening on several ports for incoming mail. E.g. ports 25 and 587. I'd like to see in the logs the destination port of each incoming connection.
Use
syslog_name
in the smtpd options in/etc/postfix/master.cf
. This changes the name of the process in the standard-format log line. The default ispostfix/smtpd
. So to change it for thesubmission
line (port 587), add this to the options:Note that the default process name is kept as a prefix. Don't include "/smtpd" because this is added automatically.
Example default log line:
Example "augmented" log line:
Warning: Do not change this option in
/etc/postfix/main.cf
, or it will change the output for all of Postfix's listening ports.