Exemple #1
0
def are_spf_include_mechanisms_strong(spf_record):
    output_info("Checking SPF include mechanisms")
    include_strong = spf_record._are_include_mechanisms_strong()
    if include_strong:
        output_bad("Include mechanisms include a strong record")
    else:
        output_indifferent("Include mechanisms are not strong")

    return include_strong
Exemple #2
0
def is_spf_redirect_record_strong(spf_record):
    output_info("Checking SPF redirect domian: %(domain)s" % {"domain": spf_record.get_redirect_domain})
    redirect_strong = spf_record._is_redirect_mechanism_strong()
    if redirect_strong:
        output_bad("Redirect mechanism is strong.")
    else:
        output_indifferent("Redirect mechanism is not strong.")

    return redirect_strong
Exemple #3
0
def are_spf_include_mechanisms_strong(spf_record):
    output_info("Checking SPF include mechanisms")
    include_strong = spf_record._are_include_mechanisms_strong()
    if include_strong:
        output_bad("Include mechanisms include a strong record")
    else:
        output_indifferent("Include mechanisms are not strong")

    return include_strong
Exemple #4
0
def is_spf_redirect_record_strong(spf_record):
    output_info("Checking SPF redirect domian: %(domain)s" % {"domain": spf_record.get_redirect_domain})
    redirect_strong = spf_record._is_redirect_mechanism_strong()
    if redirect_strong:
        output_bad("Redirect mechanism is strong.")
    else:
        output_indifferent("Redirect mechanism is not strong.")

    return redirect_strong
def check_spf_all_string(spf_record):
    strong_spf_all_string = False
    if spf_record.all_string is not None:
        if spf_record.all_string == "~all" or spf_record.all_string == "-all":
            output_indifferent("SPF record contains an All item: " + spf_record.all_string)
        else:
            output_good("SPF record All item is too weak: " + spf_record.all_string)
            strong_spf_all_string = True
    else:
        output_good("SPF record has no All string")

    return strong_spf_all_string
def check_spf_all_string(spf_record):
    strong_spf_all_string = False
    if spf_record.all_string is not None:
        if spf_record.all_string == "~all" or spf_record.all_string == "-all":
            output_indifferent("SPF record contains an All item: " +
                               spf_record.all_string)
        else:
            output_good("SPF record All item is too weak: " +
                        spf_record.all_string)
            strong_spf_all_string = True
    else:
        output_good("SPF record has no All string")

    return strong_spf_all_string
def check_spf_all_string(spf_record):
    strong_spf_all_string = True

    if spf_record.all_string:

        if spf_record.all_string == "~all" or spf_record.all_string == "-all":
            output_indifferent(
                f"SPF record contains an All item: {spf_record.all_string}")
        else:
            output_good(
                f"SPF record All item is too weak: {spf_record.all_string}")
            strong_spf_all_string = False

    else:
        output_good("SPF record has no All string")
        strong_spf_all_string = False

    if not strong_spf_all_string:
        strong_spf_all_string = check_spf_include_redirect(spf_record)

    return strong_spf_all_string
Exemple #8
0
def check_dmarc_extras(dmarc_record):
    if dmarc_record.pct is not None and dmarc_record.pct != str(100):
            output_indifferent("DMARC pct is set to " + dmarc_record.pct + "% - might be possible")

    if dmarc_record.rua is not None:
        output_indifferent("Aggregate reports will be sent: " + dmarc_record.rua)

    if dmarc_record.ruf is not None:
        output_indifferent("Forensics reports will be sent: " + dmarc_record.ruf)
Exemple #9
0
def check_dmarc_extras(dmarc_record):
    if dmarc_record.pct is not None and dmarc_record.pct != str(100):
            output_indifferent("DMARC pct is set to " + dmarc_record.pct + "% - might be possible")

    if dmarc_record.rua is not None:
        output_indifferent("Aggregate reports will be sent: " + dmarc_record.rua)

    if dmarc_record.ruf is not None:
        output_indifferent("Forensics reports will be sent: " + dmarc_record.ruf)
def check_dmarc_extras(dmarc_record):
    if dmarc_record.pct and dmarc_record.pct != str(100):
        output_indifferent(
            f"DMARC pct is set to {dmarc_record.pct}% - might be possible")

    if dmarc_record.rua:
        output_indifferent(
            f"Aggregate reports will be sent: {dmarc_record.rua}")

    if dmarc_record.ruf:
        output_indifferent(
            f"Forensics reports will be sent: {dmarc_record.ruf}")