Prevent deletion of E-Mails with custom mail handler

i created a custom mail handler for JIRA based on this tutorial .
My issue is that I don’t want the handled E-Mails deleted but rather marked as read or seen and then only handle E-Mails that are marked as unseen.
How can I achieve this? So far I haven’t found any information in the documentation.