Issue uploading spam sample

Issue Description

When trying to create a new spam sample, no error is shown, but sample is not saved. Browser development console show jmap call returns 200 to /jmap POST “Blob/get”. Blob is 7kb in size. Response is:

{
    "methodResponses": [
        [
            "error",
            {
                "type": "unknownMethod",
                "description": "Method Blob/upload requires capability urn:ietf:params:jmap:blob which is not present in the \"using\" property."
            },
            "blob-0"
        ],
        [
            "error",
            {
                "type": "invalidResultReference",
                "description": "Invalid reference to non-existing object \"temp-blob-0\" from \"new-0\""
            },
            "set-0"
        ]
    ],
    "sessionState": "a4824225"
}

Expected Behavior

Spam sample created and listed.

Actual Behavior

Sample not created.

Reproduction Steps

  1. Open “Account”
  2. Open “Spam Samples”
  3. Do “Create sample” (no account, just message)

Relevant Log Output

None in server log.

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

PostgreSQL

Blob Storage

Filesystem

Search Engine

PostgreSQL

Directory Backend

Internal

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

This is a confirmed bug in the WebUI. The WebUI’s JMAP client (src/services/jmap/client.ts) already includes urn:ietf:params:jmap:blob in its using array – but the error message says the Blob/upload call is being sent without that capability declared. This points to a specific code path (the spam sample upload flow) that is making a JMAP request that does not go through the standard jmapRequest wrapper, and therefore doesn’t include the full using array with the blob capability.

The error chain is:

  1. Blob/upload is sent without urn:ietf:params:jmap:blob in the using property – server rejects it with unknownMethod.
  2. A second method call that references the blob result (temp-blob-0) then fails with invalidResultReference because the blob was never created.

This is a WebUI bug – the spam sample upload form is constructing or dispatching its JMAP request in a way that omits the blob capability from the using array. The server behavior is correct per the JMAP spec (RFC 9404).

Workaround: There is no known client-side workaround at this time. The fix needs to be applied in the WebUI code so that all Blob/upload calls go through the standard request path that includes the full using array.

A human maintainer or community member will follow up on the fix.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

You are on an old version of the WebUI, upgrade to fix it.