Two Tickets from one E-Mail

Infos:

Expected behavior:

One E-Mail should create one Ticket.

Actual behavior:

I’m not shure, but I think I’ve found a race condition where Zammad generates two Tickets from one E-Mail. The following happens sometimes:

Zammad fetches an E-Mail and while it processes this E-Mail the same E-Mail is fetched again and a second Ticket is created. In the production.log I see two entries:

I, [2021-01-19T11:20:08.545375 #15690-46998324254920] INFO – : Process email with msgid ‘ad333b8f05694166ad3c0168c0f60b86@domain.tld
I, [2021-01-19T11:20:16.170992 #1420-47250214050120] INFO – : Process email with msgid ‘ad333b8f05694166ad3c0168c0f60b86@domain.tld

Probably the mailserver is to blame, because it should not provide the already fetched mail. But I’m not shure if the behavior of Zammad is correct either.

Steps to reproduce the behavior:

As every race condition, very dificult to reproduce. But I can provide Logfiles if needed.

ciao
chris

I’ve rarily seen this.
This is usually the mail server at fault if it doesn’t update the seen / delete flags fast enough.

Most of the times I’ve seen this was on Exchange Servers.
A possible work around would be to increase the fetching schedulers period.

However, I’ve seen situations where also 5 minutes are not good enough.
Zammad sees those mails as new, we probably can’t do much about that.

This issue should not appear if the Channel is set to keep messages on server = true.
But that has other down sides.