Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate auth_results/DKIM values #539

Open
Pascal76 opened this issue Aug 14, 2024 · 0 comments
Open

duplicate auth_results/DKIM values #539

Pascal76 opened this issue Aug 14, 2024 · 0 comments

Comments

@Pascal76
Copy link

Hello,

Sometimes auth_results contains several times (twice or more) the same DKIM values.
Ex: (I converted the format to json)
{"dkim":[{"domain":"pmlgu-etau-40.ovh","selector":"nice","result":"pass"},{"domain":"pmlgu-etau-40.ovh","selector":"nice","result":"pass"}],"spf":[{"domain":"srv217x178.pmlgu-etau-40.ovh","scope":"mfrom","result":"pass"}]}
Could parsedmarc remove duplicates ?

In my side I do that :

function json_unique($json) { $return = array(); $json = json_decode($json,true); ksort($json); foreach ($json as $key=>$values) { ksort($values); $values = array_unique(array_map('json_encode',$values)); $tab = array(); foreach ($values as $value) { $tab[] = json_decode($value,true); } if ($tab) $return[$key] = $tab; } return json_encode($return); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant