[Samba] Samba 4 samba-tool dns question
amitay at samba.org
Wed Jun 13 22:13:09 MDT 2012
On Wed, Jun 13, 2012 at 8:45 PM, Kai Blin <kai at samba.org> wrote:
> On 2012-06-13 11:21, Trever L. Adams wrote:
> Hi Trever,
>> /usr/local/samba/bin/samba-tool dns add s4server.example.org example.org
>> example.org TXT "v=spf1 mx -all"
>> I am not sure it is because it is showing up with dig as "v=spf1" "mx"
>> "-all" where it should be all one string, I believe.
> Well, this is how the current code is set up, Amitay added this behavior
> to the DLZ backend recently, and I followed along for the internal
> server. I'm not aware of how the string tokenization is actually
> described in the standard. I'm also not sure if the issue actually is
> that samba-tool doesn't preserve the quotes around the string, so the
> data is tokenized when added to the AD record.
> Amitay, any insights on that one?
The tokenization changes were added to support multiple strings in txt
record. If you want to use a single string with spaces in it as a txt
record, you have to quote it twice.
samba-tool dns add s4server example.org example.org TXT "'v=spf1 mx -all'"
If you are using nsupdate to add the record, then make sure to quote
it as follows:
update add example.org 3600 IN TXT "v=spf1 mx -all"
That should get you the desired result.
More information about the samba