X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=ud-mailgate;h=916ea6b11faf5c0212b156a38d1a3b4646bec38b;hb=a551cec7583c6d3ca2f320b6abea2dfb9d262bb8;hp=e8bff01bda4f08b1ab303e13d0696bdba347e89c;hpb=f72b8a7c5b4155d7f4207073f8120e93b53587a9;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;