-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
[BUG] dmarc record parsing failure #4906
Comments
Hum, |
Oh, it works with spaces though. |
Hi @vstakhov I guess this change introduced another issue with spaces and DMARC parsing fails. Here is an example DMARC record that does not work anymore (space between "quarantine" and the semicolon): In this case Rspamd sets the symbol DMARC_BAD_POLICY with the following message: "p tag has invalid value: quarantin" Could you please take a look at this? |
Today I have found one more issue. Take the following DMARC record as an example (space between the last email address in RUA and the semicolon): In this case, the grammar cuts the last character of the last email address in RUA, this is the result: mailto:[email protected],mailto:[email protected] And even worse, all entries after RUA (in this case only TLC) are ignored. I am currently trying to come up with a better grammar, but I always have a hard time working with those. |
Prerequisites
Describe the bug
When parsing a DMARC DNS record for generating the DMARC report, rspamd fails if rua value contains multiple values seperated by
,
(a comma followed by spaces). Those values appear at least in the records ofdisneyplus.com
anddoctolib.de
.Steps to Reproduce
disneyplus.com
ordoctolib.de
rspamadm dmarc_report
invalid rua url: "null""
Expected behavior
DMARC reports are sent to all recipients.
Versions
Additional Information
I already traced the problem down to
gen_dmarc_grammar()
. It seems, the generated grammar does not handle spaces followed by commas in rua values (most like likely other values, too) correctly. According to rfc7489, whitespace after commas in rua and ruf values are allowed.The text was updated successfully, but these errors were encountered: