Ralf Hauser: > Hi, > > Messages with a certain content type should be bcc'd to an additional > address for my use-case at hand.
That is currently not built into Postfix, but it could be done with a Milter: in the header and body event handlers look at the content, and in the end-of-message handler invoke the "add recipient" action. But I agree that having to do that would suck. (The reason Milters can add BCC recipients but header/body_checks can't: Milter support was added later, and I have not found the make the BCC functionality available in header/body_checks). > I guess I could do this in two rounds: > 1) with header_checks relay to itself on a different port (FILTER) > 2) on that secondary smtpd, I could use the > http://www.postfix.org/postconf.5.html#recipient_bcc_maps That would also work (assuming you are not already using an after-queue filter for other purposes). > but there it says: "automatic BCC recipients are produced only for > new mail. To avoid mailer loops, automatic BCC recipients are not > generated after Postfix forwards mail internally" This is not a problem: you are sending mail out via SMTP and then receiving it via SMTP. That is not "internal" forwarding. > P.S.: There appears to be a typo in "whitespace of comma" - I guess > this should be "or" And thanks to cut and paste, this mistake happens 24 times in the same file. Thanks for noticing that. > P.P.S.: It would be useful to show a sample line of > /etc/postfix/recipient_bcc The example in the text uses recipient_bcc_maps = hash:/etc/postfix/recipient_bcc But I don't know if hash is the common use case. Wietse