/var/log/maillog is flooded because of haproxy health checks. To
stop the flood I changed syslog.conf:

  $ grep mail /etc/syslog.conf

  *.err;kern.warning;auth.notice;mail.crit              /dev/console
  mail.warning;local5.warning   /var/log/maillog
  #mail.*;local5.*                              /var/log/maillog
  #mail.*;                                      /var/log/maillog

Initially I had `mail.*` activated (local5 is dovecot).
Obviously, setting `mail.warning`, on the one hand, reduces the
logs i.e., health checks are no longer logged. On the other hand,
quite a lot of information also gets missing: not only the
connection information from haproxy but also from any other SMTP
connection attempt.

On FreeBSD, syslog cannot filter according to the log message
content. So I'm wondering whether there is something I can do on
Postfix's side not to log connection from a specific IP/from
haproxy health checks.

I have already set

  smtpd_upstream_proxy_protocol = haproxy

Thank you for your help.


Reply via email to