X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-generate;h=1617821ba38de4eec4787aac1a3fc96a3137dad6;hb=d355ef6e793853db50849d19a5c53bbb2b7c5871;hp=91d95a7a18aac59d3e6b5e6b9249123de03d38d4;hpb=32c616b7a9236fd172ee33c99d3006a49c0d4a10;p=mirror%2Fuserdir-ldap.git diff --git a/ud-generate b/ud-generate index 91d95a7..1617821 100755 --- a/ud-generate +++ b/ud-generate @@ -780,6 +780,7 @@ def GenDNS(File): # Fetch all the users global PasswdAttrs + RRs = {} # Write out the zone file entry for each user for x in PasswdAttrs: @@ -805,11 +806,13 @@ def GenDNS(File): F.write("; Has BSMTP\n") # Write some identification information - if Split[2].lower() == "a": - Line = "%s IN TXT \"%s\"\n"%(Split[0], EmailAddress(x)) - for y in x[1]["keyFingerPrint"]: - Line = Line + "%s IN TXT \"PGP %s\"\n"%(Split[0], FormatPGPKey(y)) - F.write(Line) + if not RRs.has_key(Host): + if Split[2].lower() in ["a", "aaaa"]: + Line = "%s IN TXT \"%s\"\n"%(Split[0], EmailAddress(x)) + for y in x[1]["keyFingerPrint"]: + Line = Line + "%s IN TXT \"PGP %s\"\n"%(Split[0], FormatPGPKey(y)) + F.write(Line) + RRs[Host] = 1 else: Line = "; Err %s"%(str(Split)) F.write(Line)