This commit is contained in:
Andres Erbsen
2015-08-18 12:24:19 -07:00
parent 7db05892c4
commit 2cf1158195

View File

@@ -1,13 +1,14 @@
# go-dkim
DKIM package for Golang
[![GoDoc](https://godoc.org/github.com/toorop/go-dkim?status.svg)](https://godoc.org/github.com/toorop/go-dkim)
Fork of `toorop`'s DKIM with non-pointer API and bugfixes.
[![GoDoc](https://godoc.org/github.com/andres-erbsen/go-dkim?status.svg)](https://godoc.org/github.com/andres-erbsen/go-dkim)
## Getting started
### Install
```
go get github.com/toorop/go-dkim
go get github.com/andres-erbsen/go-dkim
```
Warning: you need to use Go 1.4.2-master or 1.4.3 (when it will be available)
see https://github.com/golang/go/issues/10482 fro more info.
@@ -16,7 +17,7 @@ see https://github.com/golang/go/issues/10482 fro more info.
```go
import (
dkim "github.com/toorop/go-dkim"
dkim "github.com/andres-erbsen/go-dkim"
)
func main(){
@@ -33,8 +34,6 @@ func main(){
options.Canonicalization = "relaxed/relaxed"
err := dkim.Sign(&email, options)
// handle err..
// And... that's it, 'email' is signed ! Amazing© !!!
}
```
@@ -46,11 +45,11 @@ import (
func main(){
// email is the email to verify (byte slice)
status, err := Verify(&email)
// handle status, err (see godoc for status)
_, err := Verify(email, nil, nil)
}
```
## Todo
- [ ] handle z tag (copied header fields used for diagnostic use)
- [ ] handle multiple dns records