update symbols weights according to updates in #3690
I updated the symbol weights according to my new insights in #3690 to fix a bug pointed out by @2GetApp and to improve the logic itself. Previously, I reasoned about combinations of symbols that cannot exists, e.g., SPF allow, DKIM allow, DMARC reject. Removing these symbols and then reasoning about the rest is more appropriate. Moreover, I added `DMARC_POLICY_NA` and `DMARC_POLICY_SOFTFAIL` to the whole calculation. The issue description of #3690 I updated. I also added the Rust code I used to do and verify the calculations.
This commit is contained in:
parent
2167ae9a1e
commit
11e6094140
|
@ -54,7 +54,7 @@ symbols = {
|
||||||
groups = ["dkim"];
|
groups = ["dkim"];
|
||||||
}
|
}
|
||||||
"R_DKIM_NA" { # DKIM is not available for this domain
|
"R_DKIM_NA" { # DKIM is not available for this domain
|
||||||
weight = 0;
|
weight = 1;
|
||||||
description = "Missing DKIM signature";
|
description = "Missing DKIM signature";
|
||||||
one_shot = true;
|
one_shot = true;
|
||||||
groups = ["dkim"];
|
groups = ["dkim"];
|
||||||
|
@ -84,12 +84,12 @@ symbols = {
|
||||||
groups = ["dmarc"];
|
groups = ["dmarc"];
|
||||||
}
|
}
|
||||||
"DMARC_POLICY_ALLOW_WITH_FAILURES" { # DMARC check succeeded but either SPF or DKIM was not successful
|
"DMARC_POLICY_ALLOW_WITH_FAILURES" { # DMARC check succeeded but either SPF or DKIM was not successful
|
||||||
weight = -0.5;
|
weight = 0;
|
||||||
description = "DMARC permit policy with DKIM/SPF failure";
|
description = "DMARC permit policy with DKIM/SPF failure";
|
||||||
groups = ["dmarc"];
|
groups = ["dmarc"];
|
||||||
}
|
}
|
||||||
"DMARC_NA" { # DMARC is not available for this domain
|
"DMARC_NA" { # DMARC is not available for this domain
|
||||||
weight = 1;
|
weight = 0.5;
|
||||||
description = "No DMARC record";
|
description = "No DMARC record";
|
||||||
groups = ["dmarc"];
|
groups = ["dmarc"];
|
||||||
}
|
}
|
||||||
|
@ -99,12 +99,12 @@ symbols = {
|
||||||
groups = ["dmarc"];
|
groups = ["dmarc"];
|
||||||
}
|
}
|
||||||
"DMARC_POLICY_QUARANTINE" { # DMARC check failed and the policy is to quarantine
|
"DMARC_POLICY_QUARANTINE" { # DMARC check failed and the policy is to quarantine
|
||||||
weight = 1.5;
|
weight = 3;
|
||||||
description = "DMARC quarantine policy";
|
description = "DMARC quarantine policy";
|
||||||
groups = ["dmarc"];
|
groups = ["dmarc"];
|
||||||
}
|
}
|
||||||
"DMARC_POLICY_REJECT" { # DMARC check failed and the policy is to reject
|
"DMARC_POLICY_REJECT" { # DMARC check failed and the policy is to reject
|
||||||
weight = 2;
|
weight = 5.5;
|
||||||
description = "DMARC reject policy";
|
description = "DMARC reject policy";
|
||||||
groups = ["dmarc"];
|
groups = ["dmarc"];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue