• Stars
    star
    94
  • Rank 344,434 (Top 7 %)
  • Language
    Go
  • License
    MIT License
  • Created about 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DKIM package for golang

go-dkim

DKIM package for Golang

GoDoc

Getting started

Install

 	go get github.com/toorop/go-dkim

Warning: you need to use Go 1.4.2-master or 1.4.3 (when it will be available) see golang/go#10482 fro more info.

Sign email

import (
	dkim "github.com/toorop/go-dkim"
)

func main(){
	// email is the email to sign (byte slice)
	// privateKey the private key (pem encoded, byte slice )	
	options := dkim.NewSigOptions()
	options.PrivateKey = privateKey
	options.Domain = "mydomain.tld"
	options.Selector = "myselector"
	options.SignatureExpireIn = 3600
	options.BodyLength = 50
	options.Headers = []string{"from", "date", "mime-version", "received", "received"}
	options.AddSignatureTimestamp = true
	options.Canonicalization = "relaxed/relaxed"
	err := dkim.Sign(&email, options)
	// handle err..

	// And... that's it, 'email' is signed ! Amazing© !!!
}

Verify

import (
	dkim "github.com/toorop/go-dkim"
)

func main(){
	// email is the email to verify (byte slice)
	status, err := Verify(&email)
	// handle status, err (see godoc for status)
}

Todo

  • handle z tag (copied header fields used for diagnostic use)

More Repositories

1

tmail

Golang SMTP server
Go
313
star
2

go-bittrex

Go binding for the Bittrex crypto-currency exchange API.
Go
230
star
3

gin-logrus

gin middleware for logrus
Go
104
star
4

go-bitcoind

A Golang client library wrapping the bitcoind JSON RPC API
Go
80
star
5

ovh-cli

Command-line tool to consume OVH services
Go
71
star
6

ovh-sdk-php

OVH SDK for PHP
PHP
55
star
7

banisher

The Banisher watches your systemd journal and bans, with no delay, abusers.
Go
32
star
8

go-pusher

A golang pusher client
Go
29
star
9

HubicSwiftGateway

HubicSwiftGateway allows you to create an openStack Swift Gateway to Hubic storage
PHP
24
star
10

Phubic

PHP class to interact with Hubic Cloud Storage
PHP
20
star
11

OVHBilling

PHP script to download your OVH bills
13
star
12

runabove-cli

Command-line tool to interact with Runabove services
Go
10
star
13

gox

Painless MySQL backup (and restore)
Go
9
star
14

reganam

JavaScript
9
star
15

go-qonto

Go API client and CLI for https://qonto.eu/ banking service.
Go
8
star
16

khao

khao is a cookie switcher which have the aim of creating chaos in tracker databases
JavaScript
7
star
17

pure

HTTP proxy
Go
6
star
18

AutoTrackIR

AutoTrackIR will automatically re-enabled your Track IR if flight simulator disabled it. (bug introduce in SU7)
Go
5
star
19

govh

Golang Package to interact with OVH API
Go
4
star
20

tmail-dashboard

A web interface to manage your tmail server or cluster
Go
4
star
21

mysql-backup

A set of tool to backup, archive and restore MySql, MariaDB, Percona database
Shell
4
star
22

logrusOVH

OVH logs PAAS Hook for Logrus
Go
3
star
23

btsync-daemontools-script

daemontool script to supervise (watch & relaunch if needed) btsync daemon
3
star
24

netqmail

Raw netqmail
C
3
star
25

podkstr

A set of tools for podcasters
Go
3
star
26

form2mail

Send your form to your form2mail URL and it will be forwarded to your email. (formspree clone)
Go
2
star
27

online-cli

Online.net command line interface
Go
2
star
28

gopentsdb

Golang OpenTSDB Client
Go
2
star
29

KonKr-anti-spam-plugin-for-wordpress

A anti-spam plugin for Wordpress using the free KonKr API
PHP
2
star
30

Grunt-PHPUnit-demo

Source for Grunt & PHPUnit tutorial
PHP
2
star
31

cors-proxy

Golang reverse proxy which adds CORS headers to the proxied request.
Go
2
star
32

ProtecmailOutlookAddIn

Protecmail Addin for outlook 2013 - 2016 (work in progress)
C#
2
star
33

qmail-boosters

qmail-booster is a set of qmail binaries replacement which add functionalities to qmail
Go
2
star
34

FsBlackBox

Flight recorder for Flight Simulator 2020
2
star
35

tuto-time-series-ovh

Vous trouverez ici le code source utilisé dans le tutoriel sur le PAAS time series OVH
Go
2
star
36

flightradar

Golang SDK to fetch data from flight trackers as flightradar24
Go
2
star
37

logalert

Log and alert package for Go
Go
1
star
38

pepper

Because black boxes suck
Go
1
star
39

autotube.support

Use this repo to report bugs or to propose new feature for AutoTube
1
star
40

otp-demo

HTML
1
star
41

go-coinbase

A Go package to consume Coinbase API.
Go
1
star
42

daemontools-go-logger

Simple logger package for go services supervised by DJB deamontools
Go
1
star
43

scaleway-availability

Golang package and CLI tool to check availability of scaleaway instances
Go
1
star
44

goabove

Go package to interact with Runabove
Go
1
star
45

autotu.be

https://autotu.be website
Vue
1
star
46

pushover

pushover client library for golang (forked from github.com/thorduri/pushover)
Go
1
star
47

kinsta

Instagram API
Go
1
star
48

calc

Initiation aux modules Golang
Go
1
star
49

gotchat

A Golang chat package
Go
1
star
50

ovhlogger

pipe STDIN to OVH Logs Data Platform
Go
1
star
51

toorop.fr

https://toorop.fr
HTML
1
star
52

podstats

Collect stats about your podcasts
Go
1
star
53

tmail-ms-server

Microservices server for tmail (POC)
Go
1
star