When forwarding messages using Roundcube filters, sender is different than when manually forwarding

Hi, first time poster.
We have multiple email accounts set up on MIAB, for each branch of our company.
BranchA@domain.com
BranchB@domain.com
etc…

We want to forward every message received by these addresses to a main processing address (BatchProcessing@domain) so we can batch process them, but we need to have BranchA@domain be the “sender” of the email when it arrives, so we can differentiate which branch address the email was originally sent to.

When I manually forward a message in the inbox, this is the case, and we are able to get the result we want: The BatchProcessing@domain inbox shows BranchA@domain as the sender.

However, when I set up automated forwarding in roundcube, BatchProcessing@domain inbox shows the email’s original sender, not the BranchA@domain.

Is there a way to get the address doing the automatic forwarding to show up as the sender? I looked around the forum and it seems that people want the opposite, or something different.

Thanks for the help.

Ted

Someone is helping me, saying I should read this article:

Will report back with findings.

I had similar problem with small different.

I wanted also to to have what called BCC “blind carbon copy” from mail to one general mail (I’m not sure if this what you are looking for ).

for example : emailA@domain.tld and emailB@domain.tld receive emails from unknown@domain.tdl
you want copy of incoming mails to all users to be sent to one general email right ?

in /etc/postfix/main.cf you can add : always_bcc=targetMail@domain.tld
this will make copy of all incoming mails in ‘targetMail@domain.tld’ then you can filter mails as you wish inside ‘targetMail@domain.tld’

Note: I programmed small Nodejs SMTP software to read incoming mails from targetMail@domain.tld to filter them or notify me what mail to which user is came.

Hope that will help you.

I was able to “solve” the issue by having Thunderbird filters do the actual forwarding.
By using /etc/postfix/generic I was able to replace specific senders with specific forwarding addresses, but the issue with /etc/postfix/generic, is I don’t know the correct regexp for changing the original sender to the original recipient. Since no easy answer was forthcoming there, and we were on a deadline, Thunderbird had to suffice.