VirtualMailManager/domain.py
branchv0.7.x
changeset 711 2a75058fc064
parent 694 b1bfd4d1d9c0
parent 704 ad15e89a93ec
equal deleted inserted replaced
700:0a06f7b1da6a 711:2a75058fc064
     1 # -*- coding: UTF-8 -*-
     1 # -*- coding: UTF-8 -*-
     2 # Copyright (c) 2007 - 2013, Pascal Volk
     2 # Copyright (c) 2007 - 2014, Pascal Volk
     3 # See COPYING for distribution information.
     3 # See COPYING for distribution information.
     4 """
     4 """
     5     VirtualMailManager.domain
     5     VirtualMailManager.domain
     6     ~~~~~~~~~~~~~~~~~~~~~~~~~
     6     ~~~~~~~~~~~~~~~~~~~~~~~~~
     7 
     7 
    22 from VirtualMailManager.serviceset import ServiceSet
    22 from VirtualMailManager.serviceset import ServiceSet
    23 from VirtualMailManager.transport import Transport
    23 from VirtualMailManager.transport import Transport
    24 
    24 
    25 
    25 
    26 MAILDIR_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz'
    26 MAILDIR_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz'
    27 RE_DOMAIN = re.compile(r"^(?:[a-z0-9-]{1,63}\.){1,}[a-z]{2,6}$")
    27 RE_DOMAIN = re.compile(r"""^(?:[a-z0-9-]{1,63}\.){1,}  # one or more labels
       
    28                             (?:[a-z]{2,}               # a ASCII TLD
       
    29                             |xn--[a-z0-9]{4,})$        # or a ACE TLD""", re.X)
    28 _ = lambda msg: msg
    30 _ = lambda msg: msg
    29 cfg_dget = lambda option: None
    31 cfg_dget = lambda option: None
    30 
    32 
    31 
    33 
    32 class Domain(object):
    34 class Domain(object):