Commit Graph
70 Commits
Author SHA1 Message Date
295ffbb3cf 🐛(backend) disable pagination for thread messages
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>
2025-12-08 10:59:51 +01:00
jbpenrath 24f2644f0d ✨(interop) allow to save an attachment into Drive workspace
Setup Drive resource server query to retrieve and save files from a configured
Drive instance through OIDC resource server.

https://github.com/suitenumerique/drive/pull/379
2025-12-01 19:32:07 +01:00
670ba5699a ✨(attachments) configurable size limits (#430)
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>
2025-11-21 13:55:26 +01:00
Sabrina Demagny 4d68cb4833 ✨(contacts) add contacts from the same domain as selected mailbox to contacts endpoint 2025-10-31 14:06:28 +01:00
Sabrina Demagny f7ee9dcc47 ✨(template) allow to insert recipient name in reply 2025-10-29 15:54:07 +01:00
Sylvain ZimmerandGitHub 54b14f9304 ✨(features) add new feature flag env vars (#387)
Rename old AI_FEATURE env vars and add 2 new ones
2025-10-17 23:27:37 +02:00
Sabrina Demagny 03a52f0056 ✨(template) add view and modal to manage message template for a mailbox 2025-10-16 20:46:08 +02:00
jbpenrath d997d119ee 🚸(front) add more context if available about message delivery status
We recently display recipient delivery status tooltip when the message is not
yet delivered or in failure. To help user to understand why the message is not
delivered, we now display the delivery message if there is one.
2025-10-16 17:02:35 +02:00
Sabrina Demagny 08635bee52 ✨(template) simplify message template type 2025-10-15 23:58:59 +02:00
Sylvain ZimmerandGitHub d9d3853252 ✨(images) implement cid: image support (#378)
Parses the email and replaces cid: images with blob urls
2025-10-15 21:15:48 +02:00
Jean-Baptiste PENRATHandGitHub 66b6561ecb ✨(message) Display message delivery status (#379)
- Updated Message API to return MessageRecipient instead of Contact
- In ThreadMessage component displays icon next to a recipient to display
delivered status (only if the message is not delivered yet)
2025-10-15 15:20:00 +02:00
Jean-Baptiste PENRATHandGitHub 10be269761 ✨(import) Enhance message import through multipart upload (#372)
- Added multipart upload capabilities for EML and MBOX files to the
  message imports bucket.
- Introduced new API endpoints for initiating uploads, completing
  uploads, and aborting uploads.
- Updated serializers and viewsets to handle file uploads efficiently.
- Improved frontend components to display upload progress and handle
  file uploads seamlessly.
- Adjusted backend services to process uploaded files asynchronously,
  ensuring better performance and user experience.
- Updated documentation and tests to reflect the new functionality.
2025-10-14 17:31:17 +02:00
Sabrina Demagny 6e1dc402ae ✨(import) add new mailbox ability to import messages 2025-10-14 00:03:55 +02:00
Sabrina Demagny ae1d9db95a ✨(template) add new mailbox ability to manage message templates 2025-10-13 23:16:54 +02:00
Sabrina Demagny 895efcfb5d ✨(template) CRUD for mailbox message templates 2025-10-08 18:08:25 +02:00
Jean-Baptiste PENRATHandGitHub 8ee4b37a17 ✨(send) Add send and archive action (#370)
Allow a user to ask to send a message then immediately archive
the related thread. For new message, it is not allowed to archive the thread.
Furthermore, the user can choose to use by default the send and archive action.
2025-10-08 15:58:55 +02:00
Jean-Baptiste PENRATHandGitHub bf38eaa60b ✨(archive) implement archiving functionality for messages and threads (#363)
We want to be able to archive threads. So we update Thread model to know
if the thread is archived according to its messages state. Then update the
flag endpoint api to archive messages or threads. Also update the search indexer
to be able to search within archived threads. And finally update the frontend to
allow the user to archive a thread, get and search in archived threads.
2025-10-06 18:27:30 +02:00
4db9b261b3 ✨(inbound) store message metadata as custom headers (#354)
Co-authored-by: Jean-Baptiste PENRATH <jb.penrath@gmail.com>
2025-10-02 22:15:55 +02:00
Sabrina Demagny 9bacfd24b6 ✨(template) allow to create and use signature
- Allow to create and manage signature in admin interface
- Allow to insert signature in message editor
- Blob model must have at least a mailbox or maildomain

This commit introduces a complete email template system with support
for both HTML and text content, flexible relationships with mailboxes
and mail domains, and a RESTful API for template management.
2025-10-01 00:31:14 +02:00
Sabrina Demagny 29415e21a0 ✅(tests) fix test retrieve eml and update open api schema 2025-09-29 19:41:06 +02:00
Sylvain ZimmerandGitHub f4eac6dd8f ✨(channels) add feedback widget and multiple inbound channels support (#301)
This PR adds a new build system for embeddable widgets and a first implementation of a "Feedback" popup widget.

It also refactors inbound message routes into channels, of which there are 2 for now: MTA (by default) and Widget. More to come!
2025-09-24 14:30:40 +02:00
jbpenrath 28137bfdc4 ♻️(backend) make generic user list endpoint
Currently the endpoint to search users is nested under maildomain. So since we
add the new endpoint to manage maildomain accesses, we need more granularity
on this endpoint and its current implementation does not allow that. So we move
it into the UserViewset. This endpoint is accessible to superuser and maildomain
admins only. Superusers are allowed to search into the whole user database to
assign any user as maildomain admin while maildomain admin are only allowed to
search users with maildomain or mailbox access in their scope.
2025-09-23 18:32:44 +02:00
jbpenrath 9e3dcecf2a ✨(global) add maildomain access management features
Introduce new API endpoints for managing maildomain accesses,
including read, write, and delete operations. Update translations
and UI components to support these features, enhancing the admin
interface for managing user access to maildomains.

Related issue : #327
2025-09-22 19:25:07 +02:00
jbpenrath 3eee6862ed ✨(global) allow edit mailbox from admin
Only allow patch request to update mailbox then customize serializer to only
update allowed fields and related resources (Contact, User accordingly)

Also update admin frontend to add action to edit a mailbox in the maildomain admin.

Related issue : #328, #327
2025-09-18 19:38:34 +02:00
jbpenrath c7dbb73ccc ✨(backend) add new endpoint to reset password
Add a new admin endpoint to reset user password if
domain oidc sync is enabled.
2025-09-16 17:02:44 +02:00
Stanislas Bruhiere 647abfb2eb 🚨(backend) run make api-update 2025-09-04 17:16:29 +02:00
Stanislas BruhièreandGitHub 02bce211ea ✨(frontend) add a button and modal to create maildomains (#313)
* ✨(feat) create modal, serializer and add button

* ✨(frontend) refetch on domain creation

* 🚨(frontend) fix linter

* ✅(backend) add domain creation test

* ✨(frontend) add toaster for domain creation

* 💬(frontend) add translation and fix small typo

* ✨(front+back) add custom_attributes on domain creation

* 💄(frontend) add style for create domain modal

* 💬(frontend) add missing translations + add end of file line breaks

* 🎨(frontend) move toaster to admin layout

* 🦺(frontend) validate domain name in frontend

* 💄(frontend) remove unused css

* ✅(backend) add more tests

* 🎨(backend) improve maildomain structure

* 🎨(frontend) follow nitpicks
2025-09-02 20:13:11 +02:00
Sabrina Demagny 67a7c4e9c0 ✨(api) add placeholders endpoint
This endpoint will be used for Signature and other message templates.
Update Dockerfile to include gettext for i18n compilation
2025-08-20 12:10:16 +02:00
Fabian ArfireandJean-Baptiste PENRATH cdb4e207e5 ✨(backend) add auto labelling ai feature
When a message is received, if the auto labelling feature is enabled,
we try to add all relevant labels that are flagged for auto labelling to this
message.

Co-authored-by: jbpenrath <jb.penrath@gmail.com>
2025-08-19 23:48:03 +02:00
jbpenrath 53110862d6 ✨(front) manage abilities
Improve openapi schema to pass abilities to frontend properly.
Then through the useAbility hook, hide/disable actions.
It concerns actions to send messages, write messages, share
thread access, crud labels, crud maildomain mailboxes.
2025-08-07 10:39:23 +02:00
jbpenrath d0b2a66f08 🐛(frontend) draftBody can be null
There was an error in the openapi schema and we are not aware that
message.draftBody could be null so when it was the case, the frontend
throws an error when rendering the `MessageForm` component.
2025-08-06 10:12:36 +02:00
jbpenrath 4a311e5b3c ✨(backend) define custom_attributes through env vars json schema string
User and MailDomain have both `custom_attributes` json field. Those fields
aims to store extra data about those models specific to an instance. In order
to fulfill those fields with consistency and without requiring to fork the
project, we add two new settings `SCHEMA_CUSTOM_ATTRIBUTES_*`.
Those 2 settings expects a JSON Schema string defined through env vars.
Then on model save, those schema are used to validate data saved into
custom attributes.
2025-08-06 10:12:36 +02:00
jbpenrath 7c07711489 👽️(openapi) improve user definition with or without abilities
The OpenAPI Schema does not embedded abilities property.
We fix that and make two serializers for User model in order to get proper
openapi definition for User instance with abilities and without abilities.
2025-07-31 17:19:23 +02:00
jbpenrath a56ca6b113 ✨(backend) add settings to configure drive external service
We want to add ability to Messages to interop with our Drive application.
First, we want to be able to set the Drive base url through environment
variable then pass down Drive configuration to frontend through the config
api endpoint.

https://github.com/suitenumerique/drive
2025-07-30 13:57:04 +02:00
Sabrina Demagny c7fb77b737 ✨(frontend) remove max_messages and folder fields on imap import
Run 'make api-update'
2025-07-28 11:18:28 +02:00
Mathis ROUGETandJean-Baptiste PENRATH e08acda852 ✨(ai) setup ai service 2025-07-24 11:45:07 +02:00
Sylvain ZimmerandGitHub 9b4ba9ba09 ✨(dns) add admin page for DNS records (#283)
* ✨(dns) add admin page for DNS records. Fixes #177

* 👷(dockerflow) add a flag to disable Dockerflow

* 💚(ghactions) fix check-api-update that was missing Orval

* 💚(ci) fix tests that depended on Keycloak

* ♻️(admin) refactor CopyableInput into a separate component

* 🎨(dns) improve code style
2025-07-21 14:41:08 +02:00
Sylvain ZimmerandGitHub cc858e75e4 ✨(admin) improve Admin mailbox management page (#284)
This fixes a few small anoyances and adds a new field Mailbox.is_identity
to the models so that we can save what type of mailbox the admin created.
2025-07-21 10:47:06 +02:00
jbpenrath 0c79a169aa 🔊(front) setup posthog
Setup posthog and create a feedback button that is displayed
if a posthog survey id is provided through envvars
2025-07-16 22:22:25 +02:00
jbpenrath 7bd5a42e38 🏷️(openapi) types properly the ConfigViewset
Decorate ConfigViewset to be typed properly then regenerate
openapi schema and client.
2025-07-16 22:22:25 +02:00
jbpenrath 97c55bd7f0 🏷️(global) fix openapi schema and typescript types
Enhance the `IntegerChoicesField` to be well interpreted by drf
spectacular to generate a clean OpenAPI Schema then fix Typescript
issues once the api types have been fixed.
2025-07-16 15:04:26 +02:00
jbpenrath 3c8bb9f6a3 👽️(api) update openapi schema and api client
Run `make api-update`
2025-07-10 18:05:00 +02:00
jbpenrathandSylvain Zimmer 0c44e7803a ✨(backend) complete admin maildomain api
- Create user (if needed) and mailbox access on mailbox creation
- If identify provider is keycloak, generate a one time password
at mailbox creation
- At nested endpoint to search users related to a maildomain

Co-authored-by: Sylvain Zimmer <sylvain@sylvainzimmer.com>
2025-07-10 18:05:00 +02:00
jbpenrath 6beac632b6 ✨(front) list labels in left panel and allow to edit them
Load and display labels in left panel. Add also a modal to
create/edit/delete labels.
2025-06-20 00:58:11 +02:00
jbpenrath 95f78e4a02 ✨(front) upload mailbox archive as blob
To import old messages from an archive we must now upload the archive file
as a blob then provide the blobId to endpoint to import messages.
2025-06-20 00:13:50 +02:00
jbpenrath e263c56450 ♻️(frontend) update thread stats and thread panel after api refactoring
We recently refactor the way we process thread stats and the filters to list
threads. We have to update the front to work with this new behavior.
2025-06-19 02:05:41 +02:00
jbpenrath 0d4e4f3536 💄(front) clean a little bit label badges
We recently display label badges into thread-item. We revamp that
a little bit to improve code structure and prepare the layout
for further improvements.
2025-06-19 02:05:41 +02:00
Sabrina Demagny ad179ee258 ✨(api) allow to list threads by label
Add the ability to filter threads by label slug in the thread list endpoint. This feature
enables users to view all threads associated with a specific label.

Changes:
- Add label_slug query parameter to ThreadViewSet list endpoint
- Implement label-based filtering with proper permission checks
- Add OpenAPI documentation for the new label_id parameter
- Add comprehensive test suite for label filtering

Technical details:
- Filter threads by label while ensuring user has access to the label's mailbox
- Support combining label filter with existing filters (mailbox, search, etc.)
- Add proper error handling for invalid or inaccessible labels
- Add test coverage for various filtering scenarios:
  - Single label filtering
  - Combined label and mailbox filtering
  - Invalid label handling
  - Permission checks
  - Combined filters (label + unread/starred status)
2025-06-16 15:54:41 +02:00
Sylvain ZimmerandGitHub 460068b5d3 ✨(identity) add MailDomain management with Keycloak identity provider (#136)
This allows user creation, passwords reset and listing users from
Keycloak, plus a new MailDomainAccess model for admins.

* ✨(admin) add maildomainacess model, api route and backend tests

* ♻️(drf) simplify API code

* ✨(keycloack) add deployable keycloak to PaaS

* ✨(keycloak) add integration via API, upgrade to 26.x

* 🗑️(settings) remove invitation setting

* 🐛(tests) fix failing tests after rebase

* 🚨(all) fix lint
2025-06-16 10:03:40 +02:00
Sabrina Demagny 2ff790afb1 ✨(api) add endpoints to manage labels
This commit implements a complete label management system with the following features:

- Add CRUD operations for labels with hierarchical support (using slash-based naming)
- Implement label-thread associations (add/remove threads to/from labels)
- Add comprehensive permission checks (ADMIN/EDITOR roles required for management)
- Support hierarchical label structure with automatic parent creation
- Add color customization for labels
- Implement proper slug generation for label names
- Add extensive test coverage for all label operations

Technical details:
- New LabelViewSet with list, create, update, delete operations
- Custom actions for thread management (add-threads, remove-threads)
- Hierarchical label structure with parent-child relationships
- Automatic parent label creation when creating nested labels
- Proper permission handling based on mailbox access roles
- Comprehensive test suite covering all edge cases
- OpenAPI documentation for all endpoints
2025-06-15 18:18:31 +02:00