deltachat-core-rust icon indicating copy to clipboard operation
deltachat-core-rust copied to clipboard

Duplication of sent messages (G-Mail)

Open Gh0stz0x opened this issue 2 years ago • 5 comments

  • Operating System (Linux/Mac/Windows/iOS/Android): Android 11

  • Delta Chat Version: 1.30.3

  • Expected behavior: When I send a message, only one message should be shown with no duplicates

  • Actual behavior: When I send a message with my G-Mail account, the messages are duplicated because probably G-Mail changes the ID of the messages sent

  • Steps to reproduce the problem:

  • Screenshots: Screenshot_20220622_071909 Screenshot_20220622_072812_edit_207894030217236 Screenshot_20220622_072939

  • Logs:

I thank the Municipality of Sueglio and the scrutineers for their patience in allowing me to test in the group 😅

Gh0stz0x avatar Jun 22 '22 05:06 Gh0stz0x

Maybe this could help to solve the issue: https://stackoverflow.com/questions/40804429/gmail-is-modifying-headermessage-id-of-incoming-mails

gerryfrancis avatar Jun 22 '22 23:06 gerryfrancis

@gerryfrancis Always very efficient Gerry!

ghost avatar Jun 24 '22 06:06 ghost

Recent change that revealed this issue: #3369 Previously we skipped Sent folder, but doing so is not a solution.

link2xt avatar Jun 26 '22 17:06 link2xt

from the reasoning of #3369:

[...] As a result configured_sentbox_folder becomes unset after folder scan, making it impossible to watch Sent folder, and Spam folder is never scanned. [...]

if it somehow helps to get rid of the "Watch Sendbox folder" option, we can go for it - we were several times close to remove it anyway. if Sendbox is scanned on a regular base, this is regarded as sufficient (i know, some really love this option, we know these points :) however, having duplicate mails is much worse.

so, if we would revert #3369 (partly) and drop "Watch Sendbox folder", the only remaining issue seems to be that the "spam folder" is never scanned, which could probably be added easily.

r10s avatar Jun 28 '22 10:06 r10s

@r10s It all goes back to this issue: https://github.com/deltachat/deltachat-core-rust/issues/2885

Why not implement a similar workaround for Gmail, too?

gerryfrancis avatar Jun 28 '22 11:06 gerryfrancis

I am using QQ Mail(mail.qq.com). It seems that the tencent's mail server also changes the ID of the messages sent and it puts original Message-ID in X-OQ-MSGID. So I come into the same problem.

Can we have an option for these overwritting Message-ID mail servers to enable a workaround like the issue mentioned above (https://github.com/deltachat/deltachat-core-rust/issues/2885) when setting imap/stmp servers?

Zkdc avatar Oct 19 '22 08:10 Zkdc

It's not even clear to me why these duplicate messages are produced.

  • re @link2xt are you sure that https://github.com/deltachat/deltachat-core-rust/pull/3369 revealed this issue? Because, these duplicate messages are messages sent by DeltaChat. The "Sent" folder only contains messages sent by classical MUAs; DeltaChat messages are in the "Inbox" or "DeltaChat" folder.

  • re @r10s I'm pretty sure that removing the "Watch Sendbox folder" option wouldn't help

  • @Gh0stz0x

    because probably G-Mail changes the ID of the messages sent

    Can you check if this is true? In my test, GMail didn't change the Message-ID of sent or received messages. If you need explanations how to do this, just ask :)

  • re @Zkdc If we add an option, most people won't find it, but at this point I'm wondering if we should just use this workaround unconditionally.

Hocuri avatar Nov 05 '22 16:11 Hocuri

The "Sent" folder only contains messages sent by classical MUAs; DeltaChat messages are in the "Inbox" or "DeltaChat" folder.

As far as I know Gmail puts messages you send over SMTP into Sent, even if you send them from Delta Chat.

link2xt avatar Nov 05 '22 17:11 link2xt

Ah OK, thanks, makes sense (also: ah, OK, weird)

Hocuri avatar Nov 05 '22 17:11 Hocuri

A fix that may be related: #3760

link2xt avatar Dec 06 '22 18:12 link2xt

This is likely fixed by #4826 which ensures Delta Chat can find original Message-ID even if it is rewritten. Otherwise better open a new issue after reproducing on a recent Delta Chat version.

link2xt avatar Apr 25 '24 12:04 link2xt