* Package name : golang-github-emersion-go-msgauth
Version : 0.6.6-1
Upstream Author : Simon Ser
* URL : https://github.com/emersion/go-msgauth
* License : Expat
Programming Lang: Go
Description : A Go library and tools for DKIM, DMARC and Authentication-Results
go-msgauth
.
godocs.io (https://godocs.io/github.com/emersion/go-msgauth) builds.sr.ht
status (https://builds.sr.ht/~emersion/go-msgauth/commits/master)
.
A Go library and tools to authenticate e-mails:
.
* Create and verify DKIM signatures
(https://tools.ietf.org/html/rfc6376)
* Create and parse Authentication-Results header fields
(https://tools.ietf.org/html/rfc7601)
* Fetch DMARC (http://tools.ietf.org/html/rfc7489) records
.
DKIM godocs.io (https://godocs.io/github.com/emersion/go-msgauth/dkim)
.
Sign
.
r := strings.NewReader(mailString)
.
options := &dkim.SignOptions{
Domain: "example.org",
Selector: "brisbane",
Signer: privateKey,
}
.
var b bytes.Buffer
if err := dkim.Sign(&b, r, options); err != nil {
log.Fatal(err)
}
.
Verify
.
r := strings.NewReader(mailString)
.
verifications, err := dkim.Verify(r)
if err != nil {
log.Fatal(err)
}
.
for _, v := range verifications {
if v.Err == nil {
log.Println("Valid signature for:", v.Domain)
} else {
log.Println("Invalid signature for:", v.Domain, v.Err)
}
}
.
FAQ
.
**Why can't I verify a mail.Message directly?** A mail.Message header is
already parsed, and whitespace characters (especially continuation
lines) are removed. Thus, the signature computed from the parsed header
is not the same as the one computed from the raw header.
.
**How can I publish my public key?** You have to add a TXT record to
your DNS zone. See RFC 6376 appendix C
(https://tools.ietf.org/html/rfc6376#appendix-C). You can use the dkim-
keygen tool included in go-msgauth to generate the key and the TXT
record.
.
Authentication-Results godocs.io
(https://godocs.io/github.com/emersion/go-msgauth/authres)
.
// Format
results := []authres.Result{
&authres.SPFResult{Value: authres.ResultPass, From: "example.net"},
&authres.AuthResult{Value: authres.ResultPass, Auth:
"sender@example.com"},
}
s := authres.Format("example.com", results)
log.Println(s)
.
// Parse
identifier, results, err := authres.Parse(s)
if err != nil {
log.Fatal(err)
}
.
log.Println(identifier, results)
.
DMARC godocs.io (https://godocs.io/github.com/emersion/go-msgauth/dmarc)
.
See the GoDoc page.
.
Tools
.
A few tools are included in go-msgauth:
.
* dkim-keygen: generate a DKIM key
* dkim-milter: a mail filter to sign and verify DKIM signatures
* dkim-verify: verify a DKIM-signed email
* dmarc-lookup: lookup the DMARC policy of a domain
.
License
.
MIT
This is a new build dependency for aerc.
We believe that the bug you reported is fixed in the latest version of golang-github-emersion-go-msgauth, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1013928@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Robin Jarry <robin@jarry.cc> (supplier of updated golang-github-emersion-go-msgauth package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Wed, 29 Jun 2022 13:39:03 +0530 Source: golang-github-emersion-go-msgauth Binary: go-msgauth golang-github-emersion-go-msgauth-dev Architecture: source amd64 all Version: 0.6.6-1 Distribution: unstable Urgency: medium Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org> Changed-By: Robin Jarry <robin@jarry.cc> Description: go-msgauth - Go library and tools for DKIM, DMARC and Authentication-Results ( golang-github-emersion-go-msgauth-dev - Go library and tools for DKIM, DMARC and Authentication-Results ( Closes: 1013928 Changes: golang-github-emersion-go-msgauth (0.6.6-1) unstable; urgency=medium . * Initial release (Closes: #1013928) Checksums-Sha1: 7b46ebf1077194ecc34fc698832d758d0a5beb40 2439 golang-github-emersion-go-msgauth_0.6.6-1.dsc 0891f313db7163ab3c4b86a5f3400e5bfe287444 25200 golang-github-emersion-go-msgauth_0.6.6.orig.tar.xz 5d2ae9f6ffe26953a1d8afa3e16b4705307d905c 4864 golang-github-emersion-go-msgauth_0.6.6-1.debian.tar.xz 2ca7a8b79a90527e4524a56f0bc24786acf52571 1744928 go-msgauth_0.6.6-1_amd64.deb 5909dcf8d5c498ba29e8a0de78e3adbad4ca8621 26356 golang-github-emersion-go-msgauth-dev_0.6.6-1_all.deb 226ecbb382ce97a1c9829e90a294a4ed027a2260 7087 golang-github-emersion-go-msgauth_0.6.6-1_amd64.buildinfo Checksums-Sha256: e934357fbcb8e9e63993b3fd83c4a3c63dae2513cc8773cd3181bbe496332b97 2439 golang-github-emersion-go-msgauth_0.6.6-1.dsc 3faab119944510a31840886605b02985a3fc89ccc22b1b68c7985217e06a9a19 25200 golang-github-emersion-go-msgauth_0.6.6.orig.tar.xz 59b75a2b35b34ab7d6ec558aaadae927b741185c102f7e831e291e67e171ea97 4864 golang-github-emersion-go-msgauth_0.6.6-1.debian.tar.xz f8f885a0c682d0969fb5b1574d531914bed1c2ba2b36154c70aada5ec0ef58aa 1744928 go-msgauth_0.6.6-1_amd64.deb 42f94dffa0830182f9414c0f032427e7a6ac566a846e2c7db90882ab965bbe51 26356 golang-github-emersion-go-msgauth-dev_0.6.6-1_all.deb 1b33ee3788a94bc60809e30ef8dee35698a9b4059465b51e34cd0bd379447cb0 7087 golang-github-emersion-go-msgauth_0.6.6-1_amd64.buildinfo Files: aebf2e607c0f14f41dfaca52a8574775 2439 golang optional golang-github-emersion-go-msgauth_0.6.6-1.dsc 0fefab7fadd09110955fa9eaa55fe088 25200 golang optional golang-github-emersion-go-msgauth_0.6.6.orig.tar.xz 6e3fb2cbf66b0d0fd61dc26848272a3f 4864 golang optional golang-github-emersion-go-msgauth_0.6.6-1.debian.tar.xz 16759e47083dbae25b2a7f0484ab3320 1744928 golang optional go-msgauth_0.6.6-1_amd64.deb 6fb15560cae04da9046ad631ce9a610a 26356 golang optional golang-github-emersion-go-msgauth-dev_0.6.6-1_all.deb 462d2ebeb5f9458a0e0e9eed8f592e82 7087 golang optional golang-github-emersion-go-msgauth_0.6.6-1_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQJGBAEBCgAwFiEEPpmlJvXcwMu/HO6mALrnSzQzafEFAmLHJy4SHG5pbGVzaEBk ZWJpYW4ub3JnAAoJEAC650s0M2nxkpEP/ilWSGaNosMReOdceW7w6Ueb7yXsGI8F EkDNzH3bZ93zsQoYTUxiH3+XUz1pUYs9SN428b9Z4ZonZvzhj1bCbQvkfSHVRYOu 6RUgFFpvEIalF15YATGmyOry10p7Z8VbC4GxMOcYNexCkEqZP+rZvpZFo2A6zjAw wZoAEb2pXSkr58+7bo6k2p2nNjJxHLYCpWoZyvk3+gVBanBV9F0kYILQQmzZMdjr 5TNXFcrxCk+Q5riD4ov+TKHEgoalJtHbdnKoAy0WOwwNBD7jNAJDVYyEmq8Dp8Ma Y0B9QaG/aDZvykCHlbmXJm7Pjyvk+pvSRM/OcKFLbUxf+1IKpyschJn5sfpoiPtD HzmFWZqqwsNr/Z1fvLo0zq/9LGxpUWbMy5tCoQPAyFQjMSl1dE//G0IxqzNGoSot MAW5Pot8fCxfFmTeGJCwQxwDiIwdUb6p38c9RSpABqpE4cbY1CkNzTCOFDdkyMMv G9tjBbLU7jPbJT+mGiAJs0Yw6caT2Io11U4G7NiIgmwHcNrHN6qDZ3DYlKO5t6L/ ziQHapTA47KucnezobB7XrXNU1D4lA7/JqiodjucHdHoLcJSshXwCR+hVny6AOOH rfCU8rizNFfPSeHBtlnhVvJRbT6BHB1NNaOZorewhc3WLsmPtZaKgVdNHmMWDzHJ otK4ddT5cBVy =rI+v -----END PGP SIGNATURE-----