Deterministic, PII-free fingerprints for email parse failures — the same broken message yields the same hash in every language, so dedup and roll-up just work.
Docs · Libraries · TypeScript
Read-only mirror. This repo is a generated, release-time mirror of the MailKite monorepo (the private source of truth) — development doesn't happen here. Install from Go modules and open issues against the MailKite docs.
When a MIME message fails to parse, you want to know which class of failure it is — without ever
touching the words, addresses, or subjects inside it. ComputeSignature turns a failure into a
deterministic, PII-free fingerprint built only from structural features (scope, diagnostic codes,
content type, transfer encoding, leading body bytes, header names, mailer family). The same failure
produces the same FNV-1a hash in TypeScript, Python, and Go — byte-for-byte — so you can dedup
across services, roll up "a whole class is failing" vs. a precise group, and feed both the cold-loop
issue body and the hot-loop match from one fingerprint.
go get github.com/mailkite/mail-parse-gopackage main
import (
"fmt"
mailparse "github.com/mailkite/mail-parse-go"
)
func main() {
sig := mailparse.ComputeSignature(mailparse.FailureEvent{
Scope: "part",
DiagnosticCodes: []string{"BOUNDARY_NOT_CLOSED"},
ContentType: "application/ms-tnef",
TransferEncoding: "base64",
})
fmt.Println(sig.Hash) // f55154fda8f2cadd — same in TS, Python, and Go
for _, r := range sig.Rollup {
fmt.Printf("%-12s %s\n", r.Level, r.Hash) // scope → contentType → byteSignature → mailer
}
}ComputeSignature returns a FailureSignature with the finest-granularity Hash (the primary dedup
key), the normalized Features, and a coarse-to-fine Rollup. The package also exports the building
blocks Fnv1a64 and NormalizeMailer.
| Library | Language | Package |
|---|---|---|
| mail-parse | TypeScript | @mailkite/mail-parse |
| mail-parse-py | Python | mailkite-mail-parse |
| mail-parse-go | Go | github.com/mailkite/mail-parse-go |
MIT — see LICENSE.