Commit Graph
559 Commits
Author SHA1 Message Date
Sylvain Zimmer 146ffc2c3f ✨(print) add Print button in messages context menu 2026-02-04 00:38:10 +01:00
jbpenrathandClaude Opus 4.5 796a4b7a35 🐛(frontend) close left panel when clicking active folder on mobile
On mobile, users expect the left panel to close when they tap any folder,
including the currently active one. This allows them to return to the
main content area without having to use the close button.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 19:00:21 +01:00
jbpenrath eef8793fee ⬆️(frontend) upgrade frontend deps
Upgrade frontend deps
Especially blocknote to version 0.46.2 which fix an issue that
prevented link popover to be closed with static toolbar.
2026-02-03 19:00:21 +01:00
jbpenrath ce2c1b3ed0 ✨(composer) add autofocus option to message, template, and signature composers
Enhanced user experience by adding an autofocus feature to the
message composer, template composer, and signature composer
components, ensuring the cursor is positioned at the end of the input
field upon loading.
2026-02-03 19:00:21 +01:00
jbpenrath 25e28cf69d 🔖(minor) release version 0.2.0
Update all version files and changelog for minor release.
2026-02-03 18:16:25 +01:00
ee32351c81 🌐(i18n) update translated strings (#527)
Update translated files with new translations

Co-authored-by: jbpenrath <9265241+jbpenrath@users.noreply.github.com>
2026-02-03 18:16:25 +01:00
Jean-Baptiste PENRATHandGitHub a1b05b51a1 🚑(parser) strip NUL bytes from email content (#524)
Introduced a new helper function to remove NUL bytes from parsed email subjects
and body content, ensuring compatibility with PostgreSQL text fields.
2026-02-03 15:51:11 +01:00
Sylvain ZimmerandGitHub 314e0857d4 🐛(dns) raise new "DUPLICATE" error when there are 2 SPF records (#521) 2026-02-01 21:40:51 +01:00
Jean-Baptiste PENRATHandGitHub b830755943 🚑(importer) fix memory leak with large mbox file import (#516)
Refactored the MBOX file processing to first scan for message positions
without loading the entire file into memory, improving efficiency.
The second pass now streams messages using pre-computed positions,
ensuring memory usage is minimized while maintaining correct
message order for threading.
2026-01-29 16:03:20 +01:00
Sylvain Zimmer 76c8dd32ba 🐛(scalingo) fix env var still overriding the Celery default 2026-01-29 13:56:19 +01:00
Sylvain Zimmer 27661e739d 🐛(invites) add default "invitation.ics" name for invite downloads 2026-01-29 13:42:11 +01:00
Sylvain Zimmer af83580a17 🐛(worker) make celery app name explicit for fix potential $APP override 2026-01-29 13:19:31 +01:00
Jean-Baptiste PENRATHandGitHub 913a5d0442 🔧(backend) use redis cache for development (#515)
By default the default cache backend was a dummy one.
Since we store pending task into cache, this backend does not
allow to track tasks so task api endpoint was always return a 403 error.
2026-01-29 11:11:54 +01:00
Sylvain ZimmerandGitHub c3560ee739 ✅(parser) add fuzzing tests, fix a few edge cases (#507)
These cases might have caused exceptions, which might have interrupted
some imports.
2026-01-29 11:01:56 +01:00
Sylvain ZimmerandGitHub 78596bb34e ✨(calendar) display calendar invites (#481)
Fixes #433.
2026-01-29 01:06:26 +01:00
Jean-Baptiste PENRATHandGitHub bf27319afe 🚸(frontend) Add loading state to the refresh button (#511)
When the user clicks on the refresh button it has no feedbkac that
a request has been executed. So to improve ux, we had a smooth
loading state transition on this action.
2026-01-27 11:50:00 +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.
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.
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
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