Automatic DNS Management with deSEC server fails adding every record using domain name for subname field

Issue Description

When utilizing the Automatic DNS Management feature for my primary domain, every DNS record is successfully added to deSEC except for those that use the domain name for the subname field. In my case, the relevant records are:

  • example.com. IN TXT "v=spf1 mx -all"
  • example.com. IN CAA 0 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/##########"
  • example.com. IN CAA 0 iodef "mailto:[email protected]"

(I had manually added the MX record in advance, but since this is the only other record with “example.com.” in the subname field I will assume this to be the fourth record issuing the BadRequest.)

Relevant Log Output

Failed to create DNS record for example.com.: Failed to create DNS record: API error: BadRequest {"subname":["Subname can only use (lowercase) a-z, 0-9, ., -, and _, may start with a '*.', or just be '*'. Components may not exceed 63 characters."]}; Failed to create DNS record for example.com.: Failed to create DNS record: API error: BadRequest {"subname":["Subname can only use (lowercase) a-z, 0-9, ., -, and _, may start with a '*.', or just be '*'. Components may not exceed 63 characters."]}; Failed to create DNS record for example.com.: Failed to create DNS record: API error: BadRequest {"subname":["Subname can only use (lowercase) a-z, 0-9, ., -, and _, may start with a '*.', or just be '*'. Components may not exceed 63 characters."]}; Failed to create DNS record for example.com.: Failed to create DNS record: API error: BadRequest {"subname":["Subname can only use (lowercase) a-z, 0-9, ., -, and _, may start with a '*.', or just be '*'. Components may not exceed 63 characters."]}

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

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

I agree to follow the project’s Code of Conduct.

on

I had the same issue. What makes it worse, is that stalwart clears all records first, takes a while to recreate them and then fails for most of them. I think it should try to merge them intelligently.