Skip to content

DnsServer

Defines a DNS server for automatic record management.

This object can be configured from the WebUI under Settings › Network › DNS › DNS Providers

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

RFC2136 (TSIG)

Type: IpAddr · required

The IP address of the DNS server

Type: UnsignedInt · default: 53 · max: 65535 · min: 1

The port used to communicate with the DNS server

Type: String · required

The key used to authenticate with the DNS server

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: IpProtocol · default: "udp"

The protocol used to communicate with the DNS server

Type: TsigAlgorithm · default: "hmac-sha512"

The TSIG algorithm used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

RFC2136 (SIG0)

Type: IpAddr · required

The IP address of the DNS server

Type: UnsignedInt · default: 53 · max: 65535 · min: 1

The port used to communicate with the DNS server

Type: String · required

The public key used to authenticate with the DNS server

Type: SecretText · required

The secret or token used to authenticate with the DNS server

Type: String · required

The signer name used in the SIG0 records

Type: IpProtocol · default: "udp"

The protocol used to communicate with the DNS server

Type: Sig0Algorithm · default: "ed25519"

The SIG0 algorithm used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

Cloudflare

Type: String?

Optional account email to authenticate with Cloudflare

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

DigitalOcean

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

DeSEC

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

OVH

Type: String · required

The application key used to authenticate with the OVH DNS server

Type: SecretKey · required

The application secret used to authenticate with the OVH DNS server

Type: SecretKey · required

The consumer key used to authenticate with the OVH DNS server

Type: OvhEndpoint · default: "ovh-eu"

Which OVH endpoint to use

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

BunnyDNS

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

Porkbun

Type: String · required

The API key used to authenticate with Porkbun

Type: SecretKey · required

The secret API key used to authenticate with Porkbun

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

DNSimple

Type: SecretKey · required

The authentication token used to authenticate with DNSimple

Type: String · required

The account ID used to authenticate with DNSimple

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

Spaceship

Type: String · required

The API key used to authenticate with Spaceship

Type: SecretKey · required

The secret or token used to authenticate with the DNS server

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

AWS Route53

Type: String · required

The AWS access key ID

Type: SecretKey · required

The AWS secret access key

Type: SecretKeyOptional · required

Optional session token for temporary AWS credentials

Type: String · default: "us-east-1"

The AWS region

Type: String?

Hosted zone ID to use (resolved automatically by name if not set)

Type: Boolean · default: false

Whether to restrict zone resolution to private zones only

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

Google Cloud DNS

Type: SecretText · required

Service account JSON credentials used to authenticate with Google Cloud

Type: String · required

The Google Cloud project ID that owns the managed zone

Type: String?

Managed zone name (resolved automatically by longest suffix match if not set)

Type: Boolean · default: false

Whether to restrict zone resolution to private zones only

Type: String?

Optional service account email to impersonate

Type: String · required

Short description of this DNS server

Type: Id<Tenant>?

Identifier for the tenant this DNS server belongs to

Type: Duration · default: "30s"

Request timeout for the DNS server

Type: Duration · default: "5m"

The TTL for new DNS record

Type: Duration · default: "15s"

How often to check for DNS records to propagate

Type: Duration · default: "1m"

How long to wait for DNS records to propagate

Type: Duration?

Initial delay before first propagation check (useful for slow providers)

The DnsServer 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 sysDnsServerGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:DnsServer/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 sysDnsServerCreate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:DnsServer/set",
{
"create": {
"new1": {
"@type": "Tsig",
"description": "Example",
"host": "192.0.2.1",
"key": {
"@type": "Value",
"secret": "Example"
},
"keyName": "Example"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysDnsServerUpdate permission.

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

This operation requires the sysDnsServerDestroy permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:DnsServer/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 sysDnsServerQuery permission.

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

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

ConditionKind
memberTenantIdid of Tenant

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

Terminal window
stalwart-cli get DnsServer id1
Terminal window
stalwart-cli create DnsServer/Tsig \
--field host=192.0.2.1 \
--field keyName=Example \
--field 'key={"@type":"Value","secret":"Example"}' \
--field description=Example
Terminal window
stalwart-cli query DnsServer
stalwart-cli query DnsServer --where memberTenantId=id1
Terminal window
stalwart-cli update DnsServer id1 --field keyName='updated value'
Terminal window
stalwart-cli delete DnsServer --ids id1

A secret value provided directly, from an environment variable, or from a file.

A secret value provided directly.

Type: String · required · secret

Password or secret value

A secret value read from an environment variable.

Type: String · required

Environment variable name to read the secret from

A secret value read from a file.

Type: String · required

File path to read the secret from

A secret text value provided directly, from an environment variable, or from a file.

A secret text value provided directly.

Type: Text · required · secret

Password or secret value

An optional secret value, or none.

  • None: No secret. No additional fields.
  • Value: Secret value. Carries the fields of SecretKeyValue.
  • EnvironmentVariable: Secret read from environment variable. Carries the fields of SecretKeyEnvironmentVariable.
  • File: Secret read from file. Carries the fields of SecretKeyFile.
ValueLabel
udpUDP
tcpTCP
ValueLabel
hmac-md5HMAC-MD5
gssGSS
hmac-sha1HMAC-SHA1
hmac-sha224HMAC-SHA224
hmac-sha256HMAC-SHA256
hmac-sha256-128HMAC-SHA256-128
hmac-sha384HMAC-SHA384
hmac-sha384-192HMAC-SHA384-192
hmac-sha512HMAC-SHA512
hmac-sha512-256HMAC-SHA512-256
ValueLabel
ecdsa-p256-sha256ECDSA-P256-SHA256
ecdsa-p384-sha384ECDSA-P384-SHA384
ed25519ED25519
ValueLabel
ovh-euOVH EU
ovh-caOVH CA
kimsufi-euKimsufi EU
kimsufi-caKimsufi CA
soyoustart-euSoyoustart EU
soyoustart-caSoyoustart CA