Commit Graph

1068 Commits

Author SHA1 Message Date
link2xt 784a6abb3b chore(release): prepare for 2.50.0 2026-05-22 20:16:32 +02:00
Hocuri 961cacd795 fix: Correctly delete unneeded messages on the server; Remove "Delete Messages from Server" (delete_server_after) config option (#8240)
Fix https://github.com/chatmail/core/issues/8195
Supersedes https://github.com/chatmail/core/pull/8217

The most interesting change is in `delete_expired_imap_messages()`
because there, messages are marked for deletion on single-device
chatmail profiles.

The logic in `delete_expired_imap_messages()` was wrong before, and
pre-messages were not deleted at all. This is fixed by also querying
`pre_rfc724_mid` in addition to `rfc724_mid` from the `msgs` table.
In order not to make the SQL statement too complex, I split it into two.

WRT tests:
- `test_immediate_autodelete()` tests the auto-deletion;
`test_imap_autodelete_fully_downloaded_msg()` tests that even for a
message that is split into pre- and post-message, both messages are
deleted.
- A lot of tests test that if bcc_self is on, messages are not
auto-deleted. E.g. `test_one_account_send_bcc_setting()` and
`test_markseen_message_and_mdn()` relies on the fact that messages stay
on the server when bcc_self is on.
- Unfortunately, it is not possible to test that messages are only
deleted for chatmail servers, because we don't have any tests that use a
non-chatmail server.
2026-05-22 16:45:50 +00:00
link2xt d0696504d1 feat: add option to force encryption 2026-05-19 22:40:28 +00:00
iequidoo ca70fb9b3a feat: Get rid of MessageState::{OutPreparing,OutMdnRcvd} in the db
`OutPreparing` is deprecated since 2024-12-07, replace it with `OutFailed`, such messages are
probably not interesting anymore. `OutMdnRcvd` is not used in the db for new messages since
a30c6ae1f7, `OutDelivered` is stored instead.
2026-05-07 20:37:11 -03:00
Hocuri 18d878378f api!: Remove unused config smtp_certificate_checks 2026-04-20 15:45:17 +02:00
link2xt 942172a31a feat: remove MvboxMove and OnlyFetchMvbox 2026-04-16 16:42:40 +00:00
link2xt 3236c8bbf4 chore: bump version to 2.50.0-dev 2026-04-13 10:14:01 +02:00
link2xt dab7ca19fe chore(release): prepare for 2.49.0 2026-04-13 10:10:07 +02:00
link2xt 795fe9a38b chore: bump version to 2.49.0-dev 2026-04-08 22:27:29 +02:00
link2xt 3b8f1934f3 api!: remove dc_msg_force_plaintext
Message.force_plaintext() is still used in legacy SecureJoin steps
internally, so cannot be removed, but there is no need for public API.
2026-04-07 17:00:47 +00:00
link2xt 1219cbe1a3 fix: do not create 1:1 chat on second device when scanning a QR code
This avoids creating 1:1 chat on a second device when joining a channel.
Now when joining a channel there may be no 1:1 chat with the inviter
when the channel is created. In this case we still create the channel
as unblocked even if 1:1 chat would be a contact request
because joining the channel is an explicit action
and it is not possible to add someone who did not scan a QR
to the channel manually.
2026-04-06 00:42:14 +00:00
link2xt 24b21c0588 chore(release): prepare for 2.48.0 2026-03-30 12:48:24 +02:00
link2xt 59be03a7eb chore: bump version to 2.48.0-dev 2026-03-24 04:30:06 +01:00
link2xt 8528184fa3 chore(release): prepare for 2.47.0 2026-03-24 04:07:52 +01:00
Hocuri b148be2618 chore: bump version to 2.47.0-dev 2026-03-19 11:02:47 +01:00
Hocuri 191e6c2821 chore(release): prepare for 2.46.0 2026-03-19 10:58:42 +01:00
link2xt 296ed6d74a api!: remove functions for sending and receiving Autocrypt Setup Message 2026-03-17 20:10:59 +00:00
link2xt 9393753190 chore: bump version to 2.46.0-dev 2026-03-14 02:58:19 +00:00
link2xt d9056fd187 chore(release): prepare for 2.45.0 2026-03-14 02:23:25 +00:00
link2xt b85fa84a37 test: remove arbitrary timeouts from test_4_lowlevel.py
They randomly fail just because CI is sometimes slow.
2026-03-02 18:33:08 +00:00
link2xt e1e8407905 chore: bump version to 2.44.0-dev 2026-02-27 01:16:34 +00:00
link2xt ffce0dfc9a chore(release): prepare for 2.44.0 2026-02-27 01:13:18 +00:00
Hocuri 7d8989a068 fix: If importing a backup fails, delete the partially-imported profile (#7885)
fix https://github.com/chatmail/core/issues/7863

`test_import_encrypted_bak_into_encrypted_acct` CFFI test fails because
it tests that trying to import an encrypted account with a wrong
passphrase into an already-encrypted database will fail, but leave the
already-encrypted database (esp, leave it with the same password).

But in order to reset the database after a failed login attempt, I'm
using this code:

```rust
        context.sql.close().await;
        fs::remove_file(context.sql.dbfile.as_path())
            .await
            .log_err(context)
            .ok();
        context
            .sql
            .open(context, "".to_string()) // <-- NOTE THIS LINE
            .await
            .log_err(context)
            .ok();
```

We're not remembering the password, so, we can't just pass the correct
password there.

Since password-protected databases are not really supported anyways, we
decided to just skip the test.

I also tried two tricks for deleting everything [found on
Stackoverflow](https://stackoverflow.com/questions/525512/drop-all-tables-command),
but neither of them managed to actually reset the database (i.e. they
led to a failed Rust test, because asserting
`!context2.is_configured().await?` failed):

```rust
        context
            .sql
            .call_write(|conn| {
                let mut stmt = conn.prepare(
                    "select 'drop table ' || name || ';' from sqlite_master where type = 'table';",
                )?;
                let mut iter = stmt.query(())?;
                while iter.next()?.is_some() {}
                Ok(())
            })
            .await
            .log_err(context)
            .ok();
        context
            .sql
            .run_migrations(context)
            .await
            .log_err(context)
            .ok();
```

```rust
        context
            .sql
            .transaction(|t| {
                t.execute_batch(
                    "
PRAGMA writable_schema = 1;
delete from sqlite_master where type in ('table', 'index', 'trigger');
PRAGMA writable_schema = 0",
                )?;
                Ok(())
            })
            .await
            .log_err(context)
            .ok();
        context
            .sql
            .run_migrations(context)
            .await
            .log_err(context)
            .ok();
```

---------

Co-authored-by: l <link2xt@testrun.org>
2026-02-25 16:25:33 +01:00
holger krekel f1e90c73cd chore: add dev-version bump instructions to RELEASE.md (bumping to 2.44.0-dev) 2026-02-25 10:30:42 +01:00
link2xt 9deba0cf2a chore(release): prepare for 2.43.0 2026-02-17 13:28:19 +00:00
link2xt 983f43c33c chore(release): prepare for 2.42.0 2026-02-10 00:37:13 +00:00
link2xt 5bfd8dd517 feat: do not scan not watched folders 2026-02-08 01:57:10 +00:00
link2xt 5bb0b86f6a chore(release): prepare for 2.41.0 2026-02-06 00:39:03 +00:00
link2xt b72a677f4c chore(release): prepare for 2.40.0 2026-02-04 21:46:02 +00:00
link2xt 1bf24618fa feat: never create IMAP folders
Existing setups already have the folders created
and for new setups only INBOX should be used.
2026-01-28 14:55:51 +00:00
link2xt baeb31b5fa chore(release): prepare for 2.39.0 2026-01-23 21:52:40 +00:00
bjoern 2531dfea1d chore: cleanup deprecated functions/defines (#7763)
this PR cleans up with some easy, deprecated stuff.

i roughly checked that they are no longer in use - by these checks,
other deprecated function were kept, eg.
dc_provider_new_from_email_with_dns() and dc_chat_is_protected() is
still used by deltatouch - to not add noise there, we remove them here
on the next cleanup ...

for DC_STR_*, however, if they are in used, the corresponding lines
should just be removed

this will cleanup https://c.delta.chat/deprecated.html as well
2026-01-23 15:25:48 +01:00
Hocuri 008e6c4af3 chore(release): prepare for 2.38.0 2026-01-22 21:32:31 +01:00
iequidoo d552250dc4 test: Port test_dont_move_sync_msgs to JSON-RPC (#7676) 2026-01-09 15:26:00 -03:00
Simon Laux 2631745a57 feat: pre-messages / next version of download on demand (#7371)
Closes <https://github.com/chatmail/core/issues/7367>

Co-authored-by: iequidoo <dgreshilov@gmail.com>
Co-authored-by: Hocuri <hocuri@gmx.de>
2026-01-08 22:14:32 +00:00
link2xt 46bbe5f077 chore(release): prepare for 2.37.0 2026-01-08 20:45:33 +00:00
link2xt 8d6f4b0354 chore(release): prepare for 2.36.0 2026-01-03 18:39:16 +00:00
link2xt 25750de4e1 feat: send sync messages over SMTP and do not move them to mvbox 2025-12-26 10:58:33 +00:00
iequidoo 6a293aebe2 test: Port test_import_export_online_all to JSON-RPC (#7411) 2025-12-19 01:17:59 -03:00
link2xt ddd4fc49a2 chore(release): prepare for 2.35.0 2025-12-16 22:22:20 +00:00
iequidoo e34fee72a0 feat: lookup_host_with_cache(): Don't return empty address list (#7596)
All users of this function expect a nonempty list to be returned, otherwise they fail with hard to
understand errors like "No connection attempts were made", so it's better to fail early if DNS
resolution failed and the cache doesn't contain resolutions as well.
2025-12-16 16:03:17 -03:00
link2xt 4509c1bd06 chore: prepare 2.34.0 release 2025-12-11 16:28:55 +00:00
link2xt 73e0f81e83 test: port test_synchronize_member_list_on_group_rejoin to JSON-RPC 2025-12-07 14:21:48 +00:00
link2xt 7c30aef2ed chore(release): prepare for 2.33.0 2025-12-05 21:35:21 +00:00
link2xt aa5ee19340 chore(release): prepare for 2.32.0 2025-12-04 21:00:59 +00:00
link2xt 952f6735a2 chore(release): prepare for 2.31.0 2025-12-04 19:28:31 +00:00
link2xt 6db2cf6144 chore(release): prepare for 2.30.0 2025-12-04 17:01:28 +00:00
link2xt 12cee23924 chore(release): prepare for 2.29.0 2025-12-01 02:07:21 +00:00
link2xt 43e8d5cc6c ci: unpin mypy 2025-11-29 00:16:58 +00:00
link2xt 721b9cebef build: pin mypy to 1.18.2
mypy depends on librt since 1.19.0
and it fails to build with PyPy 3.10.
2025-11-28 22:14:38 +00:00