Your question
I was using JMAP to list and update Sieve script(s) in Stalwart v0.12.
Now with v0.16 the identical code fails ![]()
I’m sending the following request to list the existing Sieve scripts (the used account has none!): POST https://boulder.egroupware.org/jmap/
{
"using" : [ "urn:ietf:params:jmap:mail" ],
"methodCalls" : [ [ "SieveScript/get", {
"accountId" : "b"
}, "0" ] ]
}
I get the following response:
HTTP/2 400
Content-Type: application/problem+json
{"type":"urn:ietf:params:jmap:error:notRequest","status":400,"detail":"{\"using\":[\"urn:ietf:params:jmap:mail\"],\"methodCalls\":[[\"SieveScript\\/get\",{\"accountId\":\"b\"},\"0\"]]}"}
I thought this might be caused by no Sieve script exists and therefore is activated, so I tried installing one: POST https://boulder.egroupware.org/jmap/upload/b/ with the script as body and got the expected response:
{"accountId":"b","blobId":"ed00tvwkyeak7oobbmum9i0d1fbbjh3xsvj29gv2paa7gkupjolcaamt17kncbq","type":"application\/x-www-form-urlencoded","size":713}
Then I tried installing and activating it:
{
"using":["urn:ietf:params:jmap:mail"],
"methodCalls":[
["SieveScript/set",{
"accountId":"b",
"create":{
"A":{
"name":"mail",
"blobId":"ed00tvwkyeak7oobbmum9i0d1fbbjh3xsvj29gv2paa7gkupjolcaamt17kncbq"
}
},
"onSuccessActivateScript":"#A"
},
"0"
]
]
}
And again I get a similar error-response as when I tried listing the scripts:
HTTP/2 400
Content-Type: application/problem+json
{"type":"urn:ietf:params:jmap:error:notRequest","status":400,"detail":"{\"using\":[\"urn:ietf:params:jmap:mail\"],\"methodCalls\":[[\"SieveScript\\/set\",{\"accountId\":\"b\",\"create\":{\"A\":{\"name\":\"mail\",\"blobId\":\"ed00tvwkyeak7oobbmum9i0d1fbbjh3xsvj29gv2paa7gkupjolcaamt17kncbq\"}},\"onSuccessActivateScript\":\"#A\"},\"0\"]]}"}
I checked that “b” is in fact my JMAP accountId.
I have no idea what has changed between Stalwart v0.12 and v0.16 that causes the working JMAP code for Sieve to fail now ![]()
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