I am trying to rewrite the envelope from address domain. I would like it to match the sender address domain.
I have tried to do it using the following configuration.
begin rewrite
*@$primary_hostname $1@$sender_address_domain F
However the variable $sender_address_domain
is not available in the rewrite section. Neither is the $sender_address
.
I have also tried to set the sender_address_data
in the routers section, but the variable sender_address_data
is also not set (is null) in the rewrite section.
Any ideas? What am I missing?