1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

DKIM is a no-op now (#1084)

This commit is contained in:
Tom Limoncelli
2021-03-07 15:01:03 -05:00
committed by GitHub
parent 46f54ad3a3
commit 9f0ac5dfba
5 changed files with 126 additions and 148 deletions

View File

@@ -176,17 +176,6 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
return
}
// TODO: Write a test.
func checkTxtStrings(rc *models.RecordConfig) error {
for i := range rc.TxtStrings {
l := len([]byte(rc.TxtStrings[i]))
if l > 255 {
return fmt.Errorf("length of TxtStrings[%d] is %d, which is >255", i, l)
}
}
return nil
}
func transformCNAME(target, oldDomain, newDomain string) string {
// Canonicalize. If it isn't a FQDN, add the newDomain.
result := dnsutil.AddOrigin(target, oldDomain)
@@ -327,11 +316,6 @@ func ValidateAndNormalizeConfig(config *models.DNSConfig) (errs []error) {
if errs2 := checkTargets(rec, domain.Name); errs2 != nil {
errs = append(errs, errs2...)
}
if rec.HasFormatIdenticalToTXT() { // i.e. if it is a TXT or SPF record.
if err := checkTxtStrings(rec); err != nil {
errs = append(errs, err)
}
}
// Canonicalize Targets.
if rec.Type == "CNAME" || rec.Type == "MX" || rec.Type == "NAPTR" || rec.Type == "NS" || rec.Type == "SRV" {