All Projects → emersion → Go Msgauth

emersion / Go Msgauth

Licence: mit
A Go library for DKIM, DMARC and Authentication-Results

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Msgauth

Laravel Welcome Notification
Send a welcome notification to new users
Stars: ✭ 299 (+374.6%)
Mutual labels:  mail, auth
Mailchimp Boilerplate
MailChimp repeatable blocks boilerplate
Stars: ✭ 56 (-11.11%)
Mutual labels:  mail
Sendria
Sendria (formerly MailTrap) is a SMTP server designed to run in your dev/test environment, that is designed to catch any email you or your application is sending, and display it in a web interface instead of sending to real world.
Stars: ✭ 30 (-52.38%)
Mutual labels:  mail
Idtoken Verifier
Lightweight RSA JWT verification
Stars: ✭ 52 (-17.46%)
Mutual labels:  auth
Globus Sdk Python
Globus SDK for Python
Stars: ✭ 32 (-49.21%)
Mutual labels:  auth
Mailer
A lightweight PHP SMTP mail sender
Stars: ✭ 53 (-15.87%)
Mutual labels:  mail
Openstack Policy Editor
A Casbin Policy Editor for OpenStack
Stars: ✭ 28 (-55.56%)
Mutual labels:  auth
Django Auth Tutorial Example
Django Authentication Video Tutorial
Stars: ✭ 60 (-4.76%)
Mutual labels:  auth
Applescripts
My collection of AppleScripts created/acquired over the years. This repo is designed to provide useful AppleScripts for others and as a general resource for AppleScript education.
Stars: ✭ 56 (-11.11%)
Mutual labels:  mail
Laravel5.7 Vue Cli3 Boilerplate
Boilerplate / Starter kit. Laravel 5.7, Vue CLI 3 — Authentication with Email Verification. REST API.
Stars: ✭ 52 (-17.46%)
Mutual labels:  auth
Authorizer
Simple Authorization via PHP Classes
Stars: ✭ 46 (-26.98%)
Mutual labels:  auth
Forsaken Mail
a self-hosted disposable mail service
Stars: ✭ 974 (+1446.03%)
Mutual labels:  mail
Lara Vue Auth
A repo for laravel vue authentication tutorial.
Stars: ✭ 54 (-14.29%)
Mutual labels:  auth
Q Municate Services Ios
Easy-to-use services for Quickblox SDK, for speeding up development of iOS chat applications
Stars: ✭ 30 (-52.38%)
Mutual labels:  auth
Hedwig
Send email to any SMTP server like a boss, in Swift and cross-platform
Stars: ✭ 1,096 (+1639.68%)
Mutual labels:  mail
Hapi Auth Keycloak
JSON Web Token based Authentication powered by Keycloak
Stars: ✭ 29 (-53.97%)
Mutual labels:  auth
Slim3 Jwt Auth Example
Server side implementation example of JWT (JSON Web Token) authentication using Slim3
Stars: ✭ 45 (-28.57%)
Mutual labels:  auth
Imapcopy
Recursively copy all e-mail messages and folders from one IMAP account to another.
Stars: ✭ 52 (-17.46%)
Mutual labels:  mail
Msgviewer
MsgViewer is email-viewer utility for .msg e-mail messages, implemented in pure Java. MsgViewer works on Windows/Linux/Mac Platforms. Also provides a java api to read mail messges (msg files) programmatically.
Stars: ✭ 61 (-3.17%)
Mutual labels:  mail
Mail4delphi
Mail4Delphi uses the Indy component to send the email.
Stars: ✭ 60 (-4.76%)
Mutual labels:  mail

go-msgauth

godocs.io builds.sr.ht status codecov

A Go library to authenticate e-mails:

DKIM godocs.io

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.

Authentication-Results godocs.io

// Format
results := []authres.Result{
	&authres.SPFResult{Value: authres.ResultPass, From: "example.net"},
	&authres.AuthResult{Value: authres.ResultPass, Auth: "[email protected]"},
}
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

See the GoDoc page.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].