Repository navigation
release: version packages - #1
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
mailgrade@0.2.0
Minor Changes
9c80dd2Thanks @IgnaceMaes! - Fix relaxed DMARC alignment under registry-operated second-level domains, andlet a caller supply the real Public Suffix List.
The built-in suffix rules were a fixed list of 42 two-label pairs. A pair not
on it —
gov.uk,ac.jp,org.cn,com.ec— collapsed every host under itto the pair itself, so
dept.gov.ukandattacker.gov.ukshared anorganizational domain and relaxed alignment reported them as aligned. In
mailgrade/verifythat is a DMARC pass for a signature the From domain'sowner never made.
co,com,gov,ac,org,ne,sch, …) as part of the suffix under any country code,rather than only for enumerated pairs. The remaining approximation errs
toward reading a host as more specific than it is, which under-reports
alignment instead of over-reporting it.
registrableDomain,domainLabelandalignstake an optional{ publicSuffixes }, andverifyDmarcandverifyMessageaccept andforward it. Supplying a list replaces the built-in rules entirely: the
longest entry matching a host's tail is its public suffix. Pass the ICANN
section of the real PSL where a wrong alignment decision has a cost.
194029a- First release.Grade a domain's SPF, DMARC and DKIM configuration, build and review DMARC
records, and analyse a pasted header block. Zero runtime dependencies, no
network code outside the optional
mailgrade/dohentry point, and alanguage-neutral conformance corpus in
spec/so the rules can be ported.9c80dd2Thanks @IgnaceMaes! - Addmailgrade/node-dns, aResolverbacked bynode:dns.nodeResolver()resolves through the system resolver rather than a publicDoH endpoint, which a service that does not want every lookup leaving the
process (or that is grading domains in bulk against a rate-limited resolver)
now gets without writing the adapter itself. It does the mapping the
Resolvercontract needs and that is easy to get wrong by hand: NXDOMAIN andENODATA answer
[]rather than throwing (a throw would be read astemperrorwherefailis correct), TXT chunks are rejoined, and MX answersare reduced to bare host names.
{ servers, timeout, tries }build adedicated
dns.Resolver, never touching process-wide DNS configuration.node:dnsis imported only by this entry point, and only on the firstlookup, so
mailgrade,mailgrade/verifyandmailgrade/dohstay loadablein Workers and browsers.
9c80dd2Thanks @IgnaceMaes! - Newmailgrade/verifyentry point: real message verification, still at zerodependencies, still running anywhere WebCrypto and
fetchdo.verifySpfevaluates a policy against a connecting IP per RFC 7208:every mechanism, the macro language, redirects, exp= explanations, and the
limits receivers enforce (10 lookups, 2 void lookups, 10 MX hosts).
verifyDkimverifies DKIM signatures with WebCrypto: rsa-sha256 anded25519-sha256, simple and relaxed canonicalization, l= body lengths, and
the RFC 8301 refusals (rsa-sha1, RSA keys under 1024 bits).
verifyDmarcdiscovers the policy with the org-domain fallback and appliesstrict or relaxed alignment;
verifyMessageruns all three on a raw message.Resolver:dohResolver()(new, inmailgrade/doh) needs nothing butfetch, andstaticResolver(zone)makes tests and offline evaluation trivial.
toAuthResultsrenders a verification as an RFC 8601Authentication-Results header value, ready to stamp onto the message,
and readable back by
analyzeHeaders.checkDomainandresolveDomainaccept the sameresolveroption, so aNode service can grade domains over
node:dnsinstead of DoH.Fixes in the grader:
analyzeSpfnow grades the firstallmechanism rather than the lastone, matching how receivers evaluate a record: in
"v=spf1 ?all -all"the-allis dead code and the record is neutral.mailProvidermatches MX hosts by domain suffix instead of substring, solookalike hosts no longer name the wrong provider.
isDomainNameaccepts punycode TLDs, so IDN domains take part in alignmentchecks instead of being skipped.