def _domain_check(domain, domain_list, resolve):
if domain in domain_list:<EOL><INDENT>return True<EOL><DEDENT>if resolve:<EOL><INDENT>for exchange in _get_mx_exchanges(domain):<EOL><INDENT>for value in domain_list:<EOL><INDENT>if exchange.endswith(value):<EOL><INDENT>return True<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return False<EOL>
Returns ``True`` if the ``domain`` is serviced by the ``domain_list``.

    :param str domain: The domain to check
    :param list domain_list: The domains to check for
    :param bool resolve: Resolve the domain
    :rtype: bool