def user_domain_match(A, B):
 A = A.lower()
 B = B.lower()
 if (not (liberal_is_HDN(A) and liberal_is_HDN(B))):
  if (A == B):
   return True
  return False
 initial_dot = B.startswith('.')
 if (initial_dot and A.endswith(B)):
  return True
 if ((not initial_dot) and (A == B)):
  return True
 return False

def user_domain_match ( A , B ) : A = A . lower ( ) B = B . lower ( ) if ( not ( liberal_is_HDN ( A ) and liberal_is_HDN ( B ) ) ) : if ( A == B ) : return True return False initial_dot = B . startswith ( '.' ) if ( initial_dot and A . endswith ( B ) ) : return True if ( ( not initial_dot ) and ( A == B ) ) : return True return False
for blocking/accepting domains .