Issue Description
According to the JMAP FileNode specification (draft-ietf-jmap-filenode-20, Section on Roles), at most one Directory in an account can have a given role, and setting a role that another Directory already has should result in an invalidProperties error. However, the server currently fails to enforce this uniqueness constraint, allowing clients to create unlimited directories with the same role (e.g., home).
Expected Behavior
The server should check role uniqueness across the account. If a directory with the specified role already exists, any subsequent creation or update attempting to assign the same role to another directory should be rejected with an invalidProperties error.
Actual Behavior
The server successfully accepts the creation requests and allows an unlimited number of directories to be created with the exact same role (such as home) without returning any error.
Reproduction Steps
- Send a
FileNode/setrequest to create the first directory with"role": "home". - Send a subsequent
FileNode/setrequest to create another directory with"role": "home"in the same account. - Observe that both directories are created successfully instead of the second one being rejected with an
invalidPropertieserror.
Relevant Log Output
{
“methodResponses”: [
[
“FileNode/query”,
{
“accountId”: “d”,
“queryState”: “sbe”,
“canCalculateChanges”: true,
“position”: 0,
“ids”: [
“b”,
“c”,
“d”,
“e”,
“i”,
“j”
]
},
“fnq_has_any_role”
],
[
“FileNode/get”,
{
“accountId”: “d”,
“state”: “sbe”,
“list”: [
{
“id”: “b”,
“parentId”: null,
“name”: “My files”,
“role”: “home”,
“@type”: “Directory”,
“created”: “2026-11-05T06:18:41Z”,
“myRights”: {
“mayRead”: true,
“mayAddChildren”: true,
“mayRename”: true,
“mayDelete”: true,
“mayModifyContent”: true,
“mayShare”: true,
“maySetMetadata”: true
},
“shareWith”: null
},
{
“id”: “c”,
“parentId”: null,
“name”: “My files”,
“role”: “home”,
“@type”: “Directory”,
“created”: “2026-11-05T06:18:41Z”,
“myRights”: {
“mayRead”: true,
“mayAddChildren”: true,
“mayRename”: true,
“mayDelete”: true,
“mayModifyContent”: true,
“mayShare”: true,
“maySetMetadata”: true
},
“shareWith”: null
},
{
“id”: “d”,
“parentId”: null,
“name”: “Trash”,
“role”: “trash”,
“@type”: “Directory”,
“created”: “2026-11-05T06:18:41Z”,
“myRights”: {
“mayRead”: true,
“mayAddChildren”: true,
“mayRename”: true,
“mayDelete”: true,
“mayModifyContent”: true,
“mayShare”: true,
“maySetMetadata”: true
},
“shareWith”: null
},
{
“id”: “e”,
“parentId”: null,
“name”: “Trash”,
“role”: “trash”,
“@type”: “Directory”,
“created”: “2026-11-05T06:18:41Z”,
“myRights”: {
“mayRead”: true,
“mayAddChildren”: true,
“mayRename”: true,
“mayDelete”: true,
“mayModifyContent”: true,
“mayShare”: true,
“maySetMetadata”: true
},
“shareWith”: null
},
{
“id”: “i”,
“parentId”: null,
“name”: “Home 3”,
“role”: “home”,
“@type”: “Directory”,
“created”: “2026-11-05T09:09:01Z”,
“myRights”: {
“mayRead”: true,
“mayAddChildren”: true,
“mayRename”: true,
“mayDelete”: true,
“mayModifyContent”: true,
“mayShare”: true,
“maySetMetadata”: true
},
“shareWith”: null
},
{
“id”: “j”,
“parentId”: null,
“name”: “Home 4”,
“role”: “home”,
“@type”: “Directory”,
“created”: “2026-11-05T09:16:33Z”,
“myRights”: {
“mayRead”: true,
“mayAddChildren”: true,
“mayRename”: true,
“mayDelete”: true,
“mayModifyContent”: true,
“mayShare”: true,
“maySetMetadata”: true
},
“shareWith”: null
}
],
“notFound”:
},
“fng_has_any_role”
]
],
“sessionState”: “f642002e”
}
Stalwart Version
v1.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
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