Subject: Maintaining Original Recipient in BCC Scenarios with Sieve Filters
Hello, friendly community.
I have a CRM system.
In address rewriting, there is a BCC map that sends a copy to the crm@example.com mailbox, where a script checks the “To” and “Cc” fields in the email header and registers emails into the system. Everything works as expected.
Here is the issue:
Sometimes, a client sends an email using the “Bcc” field, leaving the “To” and “Cc” fields empty.
When such an email is copied by address rewriting, all information about the original recipient of this email is lost. Even the "X-Original-To"becomes crm@example.com.
Is there any way to add a Sieve filter before address rewriting occurs to add a custom header like “X-Saved-To” that could be used by my script?
The filters that I can add via the web UI work after address rewriting is done.