def __is_localhost(self, inbox):
    return ipaddress.ip_address(socket.gethostbyname(urlparse(inbox).hostname)).is_loopback
def __is_localhost(self, inbox):
    return ipaddress.ip_address(socket.gethostbyname(urlparse(inbox).hostname)).is_loopback