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

SPF verify returning None for long domain names with valid SPF records #33

Closed
titussanchez opened this issue May 31, 2024 · 1 comment · Fixed by #34
Closed

SPF verify returning None for long domain names with valid SPF records #33

titussanchez opened this issue May 31, 2024 · 1 comment · Fixed by #34

Comments

@titussanchez
Copy link
Contributor

Hi,

I recently found some domain names in the wild that are fairly long. They are >63 characters and causing the SPF verification function to return a None even though a valid SPF record exists at the domain name.

I found this in spf/verify.rs:91-93

        if domain.is_empty() || domain.len() > 63 || !domain.has_labels() {
            return output.with_result(SpfResult::None);
        }

Based on RFC 5321 it looks like the 63 character limitation should be on the individual labels and not the total length of the domain. The total domain name length limit is 255 characters.

@mdecimus
Copy link
Member

Hi,

Makes sense, can you submit a PR for this?

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

Successfully merging a pull request may close this issue.

2 participants