Sieve script creation error

Your question

Hi,

Stalwart 0.16.11 in a VM.
I’m trying to set a Sieve script in the Stalwart account page and it is not working.
In the Trace log I’m seeing this error:
2026-07-03T09:29:30Z TRACE HTTP request body (http.request-body) listenerId = “https”, localPort = 443, remoteIp = 10.2.1.19, remotePort = 51716, details = [[“host”, “mail.example.ro”], [“connection”, “keep-alive”], [“content-length”, “428”], [“sec-ch-ua-platform”, ““Windows””], [“authorization”, “Bearer sw1.gLK-vpNZF9Bo5J1-sS5uYxiTmFH_tetVE4URMoJSrezPE1_RTwc8MY_dSBnu_lJH8w.YW5kcmVpLm1pcm9uQHJlY2VwdGl2LnJv”], [“user-agent”, “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36”], [“sec-ch-ua”, ““Brave”;v=“149”, “Chromium”;v=“149”, “Not)A;Brand”;v=“24"”], [“content-type”, “application/json”], [“sec-ch-ua-mobile”, “?0”], [“accept”, “/”], [“sec-gpc”, “1”], [“accept-language”, “en-US,en;q=0.9”], [“origin”, “https://mail.example.ro”], [“sec-fetch-site”, “same-origin”], [“sec-fetch-mode”, “cors”], [“sec-fetch-dest”, “empty”], [“referer”, “https://mail.example.ro/admin/Account/SieveScript/new”], [“accept-encoding”, “gzip, deflate, br, zstd”]], contents = “{“using”:[“urn:ietf:params:jmap:core”,“urn:stalwart:jmap”],“methodCalls”:[[“Blob/upload”,{“accountId”:“c”,“create”:{“temp-blob-0”:{“data”:[{“data:asText”:“require \“fileinto\”;\n\nif address :is \“From\” \“test@testingro\” {\n fileinto \“Trash\”;\n}”}],“type”:“application/octet-stream”}}},“blob-0”],[“SieveScript/set”,{“accountId”:“c”,“create”:{“new-0”:{“blobId”:”#temp-blob-0”,“isActive”:true,“name”:“cPanel”}}},“set-0”]]}", size = 428
2026-07-03T09:29:30Z DEBUG Invalid JMAP result reference (jmap.invalid-result-reference) listenerId = “https”, localPort = 443, remoteIp = 10.2.1.19, remotePort = 51716, details = "Invalid reference to non-existing object “temp-blob-0” from “new-0"”
2026-07-03T09:29:30Z TRACE HTTP response body (http.response-body) listenerId = “https”, localPort = 443, remoteIp = 10.2.1.19, remotePort = 51716, contents = “{“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”:“5ebc9e46”}”, code = 200, size = 360

The user from which I’m trying to create the Sieve Script is Administrator.

Any ideas are appreciated.

Thanks,
Andrei

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

The error is straightforward: the JMAP request being sent only declares "using":["urn:ietf:params:jmap:core","urn:stalwart:jmap"], but it also calls Blob/upload, which requires the urn:ietf:params:jmap:blob capability to be listed in using. Since it’s missing, Stalwart rejects Blob/upload as an unknown method, and the subsequent SieveScript/set call fails because it references the (never-created) blob.

This isn’t Stalwart’s own WebUI request (Stalwart’s WebUI always includes urn:ietf:params:jmap:blob, along with urn:ietf:params:jmap:sieve, in its using array for every request). The referer in your log (/admin/Account/SieveScript/new) suggests you’re using a third-party front-end (e.g. a cPanel plugin) that’s constructing its own JMAP calls. That client needs to add "urn:ietf:params:jmap:blob" to its using array, and ideally "urn:ietf:params:jmap:sieve" too, since sieve script management also depends on that capability.

If you’re actually using Stalwart’s built-in WebUI at /admin/... and it’s producing this malformed request, that would point to a bug, but the JSON body shown doesn’t match what the current WebUI sends, so it’s worth confirming which client/integration is issuing this request.

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

I’m using Stalwart WebUI.

Is referer /admin/Account because the user is Administrator.

This is the screenshot of the webpage where I’m trying to create the Sieve script:

The same error I encounter if I’m trying from an user without Administrative role:

2026-07-03T09:53:14Z TRACE HTTP request body (http.request-body) listenerId = “https”, localPort = 443, remoteIp = 10.2.1.19, remotePort = 62233, details = [[“host”, “mail.example.ro”], [“connection”, “keep-alive”], [“content-length”, “428”], [“sec-ch-ua-platform”, ““Windows””], [“authorization”, “Bearer sw1.YM2IN-GIoq42gT4Jzl_ReWb8wVLbYj0XPzqEktfYBpX2G4ixwrHzj1j71UI9HVkSNqY.c2lsdml1LnV0YUByZWNlcHRpdi5ybw”], [“user-agent”, “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36”], [“sec-ch-ua”, ““Brave”;v=“149”, “Chromium”;v=“149”, “Not)A;Brand”;v=“24"”], [“content-type”, “application/json”], [“sec-ch-ua-mobile”, “?0”], [“accept”, “/”], [“sec-gpc”, “1”], [“accept-language”, “en-US,en;q=0.6”], [“origin”, “https://mail.example.ro”], [“sec-fetch-site”, “same-origin”], [“sec-fetch-mode”, “cors”], [“sec-fetch-dest”, “empty”], [“referer”, “https://mail.example.ro/account/Account/SieveScript/new”], [“accept-encoding”, “gzip, deflate, br, zstd”]], contents = “{“using”:[“urn:ietf:params:jmap:core”,“urn:stalwart:jmap”],“methodCalls”:[[“Blob/upload”,{“accountId”:“d”,“create”:{“temp-blob-0”:{“data”:[{“data:asText”:“reuire \“fileinto\”;\n\nif address :is \“From\” \“[email protected]\” {\n fileinto \“Trash\”;\n}”}],“type”:“application/octet-stream”}}},“blob-0”],[“SieveScript/set”,{“accountId”:“d”,“create”:{“new-0”:{“blobId”:”#temp-blob-0”,“isActive”:true,“name”:“Forward”}}},“set-0”]]}", size = 428
2026-07-03T09:53:14Z DEBUG Invalid JMAP result reference (jmap.invalid-result-reference) listenerId = “https”, localPort = 443, remoteIp = 10.2.1.19, remotePort = 62233, details = "Invalid reference to non-existing object “temp-blob-0” from “new-0"”
2026-07-03T09:53:14Z TRACE HTTP response body (http.response-body) listenerId = “https”, localPort = 443, remoteIp = 10.2.1.19, remotePort = 62233, contents = “{“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”:“5ebc9e46”}”, code = 200, size = 360

As you can see the refferer nou is /account/Account instead of /admin/Account.

Update the WebUI to the latest version to fix it.

How to update the WebUI? When I’m updating the Stalwart binary WebUI is not embedded?

There is an action you can trigger: Action | Stalwart