I had this script, but it doesn't work anymore with stalwart 0.16.20

Your question

Hello,
i had a shell script for creating accounts, but something with the locale strings must have changed - “de_DE” doesn’t work anymore. here’s the part of the script:

create Account/User
–field “name=$NAME”
–field “domainId=$DOMAIN_ID”
–field “credentials=$CREDENTIALS_JSON”
–field ‘memberGroupIds={}’
–field ‘roles={“@type”:“User”}’
–field ‘permissions={“@type”:“Inherit”}’
–field ‘locale=DeDE’
–field ‘timeZone=Europe/Berlin’
–field ‘quotas={“maxDiskQuota”:524288000}’
–field ‘aliases={}’
–field ‘encryptionAtRest={“@type”:“Disabled”}’
)

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 correct format is de_DE (underscore, not DeDE), matching the standard POSIX-style locale identifiers Stalwart uses for the locale field. Your script has a typo: it should be:

--field 'locale=de_DE'

The Account resource’s locale field takes values from Stalwart’s Locale enum, e.g. en_US, de_DE, de_AT, fr_FR, etc. (case matters and the separator is an underscore, not camel case). See the full list here: Locale enum reference.

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

It was not a typo, i just tried different values.
with “de_DE” i get this error:

error: invalidPatch
Invalid value Str(“de_DE”) for enum type EnUS.
Properties: locale

Try the BCP-47 format, --field 'locale=de-DE'.

thank you, this worked!