SpamDnsblServer
SpamDnsblServer
Section titled “SpamDnsblServer”Defines a DNSBL server used for spam filtering lookups.
This object can be configured from the WebUI under Settings › Spam Filter › DNSBL › Servers
Fields
Section titled “Fields”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.
@type: "Any"
Section titled “@type: "Any"”Any
Type:
Expression· requiredExpression that returns the tag to assign to the message.
Available variables:
SpamIpVariable.
Type:
Expression· requiredExpression that returns the DNS zone to query.
Available variables:
SpamGenericVariable.
Type:
String· read-onlyA unique name for this DNSBL server configuration
description
Section titled “description”Type:
String?Description for the DNSBL server
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this DNSBL server
@type: "Url"
Section titled “@type: "Url"”URL
Type:
Expression· requiredExpression that returns the tag to assign to the message.
Available variables:
SpamIpVariable.
Type:
Expression· requiredExpression that returns the DNS zone to query.
Available variables:
SpamUrlVariable.
Type:
String· read-onlyA unique name for this DNSBL server configuration
description
Section titled “description”Type:
String?Description for the DNSBL server
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this DNSBL server
@type: "Domain"
Section titled “@type: "Domain"”Domain
Type:
Expression· requiredExpression that returns the tag to assign to the message.
Available variables:
SpamIpVariable.
Type:
Expression· requiredExpression that returns the DNS zone to query.
Available variables:
SpamGenericVariable.
Type:
String· read-onlyA unique name for this DNSBL server configuration
description
Section titled “description”Type:
String?Description for the DNSBL server
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this DNSBL server
@type: "Email"
Section titled “@type: "Email"”Type:
Expression· requiredExpression that returns the tag to assign to the message.
Available variables:
SpamIpVariable.
Type:
Expression· requiredExpression that returns the DNS zone to query.
Available variables:
SpamEmailVariable.
Type:
String· read-onlyA unique name for this DNSBL server configuration
description
Section titled “description”Type:
String?Description for the DNSBL server
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this DNSBL server
@type: "Ip"
Section titled “@type: "Ip"”IP
Type:
Expression· requiredExpression that returns the tag to assign to the message.
Available variables:
SpamIpVariable.
Type:
Expression· requiredExpression that returns the DNS zone to query.
Available variables:
SpamIpVariable.
Type:
String· read-onlyA unique name for this DNSBL server configuration
description
Section titled “description”Type:
String?Description for the DNSBL server
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this DNSBL server
@type: "Header"
Section titled “@type: "Header"”Header
Type:
Expression· requiredExpression that returns the tag to assign to the message.
Available variables:
SpamIpVariable.
Type:
Expression· requiredExpression that returns the DNS zone to query.
Available variables:
SpamHeaderVariable.
Type:
String· read-onlyA unique name for this DNSBL server configuration
description
Section titled “description”Type:
String?Description for the DNSBL server
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this DNSBL server
@type: "Body"
Section titled “@type: "Body"”Body
Type:
Expression· requiredExpression that returns the tag to assign to the message.
Available variables:
SpamIpVariable.
Type:
Expression· requiredExpression that returns the DNS zone to query.
Available variables:
SpamGenericVariable.
Type:
String· read-onlyA unique name for this DNSBL server configuration
description
Section titled “description”Type:
String?Description for the DNSBL server
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this DNSBL server
JMAP API
Section titled “JMAP API”The SpamDnsblServer object is available via the urn:stalwart:jmap capability.
x:SpamDnsblServer/get
Section titled “x:SpamDnsblServer/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysSpamDnsblServerGet permission.
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" ] }'x:SpamDnsblServer/set
Section titled “x:SpamDnsblServer/set”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.
Create
Section titled “Create”This operation requires the sysSpamDnsblServerCreate permission.
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" ] }'Update
Section titled “Update”This operation requires the sysSpamDnsblServerUpdate permission.
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" ] }'Destroy
Section titled “Destroy”This operation requires the sysSpamDnsblServerDestroy permission.
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" ] }'x:SpamDnsblServer/query
Section titled “x:SpamDnsblServer/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysSpamDnsblServerQuery permission.
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):
| Condition | Kind |
|---|---|
name | text |
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get SpamDnsblServer id1Create
Section titled “Create”stalwart-cli create SpamDnsblServer/Any \ --field 'tag={"else":"Example","match":{}}' \ --field 'zone={"else":"Example","match":{}}'stalwart-cli query SpamDnsblServerstalwart-cli query SpamDnsblServer --where name=exampleUpdate
Section titled “Update”stalwart-cli update SpamDnsblServer id1 --field description='updated value'Delete
Section titled “Delete”stalwart-cli delete SpamDnsblServer --ids id1Nested types
Section titled “Nested types”Expression
Section titled “Expression”A conditional expression with match rules and a default value.
Type:
ExpressionMatch[]List of conditions and their corresponding results
Type:
String· requiredElse condition
ExpressionMatch
Section titled “ExpressionMatch”A single condition-result pair in an expression.
Type:
String· requiredIf condition
Type:
String· requiredThen clause
Expression references
Section titled “Expression references”The following expression contexts are used by fields on this page:
SpamIpVariable(Variables)SpamGenericVariable(Variables)SpamUrlVariable(Variables)SpamEmailVariable(Variables)SpamHeaderVariable(Variables)