- `to` query key now looks up within `to`, `cc` and `bcc` message fields
- Add a `to_exact` query key to looks up only in `to` message field
Resolve#467
Allow to users to display external images from their email
through a secure proxy endpoint to ensure security and privacy
and respect iframe csp policy.
Co-authored-by: =?UTF-8?q?Ri=C3=ABl=20Notermans?= <riel@mosa.cloud>
* (ops) implement production docker images
Github workflows:
- moved docker-publish jobs into a separate file on push main only
Backend:
- added healthcheck on backend Dockerfile + minor fixes
- bumped django to 5.1.15 to mitigate major CVE
- moved /healthz endpoint to /__heartbeat__ + added db connection
check
Frontend:
- Added runtime-prod Dockerfile target + minor fixes on the Dockerfile
- bump next to 15.5.9 to mitigate major CVE
- moved nginx config to standard nginx container configuration
template, fixed `scalingo_postfrontend` accordingly
Keycloak:
- Added production Dockerfile
- Removed scalingo_pgdump script & cron.json
socks-proxy:
- added package upgrades run into runtime Dockerfile stage
Misc:
- removed scalingo_pgdump.sh & cron.json
- fixed compose and e2e nginx configs with /healthz replacement
* (fix) coderabbit recommandations
When user replies to all, we populate the `to` field with both `to` and `cc`
recipients that was not the expected behavior so we fix it to populate properly
`to` and `cc` fields according to the situation.
Next 16 removes the lint command so we migrate our linter configuration to
use eslint directly. It appears some rules were not applied previously but looks
relevant so we keep them and fix errors.
It was not possible to scroll in views with long data grid.
Furthermore the mailbox panel was not usable on small height
viewport so we took opportunity to also fix that.
Currently to know if an attachment already exists in configured Drive instance,
we compare file retrieved by name, size and mime type but sometimes the mime
type cannot match. As it appears that name and size are enough to compare
resources we remove the mime type check.
`@typescript-eslint/no-unused-vars` rules was only a warning but our code
contains several unused imports. To prevent that in the future we now trigger
an error for this rule to prevent to merge code with unused imports.
Add a flag `is_trashed` to Thread model in order to monitor when a thread is
fully trashed. It helps to exclude those kind of threads in some views with
inactive message like archive or spam for example.
By default we exclude those kind of threads from results until user is looking
for trashed messages.
This adds an intermediate Postgres-backed queue for inbound messages, that
allows us to run filters like spam processing before inserting messages in their
final storage (soon to be object storage). Also include misc. refactorings.
Display the SPAM folder in the mailbox panel and allow to search SPAM
messages. Unlike other message flags, SPAM messages are not included
in search result by default
The previous route we were using to retrieve the user's Drive main workspace
through drive resource server is not working anymore. But we are able to
retrieve this workspace through the `/me` api route.
Currently the attachments-detection-map contains regex patterns but those ones
were treat as raw strings. We now parse patterns to detect regex string (starts
and ends with `/`).
Add DRIVE_APP_NAME variable that gets exposed via the config endpoint then
update frontend translation to use this variable into it.
Co-Authored-By: jbpenrath <jb.penrath@gmail.com>
Long threads (more than 20 messages) only displayed the first 20 messages
because the MessageViewSet used the default PAGE_SIZE of 20. The frontend
doesn't handle pagination for messages, so additional messages were silently
hidden from users.
This fix disables pagination for the messages endpoint since threads typically
don't have enough messages to require pagination.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Drive file are currently taken in account to compute the attachment total size
to know it the size limit has been reached. But actually we only want to take
in account the local attachments.
On import, the `deliver_inbound_messages` triggers ai features (auto labels and
summarization) if they are enabled. But we don't want to trigger those features
on import.
This will catch the case where people try to send email before having
correctly configured their DNS, and would also avoid unwanted sends
of messages not supposed to go out.
Adds new config vars for incoming & outgoing attachment sizes, validated at draft stage
and when receiving emails.
---------
Co-authored-by: Riël Notermans <riel@mosa.cloud>
The has_object_permission method was failing with MultipleObjectsReturned
exception when a user had access to multiple mailboxes that both have
access to the same thread.
Changes:
- Filter thread accesses by EDITOR role and check user mailbox permissions
- Use filter().exists() instead of get() to avoid MultipleObjectsReturned
- Add test case to verify users can send messages when they have access
to multiple mailboxes on the same thread