I need to set up an email forwarder that doesn't just redirect the message but replaces the "To" field with the new recipient also. I need this because a script does something at the last stop based on the text in the "To" field. Is this possible?

Do you have root access to this server? If so, you could configure a system filter rule that modifies the header:

Click to expand...

Thanks for the links. No, no root access unfortunately. It's a rented web hotel. I guess I could perhaps redirect the mail to a perl script that does the replacement and then sends the email again, but I don't have experience with that so was hoping for an easy solution

Staff Member

It's not possible to force Exim into rewriting the message header without root access, but feel free to post to the Exim user's mailing list to see if anyone else has done this through a custom script: