diff --git a/src/utils/net.py b/src/utils/net.py index 470949f25..dd5148378 100644 --- a/src/utils/net.py +++ b/src/utils/net.py @@ -35,9 +35,10 @@ Simple utility modules. import re import socket -emailRe = re.compile(r"^(\w&.+-]+!)*[\w&.+-]+@" - r"(([0-9a-z]([0-9a-z-]*[0-9a-z])?\.)[a-z]{2,6}|" - r"([0-9]{1,3}\.){3}[0-9]{1,3})$", re.I) +from .web import _ipAddr, _domain + +emailRe = re.compile(r"^(\w&.+-]+!)*[\w&.+-]+@(%s|%s)$" % (_domain, _ipAddr), + re.I) def getSocket(host): """Returns a socket of the correct AF_INET type (v4 or v6) in order to