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

I originally tried following the directions provided by Victor Duchovni (see link below), but I evidently didn't follow along well enough to replicate the results.

I seem to have found a combination of settings which accomplishes my goal and have listed them below. Are there any issues that you can spot with my approach?

always_bcc = [email protected]
smtpd_delay_reject = yes
smtpd_recipient_restrictions =
  ...
  check_sender_access proxy:mysql:/etc/postfix/mysql-sender_access.cf,
  ...


Within the access table I'm mapping the health check sender address to the DISCARD action. This appears to accomplish the original goal of exercising the entire intake workflow (port is open, Postfix is running, sender IP is allowed, sender email address is allowed, address resolution is working) AND also prevents those health check emails from going to the always_bcc email address while still sending everything else over.

Thanks in advance for reading this and offering suggestions.

Refs:

http://www.postfix.org/postconf.5.html
http://www.postfix.org/access.5.html
http://www.postfix.org/pcre_table.5.html
http://postfix.1071664.n5.nabble.com/exclude-email-account-from-always-bcc-td13695.html

Reply via email to