On 10/29/2009 12:51 PM, Stan Hoeppner wrote:
Russ Lavoy put forth on 10/29/2009 12:39 PM:
Hello,
I have a question...
I got a request that they want email coming from usera to userb to be BCC'ed to
userc.
I am not sure how to go about that I know how to direct email from a specific
user to another specific user, but not BCC based on the from and to matches.
Can anyone help me out with that?
A few choices.
You can use smtpd_restriction_classes with an access map that
returns BCC us...@example.com.
General framework detailed here:
http://www.postfix.org/RESTRICTION_CLASS_README.html
or you can use sender_bcc_maps to BCC all mail addressed from
that sender, and then filter out the unwanted mail with a
procmail or seive script during delivery (or reverse it and
use recipient_bcc_maps -- no, there isn't a built-in
sender+recipient_bcc_maps function).
http://www.postfix.org/postconf.5.html#sender_bcc_maps
http://www.postfix.org/postconf.5.html#recipient_bcc_maps
Most flexible is to use a policy service such as postfwd and
have it return BCC us...@example.com under the proper conditions.
http://postfwd.org/
Sounds like a case for header_checks and a content filter. Someone
might know an easier way, but I'm kinda new. ;)
No, header_checks cannot compare two headers. Besides, this
really needs to operate on the envelope addresses, which
aren't available to header_checks.
Yes, you could run all mail through a content_filter and have
it generate the BCC under the trigger conditions, but that's a
more complicated solution than necessary.
-- Noel Jones