Hello postfix-users,

I run pf 3.10-20250107 on ubuntu 24.04.

I use sender_bcc_maps and recipient_bcc_maps with pcre: mapping. The files are 
simple.

However, I am puzzled by some behaviour of postfix that doesn't fit my 
expectation somehow.

In my main.cf the corresponding directives are
---8<---
always_bcc =
recipient_bcc_maps = pcre:$meta_directory/administrator_recipient_bcc.pcre
sender_bcc_maps = pcre:$meta_directory/administrator_sender_bcc.pcre
lmtp_destination_recipient_limit = 1
---8<---

Some recipient on my machine receives emails from some firewall, where the 
sender email is more or less

/^spalertd@.*$/        ignorethis

I do not want a copy of mails from those senders. Therefore I have added it to 
the
sender_bcc_maps-File (expression as above). (ignorethis is an alias for |cat > 
/dev/null).

However, I still get copies of those emails.

Why?

When I do
root@butterfly:/etc/postfix# echo spale...@xyz.com | postmap -q - 
pcre:/etc/postfix/administrator_sender_bcc.pcre
spale...@xyz.com        ignorethis

So in theory, it should NOT deliver a bcc copy. Right?

When looking at the
https://www.postfix.org/postconf.5.html
manual entries for sender_bcc_maps and recipient_bcc_maps, both have in common 
they get evaluated when an external email enters postfix.
This applies to the spale...@xyz.com mails.

I do not have spalertd@ in recipient_bcc_maps.

Now the funny thought to my question. Does the ORDER of the main.cf directives 
play a role?

Hm, no, it doesn't.

Where is my mental mistake?

Thanks for pointing out solutions.

Florian


_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to