0

I am setting up a Postfix relay for one purpose - to add a specific email recipient to all emails being relayed through this server.

I thought that I could use always_bcc, which worked, but the bcc recipient can't see the original recipient of the email. (If they look at the email headers they can find the original recipient but not from the regular mail view in the Office 365 web client).

I was hoping that I could use some sort of recipient address rewriting in Postfix: @.* ---> @.*,monitor@example.com

The goal of this would be to allow the relayed mail to both go to the original recipient but also to be delivered to monitor@example.com.

Does anyone know how to do this? I certainly appreciate the help!

Dave

  • Maybe this is what you need? https://blog.sys4.de/postfix-gateway-virtual-bcc-multiplicator-en.html – Gmck Jul 26 '18 at 17:32
  • It seems to me that the problem with this is that there are no wildcards. You have to specific each recipient one at a time. I would like to be able to have a mail relay setup so that any recipient can be emailed with a copy of the email going to a fixed email address. And the catch is that the user of the fixed email address should be able to see the original recipients's email address. The problem with the always_bcc is that the bcc recipient can't see the original recipient. But thanks for the suggestion! – dbaddorf Jul 26 '18 at 22:25
  • This seemed to work for me: – dbaddorf Aug 13 '18 at 14:52
0

Actually this seemed to work for me (from Add email recipient in header in Postfix):

# main.cf
header_checks = pcre:/etc/postfix/add_original_rcpt.pcre

# cat add_original_rcpt.pcre
/^To:(\s)?(.*)$/ PREPEND X-Original-To: $2
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.