Prevent double ticket creation, when multiple mailboxes are CC'ed

Sometimes customers address an email to two shared mailboxes, for example they send it to support@domain.com, and then cc (or also to) sales@domain.com, since these are configured as two separate mail channels in zammad, this will create the ticket twice, once for each channel. It would be nice if zammad would detect the same message arrived over the two channels, and only create 1 ticket.
Since it would be none deterministic in which group the ticket should land, maybe it’s possible to assign the message to both channels, otherwise it would be fine to pick a channel, and it would be up to the agent to assign the correct channel. I understand customers need to be educated about this, but that’s hard, unfortunate. And it would be nice if zammad could solve this.

1 Like

Sorry but in my opinion that’s rather difficult to fullfil because it may be a desired action.
The message ID is not always the same - if it is, Zammad should not get the mail twice in theory.

You could workaround this by using one mailbox with aliases and postmaster filters to still have correct sorting based on the mail address the ticket came from.

The behavior you described highly depends on the used mail server and works differently on many mail servers. For example: hmailserver does act that way, exchange doesn’t most of the time.

We indeed have an exchange server, but i could setup another mailserver which fetches from the exchange server first. But this isn’t really desirable setup for us.
On what information is the message id produced, is it only the subject+body of the message? Cause when i test this case i do receive 2 ticket’s, 1 in each group/channel.

The creation of message IDs is completely up to the mail servers involved.

If Zammad fetches two mails from multiple CC’ed mailboxes, this is because you have several messages in your mailboxes. In Zammad they’re technically duplicates, yes, but not in the mail world.

There’s nothing really you can do about that.
You could try to switch to one mailbox with all the aliases you need, but I’m not sure if this will really fix your issue.

Oke, that make’s sense. I recently saw this PR being merged; Fix empty msgid by dsukhin · Pull Request #2063 · zammad/zammad · GitHub (Fixes #2063 - parses emails with empty msgid. Thanks to @dsukhin ❤️ · zammad/zammad@893acd2 · GitHub) which generates an message-id when none-exists.
Maybe it’s an idea to extend on this, and allow a user configurable message id, for example based on subject, body, sender and recipients? So that unique message’s could be identified based on these fields, instead of being dependent on the implementation of the mail server.

This topic was automatically closed after 416 days. New replies are no longer allowed.