SPF configuration with multiple IP addresses

djcart

Verified User
Joined
Jun 29, 2021
Messages
125
I have such a problem. At the beginning of the server configuration, we had one IP address. Now we have about ten of them. Currently, for each new domain, an SPF record is created with the content "v=spf1 a mx ip4:166.11.11.32 ~all" whereas the customer's IP address differs from what is in this record. How to make it so that for each newly added domain the IP address matches the record in the TXT record?"
 
My understanding is that you can edit /usr/local/directadmin/data/templates/dns_txt.conf and place your edit in /usr/local/directadmin/data/templates/custom. My experience is that whatever you place here will never actually be populated when a domain is added. I think it's broken, but it could be that I'm misunderstanding it. If it is broken, maybe you could follow up with the DA devs and see if they would fix it.

Personally, I'm running a sed on all DNS zones every few minutes to set SPF records. But in my case I'm not hosting DNS, I'm merely exposing the DNS page to users, and they take what's there and add it to their DNS host even if I tell them not to, so I started doing this. My method would only work with hosted DNS if I were also bumping the serial numbers and reloading the DNS server, so it's a fairly bad solution for anyone not in my unique situation.
 
Back
Top