-2

I'm trying to use postfix feature content_filter like:

my_script unix  -      n        n       -      10        pipe
  flags=Rq user=filter argv=/usr/local/bin/my_script.py -f ${sender} -- ${recipient}

And my question is, how I can check BCC recipient in my script? My script is only reinjecting e-mail back to the postfix. I don't want to change anything with it, and I don't want to save it as a file. I simply need to read each e-mail from postfix from stdin. But when I'm doing it my BCC are ignored, I'm able to send e-mails only to: [TO and CC]. I think that's because BCC is not in the header, so my question is, where is it and how to deal with it?

Thanks!

1 Answers1

1

All recipient in TO, CC, BCC will be passed on {recipient} parameter in your script. For example if you have

  • a@example.net and b@example.net in TO address
  • p@example.com in CC address
  • z@example.org in BCC address
  • me@example.info as sender

then postfix will call your script with

/usr/local/bin/my_script.py -f me@example.info -- a@example.net b@example.net p@example.com z@example.org
masegaloeh
  • 18,236
  • 10
  • 57
  • 106