jbostoen / itop-jb-mail-to-ticket-automation-v2

Originally a fork of Combodo's Mail to Ticket Automation, enriched with some new features. Also contains some bug fixes.
https://jeffreybostoen.be
6 stars 3 forks source link

Enhancement: loop protection #7

Open jbostoen opened 3 years ago

jbostoen commented 3 years ago

The idea is to have loop protection built-in.

Use cases:

The policy would check:

WIth recent, I mean a ticket within the last X hours (configuration setting). The message would be marked as undesired.

In the current implementation order of policies, this check should wait till the caller is detected.

This protection could either be written in the create/update ticket policy (con: might need a separate setting); or as a separate policy (con: will do some work twice).

However, agents might already have deleted such kind of tickets; making it impossible to just scan the user's open tickets. This leads me to the idea that there should be a table with records similar to the EmailReplica objects; but which is pruned a lot more. Preferably, it contains: person_id (Ticket has person_id and not contact_id), timestamp, subject, body.

Another configuration setting might be necessary to strip out other ticket system references; or some other form of smart detection.