Ram: > On 09/11/2015 08:01 PM, Wietse Venema wrote: > > Ram: > >> How can I add a bcc recipient using a policy daemon > >> > >> I have written a custom policy daemon , and the logic requires that for > >> some conditions the mail needs to be bcc'ed to a program > >> > >> Can this be done ? > > Postfix 3.0 and later: > > > > BCC user@domain > > Send one copy of the message to the specified recipient. > So can I write in my perl policy filter something like > > if($condition) { > print STDOUT "bcc scr...@domain.com"; > }
Almost. See http://www.postfix.org/SMTPD_POLICY_README.html#protocol for the expected reply syntax (there is an example at the end of this section). Wietse