Hi,
I’m searching for a method to remove specific parts from the incoming email, like specific image url, text etc.
All incoming emails will create a ticket and will be received from a single domain, and most of the users keep their signature which contains 4-5 images that ends up as attachments on the ticket.
I want to avoid all those attachments and to remove them so the ticket will be created without.
I tried to understand how custom scripts, actions etc works, but I couldn’t figure this out.
Any help will be useful.
Regards,
Adrian
The scrips won’t stop these attachments being created because the ticket transaction (and thus all the components from the email) will already exist by the time the first scrips are fired off by RT. Probably the best you can do is to search through the transactions for the attachments and then delete those after they’ve been created, but that might be tricky if they’re signatures because each one will be different.
Well, my intention is to remove only the images from the signatures, which are the same links in 95% of the cases.
You mean to modify in DB? If yes, that might be a solution, but will have to run so many times and stress the server so much
You might need a custom script or email filtering rule to strip signatures from incoming emails automatically. Some ticketing systems allow regex-based filtering or plugins to handle this. If you’re looking for a way to remove your signature from Outlook before emails are processed, you could also explore Outlook rules or third-party tools to clean up incoming messages.
I think there are two approaches you could take here:
-
Strip out the attachments using a filter before the messages are handed off to RT for processing. That’ll depend on how you’re ingesting the emails.
-
Write a plugin that is run before the email is decoded (parsed by RT) that modifies it. See BeforeDecode in Extending/Mail plugins - RT 5.0.7 Documentation - Best Practical .
Cheers,
Andrew