10780 Commits
Author SHA1 Message Date
link2xt 9e346ac650 refactor!: remove configured_addr config
configured_addr was already not used by real SMTP code.
Rust tests which emulate sending with TestContext.pop_sent_msg()
now have a way to set the "sending" address manually in memory.
2026-10-27 11:22:52 +00:00
link2xt 4b8c65e7b4 refactor(smtp): handle closed interrupt channel explicitly
Ignoring errors in IMAP code has previously led to busy looping during shutdown in the tests.
If interrupt channel is closed, it is better to exit SMTP loop immediately
without waiting for the task to be cancelled because if we busy loop
the task may even be impossible to cancel.
2026-10-26 16:28:40 +00:00
link2xtandholger krekel 4171c6f74a chore: update preloaded DNS cache
Add all default onboarding relays
and remove domains that don't resolve
with non-responding IPs.

Co-authored-by: holger krekel <holger@merlinux.eu>
2026-10-26 14:05:11 +00:00
holger krekel 5a894d3e37 refactor: read messages inside the markseen_msgs() transaction
Ephemeral timers now start in the same transaction
instead of a separate one before it.
2026-10-26 15:00:44 +01:00
holger krekel 23b4ca05c8 fix: mark messages seen and queue read receipts in one transaction
A failure or an app kill between the separate writes of markseen_msgs()
left a message seen without a queued read receipt, read receipt to self
or IMAP \Seen flag, and the next check would skip it as already seen.
2026-10-26 15:00:44 +01:00
holger krekel e11a55c29f refactor: split a sync insert_imap_markseen() out of markseen_on_imap_table() 2026-10-26 15:00:44 +01:00
holger krekel 5ffcf2a4a4 refactor: make MsgId::start_ephemeral_timer() synchronous
A message seen on another device now gets its state and its
ephemeral timer in one transaction, so it cannot end up seen
without a running timer. A failure to start the timer now fails
like a failure to update the state, instead of being only logged.
2026-10-26 15:00:44 +01:00
holger krekel baec90b70d refactor: make update_msg_state() synchronous and take a transaction 2026-10-26 15:00:44 +01:00
holger krekel da3ee2e025 perf: avoid some full table scans on every IMAP loop iteration and sent message
On large profiles they keep the CPU busy whenever messages are sent or received.
2026-10-26 14:59:50 +01:00
holger krekel a4de550a75 refactor: move expiration and IMAP loop queries into constants 2026-10-26 14:59:50 +01:00
link2xt f3bb558ac3 api!: remove webxdc_realtime_enabled config
It is removed from UIs already, so practically not used.
2026-10-26 13:50:35 +00:00
holger krekel 8789098155 chore: add deny.toml exception for RUSTSEC-2026-0387
Timing side channels in crypto-bigint 0.5.5 are fixed only in 0.7.6,
but rPGP 0.21 depends on elliptic-curve 0.13 and cx448 0.1,
which require crypto-bigint ^0.5.
Delta by default uses only Ed25519 and X25519
(and RSA keys from old profiles) that all do not use crypto-bigint.
2026-10-26 12:38:09 +01:00
link2xt 4ad53321f8 chore: upgrade tokio from 1.53.1 to 1.53.3
Makes cargo-deny stop complaining about https://rustsec.org/advisories/RUSTSEC-2026-0386
This is not even a security issue and we don't use mentioned functions anyway.
2026-10-24 17:14:33 +00:00
link2xt f0be6c387e fix: ignore html/* MIME parts
HTML parts have text/html MIME type.
html/* is not a registered MIME type: https://www.iana.org/assignments/media-types
2026-10-24 17:08:12 +00:00
link2xt 4ce056c85c refactor(scheduler): do not wait for IMAP and SMTP loop to be started
If we spawned a task, we alread know that the loop is started,
there is no need to send empty value from the task back to the scheduler.
2026-10-24 17:01:05 +00:00
link2xt df19d9d1df fix: fix the order of arguments to merge_openpgp_certificates() call
This fixes flaky tests/test_securejoin.py::test_qr_scan_updates_new_relay_address
which hanged during the second securejoin on fast network (e.g. when testing against local container)
as Bob received securejoin pubkey message from Alice but did not merge the new relay list.
2026-10-24 16:52:41 +00:00
link2xt ca4820aec3 test: add test_import_public_key_tiebreak() 2026-10-24 16:52:41 +00:00
link2xt a4363aa308 test: add test_merge_openpgp_certificates_tiebreak()
This tests that the order of arguments
to merge_openpgp_certificates() is important
if signature timestamp is the same.
2026-10-24 16:52:41 +00:00
link2xt 6767500ea2 refactor: factor out Contact.relay_addresses() 2026-10-24 16:52:41 +00:00
link2xt dedc160a2a refactor: pass current timestamp as an argument to signature_subpackets()
pk_encrypt() already uses current timestamp to select the key for encryption,
no need to use a potentially different timestamp to sign the message.
2026-10-24 16:52:41 +00:00
link2xt 7a1df15f92 docs: document arguments to secret_key_to_public_key()
It is not obvious that relay list is comma-separated.
2026-10-24 16:52:41 +00:00
link2xt 1a632bdade chore: update clipboard-win from 5.4.0 to 5.4.3
Versions <= 5.4.1 are yanked, apparently because of this change in unsafe code:
https://github.com/DoumanAsh/clipboard-win/commit/38c3c3fef175c20ed8f8e33dacb9b1e3bb8eca87
Not a big problem because the crate is only used in repl via rustyline dependency,
but cargo-deny complains about the yanked crate.

Diff can be viewed at https://cratediff.com/crate/clipboard-win/5.4.0/5.4.3/
2026-10-24 15:28:38 +00:00
link2xt 98289e8dbb chore: bump verion to 2.66.0-dev 2026-10-22 20:33:10 +00:00
link2xt 706ee7a48c chore(release): prepare for 2.65.0 v2.65.0 2026-10-22 20:19:22 +00:00
link2xt 65da01f863 refactor: create all keyupdates in a single transaction 2026-10-22 20:06:10 +00:00
link2xt 7f3cafd792 refactor: make non_chat_headers() synchronous 2026-10-22 20:06:10 +00:00
link2xt 01fcfc17be refactor: make insert_into_smtp() synchronous 2026-10-22 20:06:10 +00:00
link2xt 52de603753 refactor: make message::insert_tombstone() synchronous
It is only doing SQL, so does not need to be async.
This way insert_into_smtp() can use a single transaction
to insert a tombstone and enqueue the message.
2026-10-22 20:06:10 +00:00
B. Petersen 4d4ec874d2 chore: remove unused broadcast icon 2026-10-22 21:57:52 +02:00
link2xt 41eed949ac chore: add deny.toml exception for RUSTSEC-2026-0382
It is a rustls-webpki v0.102.8 dependency of iroh 0.35.0 which cannot be upgraded.
2026-10-22 16:40:22 +00:00
link2xt 53fe350ebb chore: update webpki-roots 0.26.8 to 0.26.11 2026-10-22 16:40:22 +00:00
link2xt 6bf5c07794 chore: update rustls-webpki 0.103.15 to 0.103.16 2026-10-22 16:40:22 +00:00
biørn b4cc114195 feat: show info message for unpinning (#8852)
as recently discussed with @adbenitez and @Amzd, it is better to add an
info message also for unpinning a message:

otherwise the message "Alice pinned a message" may look like a bug if
there is nothing actually pinned as Bob unpinned for whatever reason
afterwards.

technically, this is a simple change (famous last words) as a messages
were always sent on pinning as well as on unpinning, but for unpinning,
they were additionally hidden.

now the "unpin" info message is visible, however, still tuned down: it
is not notified and it does not bubble up in the chatlist (both similar
to many info messages about group changes)

ftr, this is a minor change, and it should not block ongoing releases
wrt pinned messages
2026-10-22 14:55:22 +02:00
link2xt e16e452091 fix: don't ignore join_next() errors in background_fetch_any()
join_next() failing means something went really wrong, e.g. panic inside a task.
We also don't cancel the tasks other than by dropping JoinSet,
so join_next() should never return an error.
2026-10-22 10:10:09 +00:00
link2xt 26ec01deaa docs: remove outdated sentence saying QR scan aborts started securejoin processes
This is not true since bbb267331c
and there is a test test_parallel_securejoin()
2026-10-21 04:56:31 +00:00
link2xt 8e9c16baca chore: update webpki-roots to 1.0.10
It removes compromised emSign CA,
see https://emudhra.we-have-a-problem.com/ for details.
We have duplicate dependency because of iroh 0.35
still dependencing on the old version,
but most important is that IMAP/SMTP connections
are using the new version.
2026-10-20 15:44:09 +00:00
link2xt 8d2919d23e chore: bump version to 2.65.0-dev 2026-10-20 12:02:02 +00:00
link2xt dd4641071e chore(release): prepare for 2.64.0 v2.64.0 2026-10-20 11:37:33 +00:00
link2xt 7a129352c8 feat: do not copy Chat-Version header into unprotected headers
spec.md already documents Header Confidentiality Policy
that hides Chat-Version header in encrypted messages,
but so far we have copied the header into unprotected headers for compatibility.

Since 2.45.0 prefetch does not look at the unprotected Chat-Version
do decide if the message should be downloaded
(change b94792706a)
and since 2.50 show_emails setting which controlled
whether only "chat messages" are processed
is removed (change 63596a4940).
2026-10-20 10:58:50 +00:00
link2xt 38749e0e9c fix(imap): do not busy loop if there are no connection candidates and interrupt channel is closed
Without connection candidates IMAP busy loops when you try to stop I/O
because interrupt channel gets closed and recv() always returns an error immediately,
but no connection is attempted afterwards so IMAP loop keeps calling .prepare()
in a loop without ever yielding control to executor, so it cannot even be cancelled.

New JSON-RPC test test_pseudo_transport_start_stop_io reproduces the problem
from CFFI test tests/test_3_offline.py::TestOfflineChat::test_send_lots_of_offline_msgs
which added one transport without connection candidates and started I/O.
2026-10-20 10:17:39 +00:00
gluek c827cb17c8 fix: do not apply channel reaction summaries as reactions
A reaction summary of a broadcast channel is sent as an empty reaction
to the latest channel message. When another device of the channel owner
received it, it removed the owner's own reaction on that message and
queued the message for the next summary. So the owner's devices sent
the summary to each other, and to all subscribers, every 10 minutes
forever.
2026-10-20 08:42:52 +00:00
link2xt 94641df57b refactor: clean up remaining clippy::arithmetic_side_effects in mimeparser
self.parts.remove(i) can panic if "i" is out of range,
but now it is obvious that it will not because "i" is returned from position(),
and clippy is happy.
2026-10-20 06:45:03 +00:00
link2xt 5de39ba6a4 fix: avoid integer overflow when multiplying received image width by height
This is a minor fix, worst case an image with very large dimensions will not be classified as a File.
Mostly removing `clippy::arithmetic_side_effects`.
2026-10-20 06:45:03 +00:00
B. Petersen 286c21a1e5 add jsonrpc for get_summary_text 2026-10-19 23:45:55 +02:00
biørn 6dde761ea5 feat: do not spam channel summaries with reactions (#8829)
while showing reactions for channel summaries was regarded as "let's
try" when channel reactions were introduced, meanwhile, after some
experience, it only clutters and spams the chatlist.

for the subscriber, this is anyways only "you reacted", which is often
wrong as there are other reactions. for the owner it is about some names
they do not know. the idea of having some "feedback" for the owner is
still fulfilled as reactions are (optionally) notified - so owner can
still have the "ping ping ping" and relax :)

finallly, this is also what telegram is doing with their channels
2026-10-19 20:30:30 +02:00
link2xt 9637ecff6b ci: test with Python 3.15
Also moved python version to environment variable
so status checks will be named
"JSON-RPC Python tests (ubuntu-latest, latest)" instead of
"JSON-RPC Python tests (ubuntu-latest, 3.14)" and we don't have to
update the list of required status checks each time the version changes.
We already do the same for Rust.
2026-10-18 13:04:38 +00:00
WofWca dce6438d95 refactor: move call_state_ext to CallInfo 2026-10-16 14:49:42 +00:00
WofWca 151f12b724 fix: races in get_summary_text_ext, improve perf
Remove the two unnecessary DB calls that fetch the message
(which could possibly be different from the current `Message`).

Now the only async thing in `get_summary_text_ext` that remains
is `get_webxdc_info`.
See https://github.com/chatmail/core/pull/8826.
2026-10-16 14:49:42 +00:00
pancake d62438d03c fix: abort scheduler tasks after shutdown timeout (#8832)
The timeout currently owns each IMAP and SMTP JoinHandle. When 30
seconds elapse, dropping the timeout drops the handle and detaches the
task instead of cancelling it. On Haiku, a network task stuck behind a
missed or delayed socket wakeup can therefore outlive scheduler
shutdown, retaining connections and interfering with restart or
active-account deletion.

Borrow each handle while waiting, then explicitly abort and await it if
shutdown times out. This guarantees that scheduler shutdown does not
complete while a timed-out network task is still running.
2026-10-16 10:14:29 +00:00
link2xt 60e1d59182 chore: bump rustls from 0.23.45 to 0.23.46
This fixes
https://rustsec.org/advisories/RUSTSEC-2026-0346
https://rustsec.org/advisories/RUSTSEC-2026-0347
https://rustsec.org/advisories/RUSTSEC-2026-0348
https://rustsec.org/advisories/RUSTSEC-2026-0349
2026-10-16 08:33:45 +00:00