Issue Description
RFC 9404, Section 4.1 says: “For each successful upload, servers MUST add an entry to the createdIds map … the value must be available to later methods defined in the same Request Object.” On v0.16.23 a creation id from Blob/upload cannot be used as #id in Email/import within the same request.
Expected Behavior
“blobId”: “#u0” in Email/import resolves to the blob created as u0 by the preceding Blob/upload call in the same request.
Actual Behavior
Blob/upload succeeds, Email/import returns:
notCreated: {“m0”: {“type”: “invalidProperties”, “description”: “Invalid blob id.”, “properties”: [“blobId”]}}
Sending the real blob id in a second request works.
Reproduction Steps
- Authenticate as a normal user with a mail account.
- Send this request (replace the account id and inbox id):
{"using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail", "urn:ietf:params:jmap:blob"],
"methodCalls": [
["Blob/upload", {"accountId": "d", "create": {"u0": {"data": [{"data:asText": "From: [email protected]\r\nSubject: t\r\n\r\nx\r\n"}], "type": "message/rfc822"}}}, "u"],
["Email/import", {"accountId": "d", "emails": {"m0": {"blobId": "#u0", "mailboxIds": {"<inbox id>": true}}}}, "i"]
]}
- Email/import reports “Invalid blob id.”
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
Additional Context
Found while bulk-importing test messages over JMAP. Workaround: upload in one request, import in a second one.
Found and reproduced with the help of an AI assistant (Claude by Anthropic) while evaluating Stalwart; I reviewed this report before submitting.
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on