Lately I’ve been playing with postfix and ways to validate my mail. That’s how I reached DKIM records. Something like ssh keys (a public and private key) but for mail. Installation in Debian GNU/Linux is pretty simple via apt-get as usual, we need to install opendkim and opendkim-tools.
ii libmail-dkim-perl 0.40-1 all cryptographically identify the sender of email - perl library
ii libopendkim9 2.9.2-2+deb8u1 amd64 Library for signing and verifying DomainKeys Identified Mail signatures
ii opendkim 2.9.2-2+deb8u1 amd64 Milter implementation of DomainKeys Identified Mail
ii opendkim-tools 2.9.2-2+deb8u1 amd64 Set of command line tools for OpenDKIM
We need to open a port for opendkim (8891 in my case), we need to edit /etc/default/opendkim in order to do this as below.
SOCKET="inet:8891@localhost" # listen on loopback on port 8891