https://github.com/clonemeagain/plugin-fwd-rewriterUtility plugin.
Originally developed to solve a forwarding problem, whereby tickets forwarded to the ticketing system were created "by the forwarder", not the original sender, this provides the option to "rewrite the sender", hence the name. Allows for nested forwards.
It has recently been expanded to rewrite almost anything in an email before it becomes a ticket. Almost. It doesn't touch attachments (yet). :-)
Features:
- Rewrite forwarded mail from allowed sending domains, sets the sender as the original email creator, not the person forwarding.
- Drupal contact form parser, detects a Drupal contact form email and rewrites the resulting ticket as if it was sent by the person filling out the form. Easy ticket integration with your Drupal CMS via email. (If other systems have obvious formats, let me know, we can add them)
- Add a message to the ticket body indicating it was edited. (No thread at this point, as the ticket hasn't been created yet)
- Arbitrary text find and replace, also regex find and replace (dangerous, but fun!)
- Find and replace for email addresses.
Caveats:
- English language only, sorry everyone else, pulls welcome! I can't write regex for languages I don't know.
- 1.10+ only, I could modify it for 1.9 if necessary. Open an issue.
- Only rewrites email, API can rewrite themselves, the web form should not need it.
- Only works with registration disabled: pulls welcome!
- Doesn't work with mail forwarded via Outlook. For some reason Outlook doesn't include the email address of the original sender. Frustrating.
I highly recommend the setting of email domain(s) to filter the allowed sender's of forwards, this ensures only your agents can forward tickets and have them rewritten. Bit of a security issue allowing just anyone to forward tickets, so if you don't set one, it is disabled.
Let me know if it's useful to you, feel free to submit feature requests or pulls.