On 5/11/2018 2:20 PM, Wietse Venema wrote:
deoren:
My apologies if I overlooked an answer somewhere, but I checked the docs
and performed a brief search of the archives before asking and didn't
spot the answer.
Goal:
BCC everything EXCEPT for health check emails generated by our HAProxy
load-balancer
Use a CIDR map:
/etc/postfix/main.cf
smtpd_client_restritions =
check_client_access cidr:/etc/postfix/client-access.cidr
etc/postfix/client-access.cidr:
# First, a rule that matches healtcheck mail.
1.2.3.4/32 DUNNO
# Add a BCC recipient to other email.
0.0.0.0/0 BCC [email protected]
This requires Postfix 3.0 or later.
Wietse
Thank you for the feedback and the solution.
I assume that the performance for this solution is going to be much
better than the approach I went with? I'm guessing that this approach
will also be much more stable over the long run as well. To continue
that thought, this approach also keeps the two specific actions together
in a single block which should be easier for anyone reviewing the
settings to mentally parse.