Issue Description
According to Overview | Stalwart, the server-wide “Encrypt on append” is supposed to be an override:
“The server-wide encryptOnAppend value is an override: when set to true, it applies to every account regardless of the per-account encryptOnAppend carried inside encryptionAtRest. When the server-wide flag is false, the per-account setting applies.”
However, in practice that is not so, at least for Stalwart 0.16.12. Specifically, I have an account which is set with both “Encryption at rest” and “Encrypt on append” ON. The system settings are default (Encryption at rest ON, Encrypt on append OFF).
In this configuration the emails sent via SMTP get encrypted, but emails imported via IMAP don’t (logs confirm messages were appended via IMAP).
If I turn system-wide “Encrypt on append” ON, then only then imported via IMAP messages actually get encrypted. Can this be fixed to ensure that account settings actually apply for that option instead of having it forced system-wide to all? Alternatively, could documentation be fixed to match the actual behaviour?
Expected Behavior
Imported messages should be encrypted when the account is configured with the encryption at rest with “Encrypt on append” ON.
Actual Behavior
The emails are imported unencrypted UNLESS system-wide “Encrypt on append” in the admin UI is set to ON.
Reproduction Steps
- Create an account, log into it, upload public PGP key and select AES-256 Encryption at rest. Toggle “Encrypt on append” to ON.
- Ensure system-wide settings are ON for “Encryption at rest” and OFF for “Encrypt on append”.
- Import any message into the account via IMAP and then retrieve it with the client - you should see unencrypted message.
- Reconfigure system-wide option to ON for “Encrypt on append”.
- Import new messages and retrieve those with the email client - they should be encrypted.
Relevant Log Output
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
Additional Context
Thunderbird (with Open keychain)
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on