Commit Graph
582 Commits
Author SHA1 Message Date
Sylvain Zimmer c52baae013 adjust delivery failed message 2026-01-29 11:01:25 +01:00
Sylvain Zimmer 0fc2c91b3f (parser) add fuzzing tests, fix a few edge cases
These cases might have caused exceptions, which might have interrupted
some imports.
2026-01-25 23:20:55 +01:00
Sylvain ZimmerandGitHub e6296f9b3a (integrations) add integrations view in mailbox (#488)
For now this allows users to create feedback widgets linked to their
mailbox. We will also have API keys and recurring imports there.
2026-01-25 17:29:19 +01:00
Jean-Baptiste PENRATHandGitHub bd76a081e9 (frontend) forward attachments (#485)
When a user forward a message, attachments are now also forwarded. Also,
if some attachments has a cid and embdedded into the html body, this link is
preserved.
2026-01-25 12:06:52 +01:00
Sabrina DemagnyandGitHub 4e7a2a5db1 🔊(inbound) fix duplicate recipient creation errors (#496)
Inbound messages with duplicate recipient addresses are now handled gracefully, preventing duplicate recipient links and avoiding failures during import.
2026-01-24 22:07:25 +01:00
20538a41d0 Fix SSL error and improve authentication failure (#495)
* 🐛(importer) add STARTTLS support and enforce encrypted IMAP connections

- Add STARTTLS negotiation for port 143 with use_ssl=True
- Create IMAPSecurityError exception for security violations
- Refuse to continue unencrypted when SSL is required
- Check server STARTTLS capability before attempting upgrade
- Fail fast to prevent credential leakage on security downgrade

Connection behavior:
- Port 993 + use_ssl=True → SSL direct
- Port 143 + use_ssl=True → STARTTLS (mandatory)
- Port 143 + use_ssl=False → unencrypted (explicit choice)

Fixes: SSL WRONG_VERSION_NUMBER error on port 143

* 🐛(importer) improve IMAP connection and authentication error handling

Backend improvements:
- Catch SSL handshake failures during IMAP4_SSL connection
- Provide clear error message suggesting port 143 with STARTTLS
- Add authentication failure logging with username context
- Wrap login() in try-except to log auth errors before propagating

Frontend improvements:
- Detect "IMAP authentication failed" message in error responses
- Display user-friendly credential error message in UI

This helps users understand connection failures and authentication
issues with clearer, actionable error messages.

* 🐛(imap) add tests and small fixes in the handshake

* 🐛(imap) wrap all connection login in a try/finally for cleanup

---------

Co-authored-by: Sylvain Zimmer <sylvain@sylvainzimmer.com>
2026-01-24 22:02:55 +01:00
Sylvain ZimmerandGitHub 1ce35a4580 (admin) add inboundmessage admin view & other small admin fixes (#505) 2026-01-24 17:02:28 +01:00
Sylvain ZimmerandGitHub 9a48eda9c6 ♻️(permissions) refactor some permissions code for viewsets (#503)
We want to avoid relying on role__gte, so we add role list aliases.
2026-01-24 13:48:43 +01:00
Sylvain ZimmerandGitHub 681a1481af (worker) add worker.py command and improve task routing on queues (#504)
This avoids a case where a very large import would overflow the
"celery" queue with reindex tasks that would block the inbound
processing tasks. Now we have good priorization.
2026-01-24 11:53:22 +01:00
Jean-Baptiste PENRATHandGitHub a98f873c63 (backend) add admin message retry action and delivery status filter (#499)
- Allow to filter Message by recipient delivery status
- Allow to trigger retry send task in django admin
2026-01-22 18:11:44 +01:00
jbpenrath c33908f5df 🔖(patch) release version 0.1.1
Update all version files and changelog for patch release.
v0.1.1
2026-01-22 10:10:16 +01:00
b625507861 🌐(i18n) update translated strings (#501)
Update translated files with new translations

Co-authored-by: jbpenrath <9265241+jbpenrath@users.noreply.github.com>
2026-01-22 10:10:16 +01:00
Jean-Baptiste PENRATHandGitHub 606f0cc144 🔧(backend) update Django admin URL handling (#498)
Updated the DJANGO_ADMIN_URL setting to ensure it does not end with a '/'.
It allows to keep simple redirect logic from the nginx proxy server and avoid
issues with django admin route paths.
2026-01-22 10:01:37 +01:00
jbpenrath cd261132e7 🔖(minor) release version 0.1.0
Update all version files and changelog for minor release.
v0.1.0
2026-01-20 16:01:29 +01:00
1636e06688 🌐(i18n) update translated strings (#494)
Update translated files with new translations

Co-authored-by: jbpenrath <9265241+jbpenrath@users.noreply.github.com>
2026-01-20 15:54:35 +01:00
Jean-Baptiste PENRATHandGitHub 9a836f7ee9 🚸(frontend) improve ux of signature / message template views (#492)
In admin, the user can now click on forced or default checkbox if the signature
is not active. The mutation executed will toggle the forced/default flag and
activate the entity if needed.
Explicit a little bit how mailbox signature/message template works to prevent
confusion (Linked to the mailbox not the user).
2026-01-20 07:07:40 +01:00
Jean-Baptiste PENRATHandGitHub 565e6cfe19 (frontend) Fix access role update for mailbox (#491)
Currently it was not possible to edit mailbox access if there was only one
editor that has no meaning. Instead we just prevent to be able to demote
a mailbox admin if this is only one.
2026-01-19 17:10:20 +01:00
Jean-Baptiste PENRATHandGitHub 62a292eb9a 🚸(frontend) do not show image display banner when only pixel tracker (#490)
If the message contains only pixel tracker, the image banner to display images
should not showned.
2026-01-19 16:10:38 +01:00
Sabrina Demagny ec4c7efc74 🔧(settings) by default activate message template 2026-01-16 10:06:32 +01:00
Sabrina Demagny 1899fd80d7 (signature) allow to create mailbox signature 2026-01-16 10:06:32 +01:00
Jean-Baptiste PENRATHandGitHub a0fed34452 🐛(frontend) hide banner image in thread message when folded (#484)
When a thread is folded, the message banner should not be displayed.
2026-01-15 18:03:47 +01:00
jbpenrath 8e1291f9bc 📱(frontend) improve tablet layout
Improve responsive experience :
- On tablet still show both thread-panel and thread-view.
- On tablet & mobile open menu when drag thread item
- Fix some issues on small viewport (element overflows, etc.)
2026-01-15 16:10:03 +01:00
jbpenrath a6f1124587 🐛(frontend) display "Today" instead of time in thread message header
When a message is received today, in the thread message, the label displayed
was "{time} at {time}" so we fix that to display "Today at {time}" instead.
2026-01-15 15:30:24 +01:00
jbpenrath 370b3f80bb (frontend) add batch actions through dnd
Allow to drag & drop threads to archive, delete or report them as spam.
2026-01-14 17:16:55 +01:00
jbpenrath 24704925ba (frontend) add batch actions in thread panel
Allow to un.delete, un.archive and report as spam a batch of threads.

Resolve #395
2026-01-14 17:16:54 +01:00
jbpenrath f05caa23fd 🚸(backend) return spam message when looking for trashed message
By default spam and trashed messages are excluded from thread search result.
But there was an edge case when the user was look up within trashed message as
trashed spam message were not returned that was weird. So now spam message are
included in results if user is looking for trashed messages.
2026-01-14 13:50:20 +01:00
jbpenrath 9614e9107b (global) mark thread as spam
Allow users to report a thread as a spam.
Also allow the user to mark the thread has not spam. Then in case of spam,
disable the attachment download for security purpose.
2026-01-14 13:50:20 +01:00
jbpenrath 83384d2736 🚸 (frontend) allow to mark message as read
According to feedbacks, some user requests to
be able to mark message as read in the thread message so we add this feature.

We also took opportunity to refactor the ThreadMessage component
to improve code structure of this component that was really dense.
2026-01-14 13:50:19 +01:00
Jean-Baptiste PENRATHandGitHub a19b8dead2 (widget) bind referer netloc within message subject (#478)
Parse HTTP_REFERER to extract the origin name for message subjects if available
2026-01-14 09:54:31 +01:00
888ff9e42d 🐛(rfc5322) improve email parsing & display multiparts in frontend (#463)
* 🩹(mime) fix inline HTML being treated as attachment

Previously, any MIME part with a Content-Disposition header (including
'inline') was treated as an attachment. This caused HTML email bodies
with 'Content-Disposition: inline' to appear as downloadable attachments
instead of being rendered as the message body.

The fix clarifies the classification logic:
- Parts with 'Content-Disposition: attachment' are always attachments
- Parts with 'Content-Disposition: inline' and text/plain or text/html
  are treated as message body
- Parts with filenames but no disposition follow existing rules

* ♻️(mime) refactor parser to use Flanker's built-in methods

Replace manual disposition parsing with Flanker's is_attachment(),
is_body(), and is_inline() methods which properly implement RFC standards.

This fixes issues where:
- text/calendar parts were incorrectly treated as attachments
- inline HTML was misclassified
- Parts without disposition were not properly categorized

The new logic uses Flanker's built-in classification:
- is_attachment(): Content-Disposition is 'attachment'
- is_body(): No filename AND (text/* or message/*)
- is_inline(): Content-Disposition is 'inline'

* fix: Add missing disposition_header variable definition

* 🛡️(mime) add defensive exception handling for MIME classification

Add try/except blocks around Flanker's is_attachment(), is_body(), and
is_inline() methods to prevent malformed MIME from crashing the parser.
When classification fails, log the error and safely fall back to treating
all checks as False, allowing parsing to continue.

Also preserve actual Content-Type for attachments instead of forcing
text/plain to application/octet-stream, and infer appropriate file
extensions from MIME types when no filename is provided.

* ♻️(mime) refactor attachment handling with helper functions

Extract duplicate attachment construction logic into reusable helper
functions and add consistent filename extension inference across all
attachment types (attachment, inline, and fallback paths).

Changes:
- Add _infer_filename_from_content_type() to map MIME types to file
  extensions for better unnamed attachment handling
- Add _build_attachment_dict() helper to eliminate ~45 lines of
  duplicated attachment dict construction code
- Apply extension inference consistently to is_attachment, is_inline,
  and fallback branches
- Update tests to expect new filename format (e.g., "unnamed.pdf")
- Clarify exception handler comment for better code documentation

* (rfc5322) fix tests & lint

* 🐛(rfc5322) sanitize attachment filenames and add many more tests

* 🐛(rfc5322) improve RFC5322 parsing logic with nested parts, per JMAP spec

* (rendering) render multipart messages in frontend

* fixup! (rendering) render multipart messages in frontend

* 🐛(review) address PR review comments

- Fix _sanitize_filename to preserve file extension when truncating
- Fix MessageBodyItemSerializer: use required fields, remove Meta class
- Fix misleading comment about text body drive attachments
- Regenerate OpenAPI schema and frontend API client

* 🐛(types) fix null fallback

* fix lint and tests

---------

Co-authored-by: Riël Notermans <riel@zzapps.nl>
Co-authored-by: Riël Notermans <riel@mosa.cloud>
Co-authored-by: jbpenrath <jb.penrath@gmail.com>
2026-01-14 01:18:32 +01:00
Jean-Baptiste PENRATHandGitHub bef485a7fd (search) improve recipient search filters (#476)
- `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
2026-01-12 19:18:09 +01:00
812cf51915 (all) allow to display external images through proxy (#469)
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>
2026-01-12 17:09:32 +01:00
BastienandGitHub a67fd36c33 (ops) implement production docker images (#451)
* (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
2026-01-12 15:18:25 +01:00
Sylvain ZimmerandGitHub b6394a2f56 (limits) implement MAX_RECIPIENTS_PER_MESSAGE (#474)
This is mostly cherrypicked from the larger PR #459, to reduce
complexity. We might still implement the rest in the future.
2026-01-12 12:09:52 +01:00
Sabrina DemagnyandGitHub 0cb05d9e77 (scripts) add release automation script (#472)
Add a Python script to automate the release process:
- Validates semver version format
- Calculates next version automatically based on release kind
- Updates version in pyproject.toml, package.json and package-lock.json
- Updates CHANGELOG.md with release date
- Creates release branch and commits changes

Usage:
make release
or
bin/release.py --kind m --version ...
2026-01-12 00:37:16 +01:00
Sylvain Zimmer fc744543bc 🔒️(errors) avoid serializing Python error externally 2026-01-10 15:16:37 +01:00
Jean-Baptiste PENRATHandGitHub e236b37054 🐛(frontend) fix reply all logic (#471)
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.
2026-01-08 19:21:41 +01:00
Jean-Baptiste PENRATHandGitHub 8e42a3eabd 🐛(layout) fix panel transitions and resize handling (#470)
Prevent a bug that may left panel hidden on desktop on window resize. Also
remove the transition on resize to improve ux.
2026-01-08 18:17:25 +01:00
jbpenrath 01bfd930b2 🚨(frontend) replace next lint by eslint
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.
2026-01-05 11:14:05 +01:00
jbpenrath 238cd1511e ⬆️(frontend) upgrade all frontend deps
Upgrade frontend dependencies to the latest supported version
2026-01-05 11:14:05 +01:00
Sabrina Demagny 9b41c0b016 (e2e) fix date format change since 2026 2026-01-03 01:19:20 +01:00
Jean-Baptiste PENRATHandGitHub 119c9b73bb 🌐(frontend) set html lang attribute on language change (#462)
Currently the html lang attribute is always set to `en`, we want to update it
when application language is changed.
2025-12-24 00:10:10 +01:00
jbpenrath 25502130ee 💄(frontend) fix scroll issues
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.
2025-12-23 11:54:29 +01:00
jbpenrath 5efcbe1b25 🌐(frontend) fix blocknote localization
Currently blocknote ui was not localized properly.
2025-12-23 10:51:16 +01:00
BastienandGitHub 5e3f5a4494 (socks-proxy) add healthcheck to dockerfile (#402) 2025-12-20 01:01:59 +01:00
jbpenrath 06f98216e5 🐛(frontend) do not compare drive and attachment mime type
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.
2025-12-18 16:43:40 +01:00
jbpenrath 6f16b88e88 🚨(frontend) @typescript-eslint/no-unused-vars as error
`@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.
2025-12-18 16:25:18 +01:00
Sylvain Zimmer 6558bf88a7 🐛(selfcheck) fix warning from a race condition in thread deletion 2025-12-18 15:03:01 +01:00
jbpenrath cb2ac356cc (frontend) allow multiple thread selection
Add UI to select multiple thread to mark them as read/unread or assign them to
a label in batch
2025-12-17 11:09:55 +01:00
jbpenrath e5dd2b2cb7 💄(frontend) fine tune new layout
Small style improvement from the new layout
2025-12-17 11:09:54 +01:00