Mail forward headers

That's not usually a header that is changed when forwarding.. as it would confuse the recipient to think the original email sent the message direct to the final email, when it wasn't for that address at all.

In any case, the exim.conf could in theory be edited to add code to the virtual_user_unseen and virtual_aliases_nouser_nostar sections to do that..
but it doesn't quite make sense, as there could be multiple forwarder emails in that one address...
So you'd more likely want to do the rewrite elsewhere as it comes back into the system from the aliases file... (not entirely sure how one would do that).

But I think the main question at this point is "why" one would want to... let us know :)

John
 
Hmm.. in theory (this is completely untested), since you know the "To" to check for, and what you want it changed to... we could add a system_filter for that.
This assumes that exim is NOT using the "To" header to figure out where to send the message, and is using the Envelope-To header instead...

So one this assumption, edit the /etc/system_filter.exim, find this code
Code:
if not first_deliverythen
  finish
endif
and BELOW that code, try adding:
Code:
if "$h_to" contains "[email protected]"
then
    headers remove "To"
    headers add "To: [email protected]"
endif
and restart exim.

John
 
Back
Top