Skip to content

[Feature]: Support automatic splitting of long TXT records (e.g., DKIM) into 255-byte strings, or provide a configurable TXT length option #809

@lukasdebaum

Description

@lukasdebaum

What problem are you trying to solve?

When adding a standard DKIM TXT record
"v=DKIM1; k=rsa; h=sha256; s=email; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr4jWwiUrBv/5M87XAgbSmaMa3LvyWQ6Rj/SInmNY653/0i2qr1AwuM96XA/X0RLN78BmNHU3aXg4BvOtyhcHiKeTZoz4xYpFgALWjdq9ygsdoDQEI1dVHValLEiOGevIynVtDwmxohwscZClYIAYPI1YByC889JuIm21c/h8rN/vQrd7tlb1a01bYFGMKR+kUIHZ8VAxzvgvYm5+hp09Nvmu7NGVqfNFeKGez6CTFDyPdxHJTdP8hnzDHWxgxker9J/XyppSR4yePP/KKPgCGvkRJ2FxCVqHXejielxbGPB4DkAZb9qNVXC8W+Mc4Z39vNMzrxqoXwYHL64ZqIEx0QIDAQAB"

Poweradmin rejects the entry with:

TXT record string exceeds 255 bytes. TXT strings must be 255 bytes or less. For longer content, split into multiple quoted strings separated by spaces.

lib/Domain/Service/DnsValidation/TXTRecordValidator.php:170
Function: "Check string length - RFC 7208 limits TXT strings to 255 bytes"

Manually splitting long DKIM/SPF TXT content into multiple quoted strings is error-prone and confusing for users. DNS servers such as PowerDNS handle splitting on output. I’m able to find longer TXT entries already stored with older Poweradmin versions. The current validation prevents saving otherwise valid DKIM records.

Reference: PowerDNS internally splits longer TXT records before sending them: https://doc.powerdns.com/authoritative/appendices/types.html#txt

What would you like implemented?

  • Allow configuring the maximum TXT string length via config, or
  • Automatically split over-limit TXT content into quoted ≤255-byte segments.
    editing such records may be more complex; the goal is to avoid manual quoted strings for users.

Do you have a preferred approach (config flag, default auto-split, or something else) and suggestions to keep the edit flow simple?

Additional context (optional)

No response

Metadata

Metadata

Assignees

Labels

coreCore Features

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions