This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hi,
I need to rewrite empty sender (exim generated bounce) to a valid email address.
This cannot be done in address rewriting because this valid email address is
generated from data in bounce message?
So a message exim receives via SMTP:
mail from: a@domain1
rcpt to: b@domain2
data
X-Errors-To: postmaster@domain1
....
causes bounce because mail to domain2 cannot be delivered. And this
bounce is generated by my exim I am configuring.
normal bounce format:
mail from: <>
rcpt to: a@domain1
data
X-Failed-Recipients: b@domain2
What I need to archieve is modified bounce addressing @ envelope-level:
mail from: error@domain2
rcpt to: postmaster@domain1 (<= $h_X-Errors-To)
What I have tried to do is a redirect-router:
bounce_route:
driver = redirect
senders = :
domains = !+local_domains
address_data = error@${sg{$h_X-Failed-Recipients:}{\N^(.*)\@(.*?)$\N}{\$2}}
data = $localpart@$domain
normal-case router has:
errors_to = $h_Errors-To (<= which should redirect errors to address domain1-admin wanted)
I tried searching help/faq but didn't find anything (lack of good keyworks?), and didn't find any way of
testing this bounce_route -router so it is very hard for trial and error.
Exim is v4.10..
Thanks in advance..
Best regards, Jori Hämäläinen
--