On Thu, Feb 18, 2016 at 03:19:22PM +0100, Julian Kippels wrote:
Hi,
I would like to prevent postfix from logging when connections come in
from certain ip addresses.
Feb 14 03:32:45 mail-test postfix/smtpd[16006]: connect from
unknown[192.168.25.2]
Feb 14 03:32:45 mail-test postfix/smtpd[16006]: disconnect from
unknown[192.168.25.2]
Feb 14 03:32:46 mail-test postfix/smtpd[16006]: connect from
unknown[192.168.25.3]
Feb 14 03:32:46 mail-test postfix/smtpd[16006]: disconnect from
unknown[192.168.25.3]
Is there a way to do this?
Postfix uses syslog for logging. You can use an appropriate syslog filter to
filter out these messages from going to maillog. For rsyslog (common on redhat
based systems) a filter like below should work:
create a file /etc/rsyslogd.d/postfix-ignore.conf with the below line.
if ($syslogfacility-text == 'mail' and $msg contains 'from
unknown[192.168.25.2]') then ~
Remember to restart rsyslogd after this.
--
Atnakus Arzah <atnakus.ar...@gmail.com>
When in doubt, have a cookie!