X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=916ea6b11faf5c0212b156a38d1a3b4646bec38b;hb=dfc52faac997626810139f7a4b0f5c0cc5d6fcaf;hp=e8bff01bda4f08b1ab303e13d0696bdba347e89c;hpb=f05e3f012ab49da19dcd43d29d523e58b20979a8;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index e8bff01..916ea6b 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -180,14 +180,14 @@ def DoSSH(Str,Attrs): # host in a 12.12.12.12 # host in cname foo.bar. <- Trailing dot is required def DoDNS(Str,Attrs,DnRecord): - cname = re.match("^[\w-]+\s+in\s+cname\s+[\w.\-]+\.$",Str,re.IGNORECASE); - if re.match('^[\w-]+\s+in\s+a\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$',\ + cname = re.match("^[-\w]+\s+in\s+cname\s+[-\w.]+\.$",Str,re.IGNORECASE); + if re.match('^[-\w]+\s+in\s+a\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$',\ Str,re.IGNORECASE) == None and cname == None and \ - re.match("^[\w-]+\s+in\s+mx\s+\d{1,3}\s+[\w.\-]+\.$",Str,re.IGNORECASE) == None: + re.match("^[-\w]+\s+in\s+mx\s+\d{1,3}\s+[-\w.]+\.$",Str,re.IGNORECASE) == None: return None; # Check if the name is already taken - G = re.match('^([\w-+]+)\s',Str).groups(); + G = re.match('^([-\w+]+)\s',Str).groups(); # Check for collisions global l;