Create DKIM in PowerMTA
To generate DKIM, go to
https://www.sparkpost.com/resources/tools/dkim-wizard/
On first text box, enter the domain name that you will be sending email from. For example, if i need to sent email from [email protected], i need to enter serverok.in in this text box.
In DomainKey Selector text box, enter name for your DKIM key. This can be any name, no space allowed. In below screenshot, i used “default” as key name.
Key size in bits = 2048
click “Create Key”.
Save “Private Key” it geneate in file
1 |
/etc/pmta/KEY_NAME_HERE.DOMAIN_NAME_HERE.pem |
In above example, the file name is default.serverok.in.pem
Next you need to edit DNS record for your domain name. Create a TXT record with following name
1 |
KEY_NAME_HERE._domainkey.DOMAIN_NAME_HERE |
In cause of above example, the name is default._domainkey.serverok.in
The DKIM wizard will give value for this TXT entry, use that. For some DNS providers, you don’t need to use double quote for the text value. If your provider show double quote, then you don’t need it. For v=DKIM1\; k=rsa\; the \ is not needed, remove that.
Enable DKIM Signing
To enabe DKIM signing, edit
1 |
vi /etc/pmta/config |
Add
1 |
domain-key default,serverok.in,/etc/pmta/default.serverok.in.pem |
This can be in your virtual mta setttings like
1 2 3 4 5 6 7 |
<virtual-mta vmta-1> #domain-key default,*,/etc/pmta/default.serverok.in.pem domain-key default,serverok.in,/etc/pmta/default.serverok.in.pem <domain *> max-msg-rate 100/h </domain> </virtual-mta> |
See PowerMTA