In exim4, I have a redirect router which changes some headers, including the From:
header.
My SMTP transport will DKIM-sign mail if the dkim_domain
, dkim_selector
, and dkim_private_key
parameters are given. These come from a macros, e.g. in the transport:
dkim_domain = DKIM_DOMAIN
where the DKIM_DOMAIN
macro is defined as
DKIM_DOMAIN = ${lc:${domain:$h_from:}}
That's all 'normal'. But the problem is that my router is using headers_add
to change the From header, but because of this:
This means that references to header lines in string expansions in the transport’s configuration do not “see” the added header lines.
the transport is always looking to the original From header, not the rewritten one.
How can I change the macro to somehow look for the domain in a way that the router could affect? I cannot even set a custom transport in the router because it's a redirect router.