Receiving blank emails with encrypted attachments whenever an email blocked, deleted or accepted

Hi.

I am using Gmail and Deltachat for the same account.
Whenever I block, delete or accept an email from the Deltachat client, I receive a blank email from me in Gmail with 2 attachments:
image

I have enabled the ā€˜Move automatically to Deltachat Folderā€™ in Advanced settings.
Delta Chat: 1.46.7
Android: 14

I use different clients but am seeing the same issue.

These are likely sync messages used for multi-device synchronisation.

Iā€™ve tried to generate a sync message using Delta Chat Core from the main branch by changing my displayname (the same should happen when the user blocks or accepts chats). In the Gmail web UI it appears in Inbox, but when i tap ā€œRefreshā€, it disappears and can be seen only if i tap on the ā€œDeltaChatā€ label on the left sidebar. But before this happens afaiu a notification is generated and the user sees the message in Inbox. Also ā€œDeltaChatā€ is not displayed as a folder, but as a ā€œLabelā€ (tag). But it seems that Gmail calls all folders labels, but the standard ones have nice icons and are shown in the top, others like ā€œDeltaChatā€ have some fallback icon and are shown in the bottom.

So it looks like Gmail displays all ā€œunnoticedā€ messages in Inbox, even if they are actually in other folders. When they become noticed (user has tapped ā€œRefreshā€), they arenā€™t displayed anymore.

Have no idea how to fix this yet, just my observings.

You are observing the message arriving in the inbox before deltachat has moved it to the deltachat folder.

Gmail will always be first to know about incoming messages, and it will appear in the proprietary gmail webclient/app before imap clients know a new message exists.

If you use multiple imap clients, itā€™s also not guaranteed that deltachat will move the messages out of the inbox before other imap clients see them.

The best way to deal with this is to have the mailserver itself deliver messages directly to the desired folder using filtering rules.

Deltachat messages can be identified by headers, and you can create a rule to skip the inbox for any mail with deltachatā€™s header.

ā€¦ if you werenā€™t using gmail. Unfortunately this is one of several reasons gmail is a substandard email provider. Gmail does not let you filter mail by header.

You may be able to use plus addressing as a workaround. You would have to define your email address in deltachat as username+deltachat@gmail.com, and then you may create a gmail filter to deliver those messages to the appropriate folder, skipping the inbox.

@ Devs, perhaps this could be a formally supported cludge option: let the user define an alias for deltachat metadata mails.

1 Like

Yes, i think that is the reason, if i stop my browser and resume it (kill -s STOP/CONT) after Delta Chat has moved the message to its folder (which takes several seconds), i donā€™t see the message appearing in Inbox. But if donā€™t stop the browser, the message sticks in Inbox until i tap ā€œRefreshā€ (i.e. even after itā€™s moved). Though this is not very important, probably we need to think of making it possible to filter Delta Chat messages somehow indeed.

That behavior actually sounds like a bug with gmail. It must not have realtime awareness of changes made by imap clients.

Btw we can use IMAP APPEND to the DeltaChat folder for sync messages. This way they wonā€™t appear in Inbox before being moved to ā€œDeltaChatā€ and annoy users using other MUAs as well. Also itā€™s less work overall, only one IMAP command. But maybe a bit complicated to implement as currently all messages are sent by SMTP. Thanks to @Simon for the idea. CC @link2xt

For implementation discussion there is a GitHub issue:

I commented there. Seems somewhat straightforward as actual sync data is stored in a separate SQL table.

1 Like