Commit Graph

10656 Commits

Author SHA1 Message Date
link2xt
aa0800b6e0 chore: bump version to 2.62.0-dev 2026-09-21 20:07:23 +00:00
link2xt
5a5597e990 chore(release): prepare for 2.61.0 v2.61.0 2026-09-21 19:45:37 +00:00
B. Petersen
94cc8a3858 api!: replace was_seen_recently by freshness in contact object
BREAKING CHANGE: use contact's `freshness` instead of `seen_recently`
2026-09-21 21:30:56 +02:00
B. Petersen
6b62fed6fa feat: a single NDN does not mark a group message as failed 2026-09-21 21:30:56 +02:00
biørn
b766a9a8fa feat: do not mark message as failed for which we got a read receipt before
this PR avoids marking a message as being failed if we already received
an read receipt for it.

background: esp. with multi relay it will easily happen that we get some
NDN for some relays. this does not mean the message at a whole was
failing, esp. if we got a read receipt (MDN) before

with https://github.com/chatmail/core/pull/8722 we do no longer process
NDN in groups, so the change of this PR affects one-to-one chats only
2026-09-21 17:04:57 +00:00
holger krekel
3d3a6352e9 fix: don't emit configure progress events during background relay additions
reported by bjoern while testing the branch on iOS: the background addition
would start fast enough to still show up in the configure-progress bar
of the initial onboarding screen. This commit should fix that.
2026-09-21 18:51:36 +02:00
holger krekel
0eddb98354 feat: try fasted relays to attempt first configure on 2026-09-21 18:51:36 +02:00
holger krekel
72e711e59a api: add init_transports() for multi-relay onboarding
Closes #8693 and supsersedes #8707 from which the API
and some overall shape of this commit is inspired.

UIs call `init_transports(None)` or `init_transports(qr)`
to initialize a first transport on the fresh profile,
with more transports added in the background later.
2026-09-21 18:51:36 +02:00
link2xt
a144a450e1 api!: remove addr field from Account objects in JSON-RPC APIs
`list_transports()` should be used instead.
Previously `addr` field might have even not correspond to any transport
as it was `Config::Addr` and not `Config::ConfiguredAddr`.

BREAKING CHANGE: list_transports() should be used instead.
2026-09-21 14:38:25 +00:00
holger krekel
b87cd8937a refactor: substitute configure progress macro with simple function call
the macro was introduced in 2019 in
6ced6ac23b
but isn't neccessary
2026-09-21 11:55:59 +02:00
link2xt
fae6a63023 fix: use correct address for Bcc-self in unencrypted mails 2026-09-19 17:44:10 +00:00
link2xt
54e16429b8 fix: use correct From address when sending MDNs 2026-09-19 17:44:10 +00:00
biørn
946120e427 feat: mark autorelays for relay operators (#8701)
this PR adds a hack to allow relay operators
to differ between manually created relays and autorelays.

this is a precaution in case unexpected things happen when introducing
autorelay; relay operators then can deny creation on `password_len ==
23`, without shutting down manual creation completely.

depeding on final initTransport() is done,
it may still be that the first created relay is marked as being manual,
but that seems fine.

`password_len` of the autmatically generated password was chosen as
there is otherwise not much data sent -
chatmail avoids visible data and metadata everywhere.

this hack is about to be removed again asap,
once we have some experiences with multi relay.

---------

Co-authored-by: l <link2xt@testrun.org>
2026-09-19 16:59:02 +02:00
link2xt
e1d58706ce api!: remove Contact.get_name_n_addr() and related APIs
UIs should use display name everywhere and avoid displaying email addresses.

BREAKING CHANGE: dc_contact_get_name_n_addr() CFFI is removed
BREAKING CHANGE: JSON-RPC contact objects don't have nameAndAddr field anymore
2026-09-19 08:16:30 +00:00
holger krekel
7876115d86 fix: use max_smtp_rcpt_to chunking for the actual transport we are sending from
removes another `ConfiguredAddr` usage
and a bug that the wrong max smtp recipients setting was used.
2026-09-18 23:37:45 +02:00
link2xt
0a7e697f50 refactor: add smtp::queue module
No changes except that smtp::is_queue_empty is renamed into smtp::queue::is_empty,
mimefactory::QueuedEncryption is renamed into smtp::queue::Encryption
and mimefactory::QueueSideEffects is renamed to smtp::queue::SideEffects.
mimefactory module does not know anything about smtp2 table anymore.
2026-09-18 18:23:16 +00:00
B. Petersen
06150d6dc2 docs: remove protect_autocrypt setting 2026-09-18 19:31:52 +02:00
link2xt
310dda494c feat: do not use ConfiguredAddr when connecting to SMTP 2026-09-18 17:10:29 +00:00
link2xt
8f39d7510f feat: do not restart I/O when setting configured_addr 2026-09-18 17:10:29 +00:00
holger krekel
44ab013351 fix: don't use extra STUN nine server for fallback
just fallback to turn.delta.chat
which also answers STUN "what is my IP address" requests.
2026-09-18 14:34:49 +02:00
link2xt
f7c97d8557 test: add pseudo transport explicitly rather than by setting ConfiguredAddr
ConfiguredAddr is going to be removed, but we need to be able to add fake transports,
also for existing offline Python tests.
2026-09-18 08:09:33 +00:00
link2xt
78caa6f53c fix: emit SmtpMessageSent event after deleting the message from SMTP queue
This is mostly needed to fix flaky
tests/test_something.py::test_is_sending_finished
by making sure that is_sending_finished() return false
once we got an event that message was sent.
2026-09-17 18:59:20 +00:00
link2xt
349c9650e3 fix: do not send a sync message when changing "configured_addr"
Sending transport is not synchronized since
cd42efb36d
(PR https://github.com/chatmail/core/pull/8510)
so there is no need to send a sync message
when the sending transport is changed.
2026-09-17 18:50:09 +00:00
holger krekel
96e84d85a5 api!: remove is_chatmail and the XCHATMAIL capability
This removes the last usages of the deprecated `is_chatmail` and
no `XCHATMAIL` IMAP capability is read anymore.
UIs are not using it for a longer time anymore.

The self-reporting statistics now set `is_chatmail` field to
`true`: all transports have relay-typical metadata
`false`: at least one doesn't
`null`: we don't know

BREAKING CHANGE: `is_chatmail` is no longer a known config key.
2026-09-17 20:42:41 +02:00
holger krekel
57b2c000e6 feat: base server-side message deletion on force_encryption
don't use `is_chatmail` for determining whether to delete messages on the server:
whether a downloaded message may be dropped from the relay
depends on whether another device still needs it (BccSelf)
and on whether plaintext mail is allowed (ForceEncryption).
2026-09-17 20:42:41 +02:00
holger krekel
8014c2af2f feat: remove last usage of XDELTAPUSH capability 2026-09-17 20:42:41 +02:00
holger krekel
5db55ac4de fix: make background_fetch not wait on or trigger smtp connections
Also adds tests and docs to respective functions,
clarifying background fetching behaviour and the `ACCOUNTS_BACKGROUND_FETCH_DONE` event,
that came up in questions/discussions with UI devs lately.
2026-09-17 19:26:18 +02:00
link2xt
44c2febbe1 test(direct_imap): always pass mark_seen=False to fetch()
mark_seen=True is the default and translates to fetching BODY
of the message. mark_seen=False translates to fetching BODY.PEEK
that is described in IETF RFC 3501 as
"An alternate form of BODY[<section>] that does not implicitly set the \Seen flag."

It is unexpected unless you know this detail of IMAP protocol already,
but this is not going to be fixed in imap_tools: <https://github.com/ikvk/imap_tools/issues/179>
2026-09-17 13:58:42 +00:00
link2xt
555b8b8b51 test: do not fetch all messages when direct_imap is created
This code is likely from the time when we reused mailboxes
in python/ tests, it does not do anything anymore.
2026-09-17 13:58:42 +00:00
link2xt
dc9bba0697 refactor(sql): disable double-quoted string literals
Double-quoted string literals are not standard
and may be accidentally treated as an identifier
if there is an identifier with the same name
as the string contents:
https://sqlite.org/quirks.html#double_quoted_string_literals_are_accepted
2026-09-17 13:31:41 +00:00
link2xt
3858c47ceb api!: remove default value for "addr" config
"addr" is already deprecated and its default value was using "configured_addr".
We want to get rid of "configured_addr" too, but users should at least
not access it through deprecated config.
2026-09-17 12:46:43 +00:00
link2xt
6b1d982cfc test: rename test_aeap_transition_{0,1} to test_aeap_transition_{single,group} 2026-09-17 09:31:15 +00:00
link2xt
5a71fe101e test: do not talk about "inconsistent key state" in test_securejoin_after_contact_resetup
"Inconsistent key state" referred to acpeerstates table row
with different Autocrypt and verified keys.
Since v2 and introduction of key contacts it is not possible for a contact
to have inconsistent key state, so this translates to having
two contacts with the same email address but different keys.
2026-09-17 09:30:51 +00:00
biørn
c41657d7fd test: explicitly empty url in appversion updates (#8702)
desktop will probably not always use a URL, see
https://github.com/deltachat/deltachat-desktop/issues/6749,
make sure, this stays optional in the JSON.

successor of https://github.com/chatmail/core/pull/8557
2026-09-16 21:44:50 +02:00
link2xt
6c3a866892 docs: mention get_app_version() API in the changelog for 2.59.0
It was added in https://github.com/chatmail/core/pull/8557,
but the changelog entry just says "Client version information".
2026-09-16 15:46:25 +00:00
holger krekel
5007fc49c1 test: cross-core securejoin invites for every chat type 2026-09-16 16:09:09 +02:00
holger krekel
b1da53a56b api!: remove verification methods from the FFI and JSON-RPC APIs
Core no longer tracks verification, so the API has nothing left
to report and UIs should drop their checkmark and "Introduced by" code.

BREAKING CHANGE: dc_contact_is_verified() and dc_contact_get_verifier_id() are removed.

BREAKING CHANGE: the JSON-RPC Contact object loses the `isVerified` and `verifierId` fields. A bot reading `snapshot.is_verified` now gets an `AttributeError` at runtime.

BREAKING CHANGE: the Python bindings lose `Contact.is_verified()` and `Contact.get_verifier()`.

BREAKING CHANGE: DC_STR_CONTACT_VERIFIED (35) is removed, so UIs should stop registering a translation for it. A stock id core does not know is logged and otherwise ignored, so an un-updated client keeps working.
2026-09-16 16:09:09 +02:00
holger krekel
d8912a98ac feat!: stop tracking contact verification
Since V2 a contact is its key, there is no address-to-key binding left to verify.

The JSONRPC and FFI APIs are unchanged and report nothing as verified.

BREAKING CHANGE: the statistics JSON sent to the self-reporting-bot on Android changes: Contacts have `encrypted` instead of `verified` and lose `transitive_chain` properties and message stats have `encrypted` instead of `verified` and `unverified_encrypted`, and securejoin invites lose `already_verified`. The collecting bot stores incoming reports verbatim but analysis will have to make sense of older and newer reports.
2026-09-16 16:09:09 +02:00
link2xt
373f1840a6 feat: queue messages for SMTP before encryption
Headers like From and Autocrypt are now added late,
right before sending the message over SMTP.
This way we advertise the latest list of transports
and use the correct From address in the encrypted part
even for messages queued while being offline.

BCC-self recipients are also added late.
For unencrypted messages we only want to send a copy
to the sending address, but we don't know the sending address
when queueing the message.
Adding bcc-self recipients when dequeuing the message
also makes it possible to send copies to updated list of relays.
2026-09-16 13:06:06 +00:00
link2xt
81982273e8 refactor: separate QueuedEncryption
This is similar to mimefactory::Encryption,
but does not have email addresses for asymmetrically encrypted messages.
Queued messages don't need email addresses for public keys.
Addresses are only needed to render Autocrypt-Gossip headers.
2026-09-16 13:06:06 +00:00
link2xt
5be489790f refactor: add Encryption.is_encrypted() 2026-09-16 13:06:06 +00:00
link2xt
81ca5aa1ca test: cleanup get_smtp_rows_for_msg()
It was incorrectly converting unused row ID to MsgId type
and selecting already known msg_id.
2026-09-16 13:06:06 +00:00
link2xt
15488ed210 chore: fix some types in deltachat_rpc_client 2026-09-16 11:43:25 +00:00
link2xt
f03088f247 chore: fix nightly "cargo" warnings 2026-09-16 11:43:06 +00:00
biørn
d4115e720d docs: add hint about how to reset an invitation (#8160)
this PR adds a hint about how to reset a QR code. 

the API is as-is, just now, a refactoring here is also unwanted. the
jsonrpc documentation needs to improved in general, this is known, and
also not done by this PR

closes #7985

---------

Co-authored-by: adb <asieldbenitez@gmail.com>
2026-09-15 16:19:07 +02:00
link2xt
abb0a119cb chore: update rustls to 0.23.45
This fixes https://rustsec.org/advisories/RUSTSEC-2026-0285
2026-09-15 12:11:18 +00:00
holger krekel
63364da79c chore: cleanup "primary" wording in comments 2026-09-15 13:44:38 +02:00
holger krekel
a8e1110bcd fix: always emit AccountsBackgroundFetchDone
A second background_fetch() while one is already running returned
without emitting the event, and the FFI returned 1 for it,
so a UI waiting for an event hangs dc_get_next_event().
Emit the event in any case, so waiting for it is safe.
2026-09-13 10:29:52 +02:00
holger krekel
dced877c90 feat: perform background fetch from all transports
With I/O stopped, `background_fetch()` connected only to the transport of `configured_addr`
and we now instead fan out to all transports in a controlled loop.
If a first transport finished fetching new messages
cancel all other attempts and return.

This is meant to address the problem that amzd described
where a profile with one functioning and one hanging transport,
shows the first notification, then hangs 15 seconds waiting for the hanging transport.
meanwhile a second NSE arrives and dies, and the second message is not notified
or only generically.

Also drop the quota check from this background fetch path:
its result is in-memory only, discarded when the iOS notification service exits,
and the regular scheduler fetching refreshes it every 60s anyway.
Moreover, quota errors/running full is pretty rare
since relays generally automatically stay under quota these days.
It's another round trip for each transport of each profile and simply not necessary.

Also adds previously missing online tests.
2026-09-13 10:29:52 +02:00
link2xt
44387f5e58 api: add JSON-RPC API is_sending_finished() 2026-09-12 23:35:58 +00:00