Skip to content

SpamDnsblServer

Defines a DNSBL server used for spam filtering lookups.

This object can be configured from the WebUI under Settings › Spam Filter › DNSBL › Servers

SpamDnsblServer 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.

Any

Type: Expression · required

Expression that returns the tag to assign to the message.

Available variables: SpamIpVariable.

Type: Expression · required

Expression that returns the DNS zone to query.

Available variables: SpamGenericVariable.

Type: String · read-only

A unique name for this DNSBL server configuration

Type: String?

Description for the DNSBL server

Type: Boolean · default: true

Whether to enable this DNSBL server

URL

Type: Expression · required

Expression that returns the tag to assign to the message.

Available variables: SpamIpVariable.

Type: Expression · required

Expression that returns the DNS zone to query.

Available variables: SpamUrlVariable.

Type: String · read-only

A unique name for this DNSBL server configuration

Type: String?

Description for the DNSBL server

Type: Boolean · default: true

Whether to enable this DNSBL server

Domain

Type: Expression · required

Expression that returns the tag to assign to the message.

Available variables: SpamIpVariable.

Type: Expression · required

Expression that returns the DNS zone to query.

Available variables: SpamGenericVariable.

Type: String · read-only

A unique name for this DNSBL server configuration

Type: String?

Description for the DNSBL server

Type: Boolean · default: true

Whether to enable this DNSBL server

E-mail

Type: Expression · required

Expression that returns the tag to assign to the message.

Available variables: SpamIpVariable.

Type: Expression · required

Expression that returns the DNS zone to query.

Available variables: SpamEmailVariable.

Type: String · read-only

A unique name for this DNSBL server configuration

Type: String?

Description for the DNSBL server

Type: Boolean · default: true

Whether to enable this DNSBL server

IP

Type: Expression · required

Expression that returns the tag to assign to the message.

Available variables: SpamIpVariable.

Type: Expression · required

Expression that returns the DNS zone to query.

Available variables: SpamIpVariable.

Type: String · read-only

A unique name for this DNSBL server configuration

Type: String?

Description for the DNSBL server

Type: Boolean · default: true

Whether to enable this DNSBL server

Header

Type: Expression · required

Expression that returns the tag to assign to the message.

Available variables: SpamIpVariable.

Type: Expression · required

Expression that returns the DNS zone to query.

Available variables: SpamHeaderVariable.

Type: String · read-only

A unique name for this DNSBL server configuration

Type: String?

Description for the DNSBL server

Type: Boolean · default: true

Whether to enable this DNSBL server

Body

Type: Expression · required

Expression that returns the tag to assign to the message.

Available variables: SpamIpVariable.

Type: Expression · required

Expression that returns the DNS zone to query.

Available variables: SpamGenericVariable.

Type: String · read-only

A unique name for this DNSBL server configuration

Type: String?

Description for the DNSBL server

Type: Boolean · default: true

Whether to enable this DNSBL server

The SpamDnsblServer object is available via the urn:stalwart:jmap capability.

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

This method requires the sysSpamDnsblServerGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:SpamDnsblServer/get",
{
"ids": [
"id1"
]
},
"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.

Supports create, update, and destroy operations in a single call.

This operation requires the sysSpamDnsblServerCreate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:SpamDnsblServer/set",
{
"create": {
"new1": {
"@type": "Any",
"tag": {
"else": "Example",
"match": {}
},
"zone": {
"else": "Example",
"match": {}
}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysSpamDnsblServerUpdate permission.

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

This operation requires the sysSpamDnsblServerDestroy permission.

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

This is a standard Foo/query method as defined in RFC 8620, Section 5.5.

This method requires the sysSpamDnsblServerQuery permission.

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

The x:SpamDnsblServer/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):

ConditionKind
nametext

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

Terminal window
stalwart-cli get SpamDnsblServer id1
Terminal window
stalwart-cli create SpamDnsblServer/Any \
--field 'tag={"else":"Example","match":{}}' \
--field 'zone={"else":"Example","match":{}}'
Terminal window
stalwart-cli query SpamDnsblServer
stalwart-cli query SpamDnsblServer --where name=example
Terminal window
stalwart-cli update SpamDnsblServer id1 --field description='updated value'
Terminal window
stalwart-cli delete SpamDnsblServer --ids id1

A conditional expression with match rules and a default value.

Type: ExpressionMatch[]

List of conditions and their corresponding results

Type: String · required

Else condition

A single condition-result pair in an expression.

Type: String · required

If condition

Type: String · required

Then clause

The following expression contexts are used by fields on this page: