I have a postfix relay system that uses HAProxy to check to make sure Postfix is responding as it should. There is a front-end load balancer which connects using an internal IP to the backend servers. Is there any way I can exclude this particular IP address from filling up the logs? I need HAProxy to run regular checks to make sure the server is up and running but I don't want this being logged every time.
Thanks in advance, Chris.
I'm not clear which logs you are talking about exactly. You might be interested in the following HAProxy option
log-health-checks
:http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-option%20log-health-checks
However, more generally you might consider investigating filtering options in rsyslogd. Assuming you whatever log you referring to is syslog traffic, rsyslogd can do all sorts of manipulations to that log data before logging it. See rsyslog filters for examples.
rsyslog filter is easiest.
I assume you have a good network health where you register rDNS Records
Add this line before
mail.*
In addition of the answer of Jacob Evans, the IP can be added to the Postfix parameter smtpd_client_event_limit_exceptions to avoid the IP is taken into account in the statistics by anvil. In this parameter you will probably want to keep the value from $mynetworks also.
I used these two mechanisms to avoid the monitoring pollutes the Postfix log each minute.