This plugin adds DKIM signature to all outgoing emails.
-
Generate DKIM public and private keys. You can do it for example here: https://tools.socketlabs.com/dkim/generator If running an application on a subdomain, enter subdomain.domain.tld in the domain field, otherwise enter domain.tld.
-
On your domain create TXT DNS entry with the public part of the key, for example a record with name (domain name):
dkim._domainkey.subdomain.domain.tldWhere
dkimis the selector used while generating the key in step 1.The record value is:
v=DKIM1; k=rsa; p=<public key>Check DNS with this tool: https://mxtoolbox.com/supertool3 Type the domain name and select DKIM Lookup. Domain should be in the format:
subdomain.domain.tld:selectorFor example:
example.com:dkim -
Copy the private key to some file, for example
storage/app/uploads/protected/dkim/private.key!!! This file should not be accessible from the web so we will save it to a protected directory !!!
-
Setup plugin by .env file:
Below you can see all possible variables with default values:
DKIM_ENABLED=false DKIM_PRIVATE_KEY= DKIM_DOMAIN=<config.app.url> DKIM_SELECTOR=dkim DKIM_PASSPHRASE=
For my example it is enough to set:
DKIM_ENABLED=true DKIM_PRIVATE_KEY=storage/app/uploads/protected/dkim/private.key
A domain is by default taken from config app.url. A selector is by default
dkim. A passphrase is empty by default. -
Send testing email to Gmail recipient where you find Show original in the mail detail and there you should see: DKIM PASS.
Please send Pull Request to the master branch.
Fakturoid plugin is open-sourced software licensed under the MIT license same as OctoberCMS platform.