You can headers_add in a router, but I can see no way to change the SMTP From aka Envelope-From within a router or indeed anywhere using the same conditions the router triggers on.
I need to emulate mailman behaviour for a very small number of exim "alias" type list expansions.
Eg: if someone sends email to my: [email protected] address and that is handled by the redirect router section, only then do I want to rewrite the SMTP From to be something local, possibly [email protected]
Similar to how mailman would handle it. The main reason: SPF at the next level mail gateway and mail sent from external users.
I've tried conditional rewrite rules but to be honest, I've never done those before and I'm getting in a muddle.