Vagabond/gen_smtp — pull request #49 by seriyps (2013-12-05 01:49:03+00:00)
Title: Dkim signing for outgoing emails

Actualy, added support for DKIM signing in mimemail module.

This patch also include not-yet-merged part from issue #36 (permissive headers parser), but it may be merged separately, from my master branch.

Tests included, as well as documentation (in README).

I have this code in production server for about 2 days (2 days with simple canonicalization and ~2 hrs with just implemented relaxed canonicalization algorithms) with 0 problems: google and other mail services accept this signature:
```
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of from@dropmail.me designates 178.132.203.233 as permitted sender) smtp.mail=from@dropmail.me;
dkim=pass header.i=@dropmail.me
DKIM-Signature: s=dkim-1;
h=from:to:subject:date;
d=dropmail.me;
c=relaxed/simple;
bh=MT4vVVSfMe5EiYhAAMxVct2CWoLsljxiRtRzKYgC4tk=;
a=rsa-sha256;
v=1;
b=Nz7w+VT0aRWhKp7vYWUevnc6onP94RKq0bYR6iFl3kA2bsA3sb5e08ZCF7rL0nFHXJWyKx93mczw2t19P/gQV+QRtFjZK/RNBN408hqFN9AQ3G1kIAF7MGS4c/t+uNPWxTyoB9kihlbrcgTZMYmKZ6Qbm/cbUWS8A/N/ETIAEik=
```

P.S.: this DKIM stuff may be implemented in separate module, because it uses only few functions from `mimemail`, so, this is a subject for discussion.