Emails generated with python smtplib do not show up reliably, also a feature suggestion

Thanks for your work creating Delta Chat.

How does Delta Chat determine whether to show an email? I’ve been having trouble getting emails that I generated in python and sent to myself (that I can see in Thunderbird) to show up in Delta Chat. Are there required headers?

And the feature suggestion: What if Delta Chat had an option to show all emails in the imap folder, and the chat selection menu on the left grouped by contact like normal texting apps (is it trying to group by subject now?). And turn off the Accept/Reject feature, again to be similar to normal texting apps, just show everything. If I want to delete a conversation, delete on Delta Chat AND imap. Don’t store any meta data outside the imap inbox/sent folder. And don’t wait for new emails to come - display all emails that are there even before Delta Chat was installed. Just give it normal email client features, no more or less, but with the chat interface style. This would let you run a Delta Chat client on multiple devices (don’t know if you can do that now).

I’m using desktop Arch Linux AUR version

In the settings you can select wether to only show “chat emails” or “all emails”.
“Only chat emails” is the default, because there are people that want to use DeltaChat next to their normal email client with the same account.

Backup import/export + BCC self option let you do that.

I just now uninstalled and reinstalled Delta Chat and sent two emails to myself. One showed up in Delta Chat and the other didn’t. I selected to show all classic emails. Is this a bug? During this time I also received two “non python generated” emails both of which showed up in Delta Chat on the left labeled “request”.

Details below. some information changed of course for privacy.

5555555555@example.com and 4444444444@example.com are aliases (go to the same inbox / imap account) as username@example.com. 5555555555 and 4444444444 are real phone numbers without any +1 or country code.

> sudo pacman -Rs deltachat
> rm -R deltachat-desktop
> git clone https://aur.archlinux.org/deltachat-desktop.git
> cd deltachat-desktop/
> sudo pacman -Syu

(restart computer)

> cd deltachat-desktop/
> makepkg -sirc

start Delta Chat
(looks like account information didn’t get removed with reinstallation, so I now delete it)
… → “Switch Accounts”
delete 5555555555@example.com? → “DELETE ACCOUNT”
“LOG IN TO YOUR SERVER”

E-Mail Address: 5555555555@example.com
Password: password

IMAP Login Name: username@example.com
IMAP Server: mail.gandi.net
IMAP Port: 993
IMAP Security: SSL/TLS

SMTP Login Name: (blank - smtp server not secured)
SMTP Password: (blank)
SMTP Server: example.com
SMTP Port: 8025
SMTP Security: Off

Certificate Checks: Automatic

Use SOCKS5: (switched off)

“LOG IN”
10 chats are showing up on the left (still didn’t delete data? is there a data folder/file/database I can try manually deleting)
I have 65 messages in the DeltaChat folder in Thunderbird

… → Settings
Show Classic E-Mails → All

Send an email (shows up in Thunderbird AND Delta chat)
Send a response via Delta Chat
Send another email (shows up in Thunderbird BUT NOT Delta chat)

Return-Path: <4444444444@example.com>
Delivered-To: username@example.com
X-Envelope-To: 5555555555@example.com
Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [xxx.xx.xxx.xxx])
	by spool.mail.gandi.net (Postfix) with ESMTPS id E2158D8067D
	for <5555555555@example.com>; Fri, 25 Feb 2022 17:46:39 +0000 (UTC)
Received: (Authenticated sender: username@example.com)
	by mail.gandi.net (Postfix) with ESMTPSA id 9C899FF805
	for <5555555555@example.com>; Fri, 25 Feb 2022 17:46:39 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
From: 4444444444@example.com
To: 5555555555@example.com
X-GND-Status: LEGIT
Received-SPF: pass (spool5: domain of example.com designates xxx.xx.xxx.xxx as permitted sender) client-ip=xxx.xx.xxx.xxx; envelope-from=4444444444@example.com; helo=relay9-d.mail.gandi.net;
Authentication-Results: spool.mail.gandi.net;
	dkim=none;
	dmarc=none;
	spf=pass (spool.mail.gandi.net: domain of 4444444444@example.com designates xxx.xx.xxx.xxx as permitted sender) smtp.mailfrom=4444444444@example.com

Test email
Return-Path: <4444444444@example.com>
Delivered-To: username@example.com
X-Envelope-To: 5555555555@example.com
Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [xxx.xx.xxx.xxx])
	by spool.mail.gandi.net (Postfix) with ESMTPS id 8EAB5740039
	for <5555555555@example.com>; Fri, 25 Feb 2022 17:48:14 +0000 (UTC)
Received: (Authenticated sender: username@example.com)
	by mail.gandi.net (Postfix) with ESMTPSA id 56BA7FF807
	for <5555555555@example.com>; Fri, 25 Feb 2022 17:48:14 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
From: 4444444444@example.com
To: 5555555555@example.com
X-GND-Status: LEGIT
Received-SPF: pass (spool2: domain of example.com designates xxx.xx.xxx.xxx as permitted sender) client-ip=xxx.xx.xxx.xxx; envelope-from=4444444444@example.com; helo=relay9-d.mail.gandi.net;
Authentication-Results: spool.mail.gandi.net;
	dkim=none;
	spf=pass (spool.mail.gandi.net: domain of 4444444444@example.com designates xxx.xx.xxx.xxx as permitted sender) smtp.mailfrom=4444444444@example.com;
	dmarc=none

Another test email

Edit: at one time I had the account 4444444444@example.com set up on Delta Chat. Although that account has been deleted, maybe that data is still sitting around that might contribute to the intermittent behavior?

Thanks for tip, I may try in the future. I still recommend my suggestions of not using meta data and just using imap data, and removing the accept/reject feature, although I admit less intimate knowledge regarding your codebase and what you’re trying to do.

They could still do this. If they didn’t want normal emails and Delta Chat emails to mix:

  • the user can create a separate imap folder (like the DeltaChat folder)
  • add an interface option on Delta Chat to select the current imap folder (inbox/sent/DeltaChat/Work/whatever). The chats available on the left will adjust to show all the messages in the folder.
  • have Delta Chat detect (based on sender, thread/subject, headers, preferably not meta data) if a new email in the inbox is a continuation of an existing chat and move to the appropriate folder.

The fact that Delta Chat treats second message without Message-ID as a duplicate and deletes it is a known bug:

Anyway, it’s a good idea to always add an unique Message-ID to your messages. Your message SHOULD (according to RFC 5322 - Internet Message Format) have an unique Message-ID header. Without this header it is impossible to reliably detect duplicates and impossible to reply to mails.

Did not know about this header and its importance. Thanks! works now

1 Like