Well, it just so happens I've created a mod that does something similar, you could test it for me. Might need a bit of tweaking to work for non forwarded messages, but the concept is the same. Rewriting inbound messages before the ticket is saved.
https://github.com/clonemeagain/osticket-plugin-redirector
You comfortable hacking at it or do you want me to make a new version for you?