Class | Description |
---|---|
DKIMSigner |
This class is used as a
Sendmail filter to sign the mail with a private key.Here is an example of how you can generate the keys: private key generation: openssl genrsa -out rsa.private 1024 extract public key: openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM convert private key to PKCS8 (to load in Java): openssl pkcs8 -topk8 -nocrypt -in rsa.private -inform PEM -out rsa.private.der -outform DER publish the contents of the public key in DNS by adding the following entries to your domain: _domainkey IN TXT "t=y; o=-;" dkim._domainkey IN TXT "k=rsa; t=y; h=sha256; v=DKIM1; p=[contents of rsa.public, only between BEGIN and END, on a single line]" once the testing phase is complete, remove "t=y" from the above, to signal the recipients that you are serious about using this method of verification And then the code is simple:
|