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

DMARC mailto schema should be required #1474

Closed
patrickbenkoetter opened this issue Aug 2, 2024 · 2 comments
Closed

DMARC mailto schema should be required #1474

patrickbenkoetter opened this issue Aug 2, 2024 · 2 comments
Labels
bug Unexpected or unwanted behaviour of current implementations

Comments

@patrickbenkoetter
Copy link

Currently the internet.nl tool does not detect erroneous URIs in rua or ruf tags and in consequence it doesn't mark the test as failure. Instead it reports the DMARC DNS resource record to be valid and flags the test as passed. But specifying a valid URI is a mandatory RFC requirement:

A Mail Receiver MUST implement support for a "mailto:" URI, i.e., the ability to send a DMARC report via electronic mail.
If not provided, Mail Receivers MUST NOT generate failure reports.
-- RFC 7489: 6.3 General Record Format

An invalid DMARC DNS record is a problem, because if the URI is missing, any RFC compliant mail receiver will not send a report and the senderdomain owner will not be able to detect abuse of the senderdomain. Therefore the whole concept to protect a senderdomain with DMARC fails.

The reason internet.n doesn't detect the error probably stems from the fact that the Python standard library urlparse-function, used by internet.nl, doesn't return an error if the URI is missing:

>>> urlparse("[email protected]")
>>> urlparse("mailto:[email protected]")

internet.nl therefore doesn't take notice and subsequently it doesn't mark the DNS Resource Record to be invalid.

RFC 7489 specifies one but only one valid URI any mail receiver MUST support which is mailto:.

Examples for valid rua URIs are:

v=DMARC1; p=none; rua=mailto:[email protected]
v=DMARC1; p=none; rua=mailto:[email protected],mailto:[email protected],
    mailto:[email protected]

Examples for invalid rua URIs would be:

v=DMARC1; p=none; [email protected]
v=DMARC1; p=none; rua=mailto:[email protected],[email protected],
    [email protected]

We believe this is an error and we think it should be fixed. internet.nl should detect an URI error and flag the corresponding test as failed so that people can notice there's something important wrong.

@bwbroersma bwbroersma added the bug Unexpected or unwanted behaviour of current implementations label Aug 2, 2024
@bwbroersma
Copy link
Collaborator

Also because of other DMARC parsing issues:

It might be interesting to use an ABNF regex generator package instead. Note there is a package that already encoded RFC 7489 - DMARC, plus uses the referenced RFC's to parse other elements like URI's etc.

uwekamper added a commit to sys4/Internet.nl that referenced this issue Sep 6, 2024
uwekamper added a commit to sys4/Internet.nl that referenced this issue Sep 6, 2024
uwekamper added a commit to sys4/Internet.nl that referenced this issue Sep 6, 2024
@uwekamper
Copy link
Contributor

uwekamper commented Sep 6, 2024

I added a small PR to fix this particular problem. All it does is checking if URI that is parsed by Python's own urllib.parse contains a scheme (parsed.scheme is not "").

See the PR here: #1493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected or unwanted behaviour of current implementations
Development

No branches or pull requests

3 participants