Hello, You have to escape the quotes:
zone-set bastetrix.com @ 86400 TXT \"v=spf1 include:spf.messagingengine.com -all\" Regards, Daniel On 8/9/20 4:47 AM, Sadiq Saif wrote: > Hi all, > > Today I ran into some unexpected behaviour, I wanted to make a modification > to the TTL (3600->86400) for the SPF TXT record for bastetrix.com, so I did > the following: > > zone-set bastetrix.com @ 86400 TXT "v=spf1 include:spf.messagingengine.com > -all" > > But the result was unexpected, instead of modifying the record, I got a new > record that looked like this: > > bastetrix.com. 86400 IN TXT "v=spf1" > "include:spf.messagingengine.com" " -all" > > RFC 7208 Section 3.3: > > 3.3. Multiple Strings in a Single DNS Record > > As defined in [RFC1035], Sections 3.3 and 3.3.14, a single text DNS > record can be composed of more than one string. If a published > record contains multiple character-strings, then the record MUST be > treated as if those strings are concatenated together without adding > spaces. For example: > > IN TXT "v=spf1 .... first" "second string..." > > is equivalent to: > > IN TXT "v=spf1 .... firstsecond string..." > > TXT records containing multiple strings are useful in constructing > records that would exceed the 255-octet maximum length of a > character-string within a single TXT record. > > If I'm not misreading this bit of the RFC, that record would result in a > wrongly formatted SPF record without the correct spaces. > > And indeed when I added the same SPF record to another zone (bastetrix.net) > using `knotc zone set` Fastmail's DNS record checker said that I had not > added a SPF record. I had to edit the zone by hand in a text editor to fix > the issue. > > Is this a bug in `knotc zone-set` or intended behaviour? Am I > misunderstanding some implementation detail in TXT records or the RFC? > -- > Sadiq Saif > Bastetrix LLC > -- https://lists.nic.cz/mailman/listinfo/knot-dns-users
