On Sat 09/Sep/2023 20:16:04 +0200 Douglas Foster wrote:
Thus, if I get N messages from example.com <http://example.com>, and the "pct"
value is X, then the DMARC test is applied only to X% of that N; the simplest
way to do this per-message would be to pick a random number between 0 and 1 and
if it's greater than X%, the message simply bypasses DMARC altogether.
Drop "simplest": /the way/ to do this is to pick up a random number between 0
and 100 and if it's greater than X%, the message simply bypasses DMARC altogether.
My implementation:
if (vh.dmarc.pct != 100 && random() % 100 >= vh.dmarc.pct)
{
dispo = dispo_deliver;
if (parm->dyn.stats)
parm->dyn.stats->dmarc_reason = dmarc_reason_sampled_out;
...
See also:
https://en.wikipedia.org/wiki/Bernoulli_sampling
Best
Ale
--
_______________________________________________
dmarc mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/dmarc