DKIM on DNS panel DigitalOcean

June 19, 2014 27.1k views
Hello, on "DigitalOcean - DNS - View domain.tld - Add record - TXT (Enter name, Enter record) - Create" I want to add DKIM for domain on Debian (ISPConfig, Webmin), where I can find DKIM record on server? Thank you.
4 Answers
You need to generate the DKIM key yourself. On the server, first install the nessasary packages:
sudo apt-get install opendkim opendkim-tools
Now we can generate the key using:
sudo opendkim-genkey -s mail -d
This will create two files, mail.private and mail.txt The first one is the key itself, and the second one shows the DNS TXT record that you'll use. Let's take a look at that by running:
cat mail.txt
You should now see something like:
mail._domainkey	IN	TXT	( "v=DKIM1; k=rsa; "
	  "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDblMQxNcTE0LKzE8ypsmLVJGzWT0eR08+PcGKbK/lHo5el4n6pFgQarN/ppSSVM3Hvn64mPLBqq1JWkDYf1IhfC0ZTF6rN1kgCjBg2mb854dDCcM/wUcf593GVGtxiF+nPxXl7aecA+uyQVcdy+bxvyAHaVTx+zMxbxr48miJGGwIDAQAB" )  ; ----- DKIM key mail for
The part in between the parentheses is what you'll want to paste into the DNS panel. For a full tutorial on how to integrate the DKIM key with postfix on Debian, check out:

into the DO Panel, under DNS, I add a TXT Record

  1. 1st part you could give the name you want, for me it’s DKIM
  2. 2nd part : you cut and past the string between ( ) or between “ ”; for me I cut the part between “” and i’d include them ; mail._domainkey IN TXT “v=DKIM1; k=rsa; p=AIAfAA3FSAqASIb3AQABAAUAA4GAADAAiAKAgAAkY3vvTZ0o3fcRXh8t+dtmaFnuq0sxVP6o+YN3wNin3TYq78X2mfBRH35Yt/40jTuDAnfAsAXPUxA/rAAEvO8WTBi/WIokPZNNAEYvDWTqvAVhvAnvT4ue0xa60YyYd7hI1FZ0So6x/tklQaYqndj+AmxnAfR3bZ9RzQNf73gXybwIDAQAB” ; —– DKIM key mail for

I used that to validate :

by Popute Sebastian Armin
This tutorial will focus on installing and configuring OpenDKIM: an open source implementation of the DKIM sender authentication system.

Where should I put the file mail.private?

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!