Skip to content

SpamLlm

Configures the LLM-based spam classifier.

This object can be configured from the WebUI under Settings › Spam Filter › LLM Classifier

SpamLlm is a multi-variant object: each instance has an @type discriminator selecting one of the variants below, and each variant carries its own set of fields.

Disabled

Enabled

Type: String[] · default: ["Unsolicited","Commercial","Harmful","Legitimate"] · min items: 2

The expected categories in the LLM response

Type: String[] · default: ["High","Medium","Low"]

The expected confidence levels in the LLM response

Type: UnsignedInt · default: 0

The position of the category field in the LLM response.

Type: UnsignedInt? · default: 1

The position of the confidence field in the LLM response.

Type: UnsignedInt? · default: 2

The position of the explanation field in the LLM response.

Type: Id<AiModel> · required

The AI model to use for the LLM classifier

Type: Text · required

The prompt to use for the LLM classifier

Type: String · default: ","

The separator character used to parse the LLM response.

Type: Float · default: 0.5 · max: 1 · min: 0

The temperature to use for the LLM classifier

The SpamLlm singleton is available via the urn:stalwart:jmap capability.

This is a standard Foo/get method as defined in RFC 8620, Section 5.1.

For singletons, the ids argument should be the literal singleton (or null to return the single instance).

This method requires the sysSpamLlmGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:SpamLlm/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This is a standard Foo/set method as defined in RFC 8620, Section 5.3.

For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.

This method requires the sysSpamLlmUpdate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:SpamLlm/set",
{
"update": {
"singleton": {
"description": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.

Terminal window
stalwart-cli get SpamLlm
Terminal window
stalwart-cli update SpamLlm --field description='updated value'