freescout icon indicating copy to clipboard operation
freescout copied to clipboard

Emails Not Being Sent To All Accounts

Open ThomasEKolb opened this issue 4 years ago • 16 comments

Hello!

We have encountered the problem that if the mailbox of the ticket system is behind a mailing list and the mailbox address is not in the "TO" or "CC" part of the header, freescout ignores the message. Some ticket systems, such as mailman, only specify the destination mail address in the "X-Original-To" / "Delivered-To".

It would be nice if freescout could also recognise mails where the mailbox address is only in the "X-Original-To" / "Delivered-To" of the header data.

ThomasEKolb avatar Aug 02 '21 14:08 ThomasEKolb

Hi, it seems that this issue is more related to the ticket #480. If two mailboxes inside freescout are subscribed to the same mailinglist only one mailbox get's the message. Due to the same message-id the message is only catched once.

It would be really nice if there is a way to resolve that problem.

ThomasEKolb avatar Aug 02 '21 16:08 ThomasEKolb

Email should be imported even if the recipient is not specified at all. You may need to find out why those emails are not imported. Import can be launched manually in Manage > System > Tools

This #480 is not related to your issue.

freescout-helpdesk avatar Aug 03 '21 14:08 freescout-helpdesk

Hello!

Email should be imported even if the recipient is not specified at all.

That's working as you described.

Later we found out that the real problem is that if several list members are mailboxes in freescout, the message is only imported once into freescout. Mailman creates a copy (= same message ID for each copy) for each list member. The log message inside freescout is "Message with such Message-ID has been fetched before" after it was imported into the first mailbox.

ThomasEKolb avatar Aug 03 '21 14:08 ThomasEKolb

Could you please attach headers of such email.

freescout-helpdesk avatar Aug 03 '21 14:08 freescout-helpdesk

Hi,

I'm a colleague of @XtomtomX

Headers of the first mail, which is picked up by freesout: mail1.txt Headers of the second mail, which is ignored by freescout: mail2.txt

The recipients (freescout mailboxes) are both subscribed to the same mailinglist ([email protected]), therefore everything in the Headers is identical except (the first and newer) Delivered-To and X-Original-To. One issue here could be, that there are two such headers, as the recipient is re-directed by mailman.

These are the related freescout logs:

[2021-08-03 16:38:40] Fetching UNREAD emails for the last 3 days.
[2021-08-03 16:38:40] Mailbox: mailbox_1
[2021-08-03 16:38:40] Folder: INBOX
[2021-08-03 16:38:40] Fetched: 1
[2021-08-03 16:38:40] 1) TEST
[2021-08-03 16:38:40] Message from: Customer
[2021-08-03 16:38:40] Thread successfully created: 14616
[2021-08-03 16:38:40] Mailbox: mailbox_2
[2021-08-03 16:38:40] Folder: INBOX
[2021-08-03 16:38:41] Fetched: 1
[2021-08-03 16:38:41] 1) TEST
[2021-08-03 16:38:41] Message with such Message-ID has been fetched before: [email protected]

sebix avatar Aug 04 '21 16:08 sebix

Thanks. We'll see what can be done.

freescout-helpdesk avatar Aug 05 '21 05:08 freescout-helpdesk

Try this app/Console/Commands/FetchEmails.php

FetchEmails.zip

freescout-helpdesk avatar Aug 06 '21 11:08 freescout-helpdesk

Thank you for the super fast response! We'll set-up a test system as soon as possible and check the patch.

sebix avatar Aug 06 '21 21:08 sebix

Hi, we've set up the test system. Here are the results:

Test after applying the patch

Test setup:

Mailbox 1 ([email protected]) - empty freescout mailbox & mail directory Mailbox 2 ([email protected]) - empty freescout mailbox & mail directory

Mailinglist "[email protected]" Members: "[email protected]", "[email protected]"

Test cases:

1. single mail to [email protected]

TO: "[email protected]" CC: "" BBC: "" Subject: "TEST to testuser1 only 15:40"

Outcome (log):

[2021-08-09 15:40:25] Fetching UNREAD emails for the last 3 days.
[2021-08-09 15:40:25] Mailbox: Test Mailbox 1
[2021-08-09 15:40:25] Folder: INBOX
[2021-08-09 15:40:25] Fetched: 1
[2021-08-09 15:40:25] 1) TEST to testuser1 only 15:40
[2021-08-09 15:40:25] Message from: Customer
[2021-08-09 15:40:25] Thread successfully created: 122
[2021-08-09 15:40:25] Mailbox: Test Mailbox 2
[2021-08-09 15:40:25] Folder: INBOX
[2021-08-09 15:40:25] Fetched: 0
[2021-08-09 15:40:25] Fetching finished

[2021-08-09 15:40:52] Fetching ALL emails for the last 3 days.
[2021-08-09 15:40:52] Mailbox: Test Mailbox 1
[2021-08-09 15:40:52] Folder: INBOX
[2021-08-09 15:40:52] Fetched: 1
[2021-08-09 15:40:52] 1) TEST to testuser1 only 15:40
[2021-08-09 15:40:52] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:40:52] Mailbox: Test Mailbox 2
[2021-08-09 15:40:52] Folder: INBOX
[2021-08-09 15:40:52] Fetched: 0
[2021-08-09 15:40:52] Fetching finished

2. single mail to [email protected]

TO: "[email protected]" CC: "" BBC: "" Subject: "TEST to testuser2 only 15:41"

Outcome (log):

[2021-08-09 15:41:35] Fetching ALL emails for the last 3 days.
[2021-08-09 15:41:35] Mailbox: Test Mailbox 1
[2021-08-09 15:41:35] Folder: INBOX
[2021-08-09 15:41:35] Fetched: 1
[2021-08-09 15:41:35] 1) TEST to testuser1 only 15:40
[2021-08-09 15:41:35] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:41:35] Mailbox: Test Mailbox 2
[2021-08-09 15:41:35] Folder: INBOX
[2021-08-09 15:41:35] Fetched: 1
[2021-08-09 15:41:35] 1) TEST to testuser2 only 15:41
[2021-08-09 15:41:35] Message from: Customer
[2021-08-09 15:41:35] Thread successfully created: 123
[2021-08-09 15:41:35] Fetching finished

3. mail to "[email protected]" and "[email protected]"

TO: "[email protected], [email protected]" CC: "" BBC: "" Subject: "TEST to testuser2 and testuser2 15:42"

Outcome (log):

[2021-08-09 15:42:47] Fetching UNREAD emails for the last 3 days.
[2021-08-09 15:42:47] Mailbox: Test Mailbox 1
[2021-08-09 15:42:47] Folder: INBOX
[2021-08-09 15:42:47] Fetched: 1
[2021-08-09 15:42:47] 1) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:42:47] Message from: Customer
[2021-08-09 15:42:47] Thread successfully created: 124
[2021-08-09 15:42:47] Mailbox: Test Mailbox 2
[2021-08-09 15:42:47] Folder: INBOX
[2021-08-09 15:42:47] Fetched: 1
[2021-08-09 15:42:47] 1) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:42:47] Generated artificial Message-ID v2: [email protected]
[2021-08-09 15:42:47] Message from: Customer
[2021-08-09 15:42:48] Thread successfully created: 125
[2021-08-09 15:42:48] Importing emails sent to several mailboxes at once: 2
[2021-08-09 15:42:48] 1) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:42:48] Generated artificial Message-ID: [email protected]
[2021-08-09 15:42:48] Message from: Customer
[2021-08-09 15:42:48] Thread successfully created: 126
[2021-08-09 15:42:48] 2) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:42:48] Generated artificial Message-ID: [email protected]
[2021-08-09 15:42:48] Message from: Customer
[2021-08-09 15:42:48] Thread successfully created: 127
[2021-08-09 15:42:48] Fetching finished

[2021-08-09 15:43:26] Fetching ALL emails for the last 3 days.
[2021-08-09 15:43:26] Mailbox: Test Mailbox 1
[2021-08-09 15:43:26] Folder: INBOX
[2021-08-09 15:43:26] Fetched: 2
[2021-08-09 15:43:26] 1) TEST to testuser1 only 15:40
[2021-08-09 15:43:26] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:43:26] 2) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:43:26] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:43:26] Mailbox: Test Mailbox 2
[2021-08-09 15:43:26] Folder: INBOX
[2021-08-09 15:43:26] Fetched: 2
[2021-08-09 15:43:26] 1) TEST to testuser2 only 15:41
[2021-08-09 15:43:26] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:43:26] 2) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:43:26] Generated artificial Message-ID v2: [email protected]
[2021-08-09 15:43:26] Message from: Customer
[2021-08-09 15:43:27] Thread successfully created: 128
[2021-08-09 15:43:27] Importing emails sent to several mailboxes at once: 1
[2021-08-09 15:43:27] 1) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:43:27] Generated artificial Message-ID: [email protected]
[2021-08-09 15:43:27] Message from: Customer
[2021-08-09 15:43:27] Thread successfully created: 129
[2021-08-09 15:43:27] Fetching finished

4. mail to mailinglist onto which "[email protected]" and "[email protected]" are subscribed

TO: "[email protected]" CC: "" BBC: "" Subject: "TEST to [email protected] of which testuser2 and testuser2 are member of 15:44"

Outcome (log):

[2021-08-09 15:50:03] Fetching UNREAD emails for the last 3 days.
[2021-08-09 15:50:03] Mailbox: Test Mailbox 1
[2021-08-09 15:50:03] Folder: INBOX
[2021-08-09 15:50:03] Fetched: 1
[2021-08-09 15:50:03] 1) TEST to [email protected] of which testuser2 and testuser2 are member of 15:44
[2021-08-09 15:50:03] Message from: Customer
[2021-08-09 15:50:03] Thread successfully created: 130
[2021-08-09 15:50:03] Mailbox: Test Mailbox 2
[2021-08-09 15:50:03] Folder: INBOX
[2021-08-09 15:50:03] Fetched: 1
[2021-08-09 15:50:03] 1) TEST to [email protected] of which testuser2 and testuser2 are member of 15:44
[2021-08-09 15:50:03] Generated artificial Message-ID v2: [email protected]
[2021-08-09 15:50:03] Message from: Customer
[2021-08-09 15:50:03] Thread successfully created: 131
[2021-08-09 15:50:03] Fetching finished

[2021-08-09 15:50:22] Fetching ALL emails for the last 3 days.
[2021-08-09 15:50:22] Mailbox: Test Mailbox 1
[2021-08-09 15:50:22] Folder: INBOX
[2021-08-09 15:50:22] Fetched: 3
[2021-08-09 15:50:22] 1) TEST to testuser1 only 15:40
[2021-08-09 15:50:22] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:50:22] 2) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:50:22] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:50:22] 3) TEST to [email protected] of which testuser2 and testuser2 are member of 15:44
[2021-08-09 15:50:22] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:50:22] Mailbox: Test Mailbox 2
[2021-08-09 15:50:22] Folder: INBOX
[2021-08-09 15:50:22] Fetched: 3
[2021-08-09 15:50:22] 1) TEST to testuser2 only 15:41
[2021-08-09 15:50:22] Message with such Message-ID has been fetched before: [email protected]
[2021-08-09 15:50:22] 2) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:50:22] Generated artificial Message-ID v2: [email protected]
[2021-08-09 15:50:22] Message from: Customer
[2021-08-09 15:50:22] Thread successfully created: 132
[2021-08-09 15:50:22] 3) TEST to [email protected] of which testuser2 and testuser2 are member of 15:44
[2021-08-09 15:50:22] Generated artificial Message-ID v2: [email protected]
[2021-08-09 15:50:22] Message from: Customer
[2021-08-09 15:50:22] Thread successfully created: 133
[2021-08-09 15:50:22] Importing emails sent to several mailboxes at once: 1
[2021-08-09 15:50:22] 1) TEST to testuser2  and testuser2 15:42
[2021-08-09 15:50:22] Generated artificial Message-ID: [email protected]
[2021-08-09 15:50:22] Message from: Customer
[2021-08-09 15:50:22] Thread successfully created: 134
[2021-08-09 15:50:22] Fetching finished

It seems that after applying the patch there are some cases that do not work as expected. In the displayed log there are several cases where message threads are created more than once.

Retrieving a message from the mailing list to multiple mailboxes works (without the patch it is only caught by one mailbox).

Thank you for looking into this issue!

ThomasEKolb avatar Aug 09 '21 17:08 ThomasEKolb

To, Cc and Bcc headers of each test mail are also needed.

freescout-helpdesk avatar Aug 09 '21 18:08 freescout-helpdesk

I've updated my post with the additional data.

ThomasEKolb avatar Aug 09 '21 18:08 ThomasEKolb

One small remark: I've not added the "v1" tag on line 251 which i've forgotten to copy over.

ThomasEKolb avatar Aug 09 '21 18:08 ThomasEKolb

Try this FetchEmails.zip

freescout-helpdesk avatar Aug 10 '21 15:08 freescout-helpdesk

Test after applying the 2nd patch

Mailbox 1 ([email protected]) - empty freescout mailbox & mail directory Mailbox 2 ([email protected]) - empty freescout mailbox & mail directory

Mailinglist "[email protected]" Members: "[email protected]", "[email protected]"

Test cases:

1. single mail to [email protected]

TO: "[email protected]" CC: "" BBC: "" Subject: "TEST to testuser1 only 21:42"

Outcome (log):

[2021-08-10 21:42:16] Fetching UNREAD emails for the last 3 days.
[2021-08-10 21:42:16] Mailbox: Test Mailbox 1
[2021-08-10 21:42:16] Folder: INBOX
[2021-08-10 21:42:16] Fetched: 1
[2021-08-10 21:42:16] 1) TEST to testuser1 only 21:42
[2021-08-10 21:42:16] Message from: Customer
[2021-08-10 21:42:16] Thread successfully created: 230
[2021-08-10 21:42:16] Mailbox: Test Mailbox 2
[2021-08-10 21:42:16] Folder: INBOX
[2021-08-10 21:42:16] Fetched: 0
[2021-08-10 21:42:16] Fetching finished

[2021-08-10 21:42:27] Fetching ALL emails for the last 3 days.
[2021-08-10 21:42:27] Mailbox: Test Mailbox 1
[2021-08-10 21:42:27] Folder: INBOX
[2021-08-10 21:42:27] Fetched: 1
[2021-08-10 21:42:27] 1) TEST to testuser1 only 21:42
[2021-08-10 21:42:27] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:42:27] Mailbox: Test Mailbox 2
[2021-08-10 21:42:27] Folder: INBOX
[2021-08-10 21:42:27] Fetched: 0
[2021-08-10 21:42:27] Fetching finished

2. single mail to [email protected]

TO: "[email protected]" CC: "" BBC: "" Subject: "TEST to testuser2 only 21:42"

Outcome (log):

[2021-08-10 21:43:34] Fetching ALL emails for the last 3 days.
[2021-08-10 21:43:34] Mailbox: Test Mailbox 1
[2021-08-10 21:43:34] Folder: INBOX
[2021-08-10 21:43:34] Fetched: 1
[2021-08-10 21:43:34] 1) TEST to testuser1 only 21:42
[2021-08-10 21:43:34] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:43:34] Mailbox: Test Mailbox 2
[2021-08-10 21:43:34] Folder: INBOX
[2021-08-10 21:43:34] Fetched: 1
[2021-08-10 21:43:34] 1) TEST to testuser2 only 21:42
[2021-08-10 21:43:34] Message from: Customer
[2021-08-10 21:43:34] Thread successfully created: 231
[2021-08-10 21:43:34] Fetching finished

3. mail to "[email protected]" and "[email protected]"

TO: "[email protected], [email protected]" CC: "" BBC: "" Subject: "TEST to testuser1 and testuser2 21:44"

Outcome (log):

[2021-08-10 21:44:47] Fetching UNREAD emails for the last 3 days.
[2021-08-10 21:44:47] Mailbox: Test Mailbox 1
[2021-08-10 21:44:47] Folder: INBOX
[2021-08-10 21:44:47] Fetched: 1
[2021-08-10 21:44:47] 1) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:44:47] Message from: Customer
[2021-08-10 21:44:47] Thread successfully created: 232
[2021-08-10 21:44:47] Mailbox: Test Mailbox 2
[2021-08-10 21:44:47] Folder: INBOX
[2021-08-10 21:44:47] Fetched: 1
[2021-08-10 21:44:47] 1) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:44:47] Message from: Customer
[2021-08-10 21:44:47] Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[email protected]' for key 'threads_message_id_index' (SQL: insert into `threads` (`conversation_id`, `user_id`, `type`, `status`, `state`, `message_id`, `headers`, `body`, `from`, `to`, `cc`, `bcc`, `source_via`, `source_type`, `customer_id`, `created_by_customer_id`, `first`, `updated_at`, `created_at`) values (117, , 1, 1, 2, [email protected], Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from EXAMPLE (EXAMPLE.com [...])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by htu.at (Postfix) with ESMTPSA id C795340007F;
	Tue, 10 Aug 2021 21:44:45 +0200 (CEST)
From: "Example" <[email protected]>
To: <[email protected]>,
	<[email protected]>
Subject: TEST to testuser1 and testuser2 21:44
Date: Tue, 10 Aug 2021 21:44:44 +0200
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0035_01D78E30.EEAA1FA0"
X-Mailer: Microsoft Outlook XX.0
Thread-Index: AdeOICDejxUmOJlEQYOjlFIPwoGNJQ==
Content-Language: de

, <div class="WordSection1"><p class="MsoNormal">TEST to testuser1 and testuser2 21:44<p></p></p></div>, [email protected], ["[email protected]","[email protected]"], , , 1, 1, 3, 3, 1, 2021-08-10 21:44:47, 2021-08-10 21:44:47)); File: /www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php (664)
[2021-08-10 21:44:47] Importing emails sent to several mailboxes at once: 2
[2021-08-10 21:44:47] 1) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:44:47] Generated artificial Message-ID v1: [email protected]
[2021-08-10 21:44:47] Message from: Customer
[2021-08-10 21:44:48] Thread successfully created: 234
[2021-08-10 21:44:48] 2) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:44:48] Generated artificial Message-ID v1: [email protected]
[2021-08-10 21:44:48] Message from: Customer
[2021-08-10 21:44:48] Thread successfully created: 235
[2021-08-10 21:44:48] Fetching finished

[2021-08-10 21:45:03] Fetching ALL emails for the last 3 days.
[2021-08-10 21:45:03] Mailbox: Test Mailbox 1
[2021-08-10 21:45:03] Folder: INBOX
[2021-08-10 21:45:03] Fetched: 2
[2021-08-10 21:45:03] 1) TEST to testuser1 only 21:42
[2021-08-10 21:45:03] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:45:03] 2) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:45:03] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:45:03] Mailbox: Test Mailbox 2
[2021-08-10 21:45:03] Folder: INBOX
[2021-08-10 21:45:03] Fetched: 2
[2021-08-10 21:45:03] 1) TEST to testuser2 only 21:42
[2021-08-10 21:45:03] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:45:03] 2) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:45:03] Message from: Customer
[2021-08-10 21:45:03] Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[email protected]' for key 'threads_message_id_index' (SQL: insert into `threads` (`conversation_id`, `user_id`, `type`, `status`, `state`, `message_id`, `headers`, `body`, `from`, `to`, `cc`, `bcc`, `source_via`, `source_type`, `customer_id`, `created_by_customer_id`, `first`, `updated_at`, `created_at`) values (120, , 1, 1, 2, [email protected], Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from EXAMPLE (EXAMPLE.com [...])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by htu.at (Postfix) with ESMTPSA id C795340007F;
	Tue, 10 Aug 2021 21:44:45 +0200 (CEST)
From: "Example" <[email protected]>
To: <[email protected]>,
	<[email protected]>
Subject: TEST to testuser1 and testuser2 21:44
Date: Tue, 10 Aug 2021 21:44:44 +0200
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0035_01D78E30.EEAA1FA0"
X-Mailer: Microsoft Outlook XX.0
Thread-Index: AdeOICDejxUmOJlEQYOjlFIPwoGNJQ==
Content-Language: de

, <div class="WordSection1"><p class="MsoNormal">TEST to testuser1 and testuser2 21:44<p></p></p></div>, [email protected], ["[email protected]","[email protected]"], , , 1, 1, 3, 3, 1, 2021-08-10 21:45:03, 2021-08-10 21:45:03)); File: /www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php (664)
[2021-08-10 21:45:03] Importing emails sent to several mailboxes at once: 1
[2021-08-10 21:45:03] 1) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:45:03] Generated artificial Message-ID v1: [email protected]
[2021-08-10 21:45:03] Message from: Customer
[2021-08-10 21:45:03] Thread successfully created: 237
[2021-08-10 21:45:03] Fetching finished

4. mail to mailinglist onto which "[email protected]" and "[email protected]" are subscribed

TO: "[email protected]" CC: "" BBC: "" Subject: "TEST to [email protected] of which testuser1 and testuser2 are member of 21:46"

Outcome (log):

[2021-08-10 21:46:18] Fetching UNREAD emails for the last 3 days.
[2021-08-10 21:46:18] Mailbox: Test Mailbox 1
[2021-08-10 21:46:18] Folder: INBOX
[2021-08-10 21:46:18] Fetched: 1
[2021-08-10 21:46:18] 1) TEST to [email protected] of which testuser1 and testuser2 are member of 21:46
[2021-08-10 21:46:18] Message from: Customer
[2021-08-10 21:46:18] Thread successfully created: 238
[2021-08-10 21:46:18] Mailbox: Test Mailbox 2
[2021-08-10 21:46:19] Folder: INBOX
[2021-08-10 21:46:19] Fetched: 1
[2021-08-10 21:46:19] 1) TEST to [email protected] of which testuser1 and testuser2 are member of 21:46
[2021-08-10 21:46:19] Generated artificial Message-ID v2: [email protected]
[2021-08-10 21:46:19] Message from: Customer
[2021-08-10 21:46:19] Thread successfully created: 239
[2021-08-10 21:46:19] Fetching finished

[2021-08-10 21:46:30] Fetching ALL emails for the last 3 days.
[2021-08-10 21:46:30] Mailbox: Test Mailbox 1
[2021-08-10 21:46:30] Folder: INBOX
[2021-08-10 21:46:30] Fetched: 3
[2021-08-10 21:46:30] 1) TEST to testuser1 only 21:42
[2021-08-10 21:46:30] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:46:30] 2) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:46:30] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:46:30] 3) TEST to [email protected] of which testuser1 and testuser2 are member of 21:46
[2021-08-10 21:46:30] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:46:30] Mailbox: Test Mailbox 2
[2021-08-10 21:46:30] Folder: INBOX
[2021-08-10 21:46:30] Fetched: 3
[2021-08-10 21:46:30] 1) TEST to testuser2 only 21:42
[2021-08-10 21:46:30] Message with such Message-ID has been fetched before: [email protected]
[2021-08-10 21:46:30] 2) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:46:30] Message from: Customer
[2021-08-10 21:46:30] Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[email protected]' for key 'threads_message_id_index' (SQL: insert into `threads` (`conversation_id`, `user_id`, `type`, `status`, `state`, `message_id`, `headers`, `body`, `from`, `to`, `cc`, `bcc`, `source_via`, `source_type`, `customer_id`, `created_by_customer_id`, `first`, `updated_at`, `created_at`) values (124, , 1, 1, 2, [email protected], Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from EXAMPLE (EXAMPLE.com [...])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by htu.at (Postfix) with ESMTPSA id C795340007F;
	Tue, 10 Aug 2021 21:44:45 +0200 (CEST)
From: "Example" <[email protected]>
To: <[email protected]>,
	<[email protected]>
Subject: TEST to testuser1 and testuser2 21:44
Date: Tue, 10 Aug 2021 21:44:44 +0200
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0035_01D78E30.EEAA1FA0"
X-Mailer: Microsoft Outlook XX.0
Thread-Index: AdeOICDejxUmOJlEQYOjlFIPwoGNJQ==
Content-Language: de

, <div class="WordSection1"><p class="MsoNormal">TEST to testuser1 and testuser2 21:44<p></p></p></div>, [email protected], ["[email protected]","[email protected]"], , , 1, 1, 3, 3, 1, 2021-08-10 21:46:30, 2021-08-10 21:46:30)); File: /www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php (664)
[2021-08-10 21:46:30] 3) TEST to [email protected] of which testuser1 and testuser2 are member of 21:46
[2021-08-10 21:46:30] Generated artificial Message-ID v2: [email protected]
[2021-08-10 21:46:30] Message from: Customer
[2021-08-10 21:46:30] Thread successfully created: 241
[2021-08-10 21:46:30] Importing emails sent to several mailboxes at once: 1
[2021-08-10 21:46:30] 1) TEST to testuser1 and testuser2 21:44
[2021-08-10 21:46:30] Generated artificial Message-ID v1: [email protected]
[2021-08-10 21:46:30] Message from: Customer
[2021-08-10 21:46:30] Thread successfully created: 242
[2021-08-10 21:46:30] Fetching finished

ThomasEKolb avatar Aug 10 '21 20:08 ThomasEKolb

We'll give up on this for now and leave for community to work on.

freescout-helpdesk avatar Aug 11 '21 05:08 freescout-helpdesk

It's not necessary that the mail is duplicated/re-directed by mailman, the same behaviour occurs when with mail aliases, e.g.:

originalrecipient: mailbox1 mailbox2

Arrives in one mailbox, the other:

[2022-01-22 19:40:28] Mailbox: **
[2022-01-22 19:40:29] Folder: INBOX
[2022-01-22 19:40:29] Fetched: 1
[2022-01-22 19:40:29] 1) {Subject}
[2022-01-22 19:40:29] Message with such Message-ID has been fetched before: ...

sebix avatar Jan 22 '22 18:01 sebix

Closing for no activity.

freescout-helpdesk avatar Dec 19 '22 11:12 freescout-helpdesk

Is the issue resolved?

sebix avatar Dec 19 '22 11:12 sebix