Vultr DNS provider fails to publish RSA DKIM TXT record due to split-string quoting

Issue Description

When using the built-in Vultr DNS provider to automatically publish DKIM records, publication of an RSA (2048-bit) DKIM key fails with a 400 BadRequest from the Vultr API.

Expected Behavior

Successfully publishd the RSA (2048) DKIM TXT record via the Vultr DNS API.

Actual Behavior

The task fails because the Vultr API rejects the request with a 400 Bad Request, so the record is not created.

Reproduction Steps

  1. Configure the Vultr DNS provider in Stalwart with valid API credentials.

  2. Create a domain and generate an RSA (2048-bit) DKIM signature.

  3. Enable automatic DKIM key rotation/renewal for the domain.

  4. Confirm the scheduled task “Perform DKIM key rotation for a domain” under Tasks → Scheduled.

  5. Monitor the result of that task.

  6. Observe that task fails with the error.

(Contrast) Repeat with an Ed25519 DKIM key — publication succeeds.

Relevant Log Output

Failed to publish DKIM record v1-rsa-20260607-elpf3pan._domainkey..: Failed to set DNS RRSet: API error: BadRequest {“error”:“Unable to add record: Quotes may only appear at the beginning and end of the data”,“status”:400}

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

MySQL

Blob Storage

S3-compatible

Search Engine

MySQL

Directory Backend

SQL

Additional Context

  • Docker Compose with network_mode: host
  • reverse proxy: none (no reverse proxy)
  • DNS Resolver: local Unbound, used by Stalwart for outbound DNS

Unbound listens on 127.0.0.1 / ::1, port 53535, restricted to localhost
General domains are forwarded over DoT to Cloudflare.
Several DNSBL zones (Spamhaus and etc…) are set as like ‘local-zone: “zen.spamhaus.org” nodefault’

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

Let me look into the Vultr DNS provider implementation in the Stalwart source code.