https://github.com/linagora/james-project/pull/3242/commits/62bab3269ceef65c1741fbbf243e5c109307ad8c highlighted a race condition when sending a mail via JMAP.
Cause: the mail is processedn, and marked for outgoing delivery.
It is reenqueued, and appended to outgoing queue.
The post dequeue decorator, moving JMAP mails from outbox to sent is applied to times, leading eventualy to invalid results and race condition.
Proposed fix: only apply post dequeue decorator to "spool"