handesk icon indicating copy to clipboard operation
handesk copied to clipboard

Mail fetcher is not deleting the messages once they've been downloaded

Open ediblemanager opened this issue 7 years ago • 5 comments

Our setup Handesk fetches from helpdesk@domain

We have support@domain which forwards mail to helpdesk@domain.

When Handesk fetches from helpdesk@domain and sees a forwarded email from support@domain, it does not delete it.

Non-forwarded messages (so an email sent straight to helpdesk@domain), are deleted.

Could this be an email headers issue?

ediblemanager avatar Mar 28 '18 13:03 ediblemanager

I haven’t faced this issue yet, What we handesk does is to fetch all emails in the inbox folder, and then when it is parsed, the email is deleted. Finally, it calls the “Expunge” function that commits the deletion

Some days ago I faced and issue that if an exception was thrown, then the expugne was not called, so no email was deleted, but it has already been fixed in master and dev branches..

Can you make sure it still happens in last commit so it can really be a bug

Thanks!

Jordi Puigdellívol

El 28 de marzo de 2018 a las 15:20:52, Gordon Thomson ( [email protected]) escribió:

Our setup Handesk fetches from helpdesk@domain

We have support@domain which forwards mail to helpdesk@domain.

When Handesk fetches from helpdesk@domain and sees a forwarded email from support@domain, it does not delete it.

Non-forwarded messages (so an email sent straight to helpdesk@domain), are deleted.

Could this be an email headers issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BadChoice/handesk/issues/113, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFuzFmeHLbgGPGfr-qb0q4qxUkJaBVhks5ti44xgaJpZM4S-ogW .

BadChoice avatar Mar 29 '18 19:03 BadChoice

Hi @BadChoice , checked the latest commit in the version I've got here and it's 422895193f, so in line with the newest on master.

In my case, the strange thing is that it works when the emails aren't forwarded into the inbox. Why would they work, but not the forwarded ones? I remembered reading an issue about email headers for associating emails with tickets and wondered if somehow they were different enough from a forwarded email that Handesk was getting confused/was unable to delete & expunge? This is just speculation though.

Let me know if you need anything else from me to help debug!

ediblemanager avatar Mar 30 '18 08:03 ediblemanager

do you know if those forwarded ones are in a folder other than inbox? handesk only searches in the INBOX one

BadChoice avatar Mar 31 '18 19:03 BadChoice

Sorry for the delay in replying.

Yes, the emails are coming from Inbox to Inbox.

After doing some testing, it appears like Handesk faces issues when grabbing an email which was sent from the same domain as the one it is monitoring? To test this, I emailed from my own address to [email protected]. Handesk found this email and created a ticket, but did not delete (but it did then show as read). When the cron job executed again, Handesk read the ticket (which was marked as read) and created another duplicate ticket, this time deleting the email.

ediblemanager avatar Apr 02 '18 11:04 ediblemanager

Technically it makes no difference from where the emails come, maybe it is the mail server you are using that treats them different and the first deletion just marks them as read?

Which email server are you using?

BadChoice avatar Apr 05 '18 07:04 BadChoice