as in the title I am struggling with the creation of the dkim key. For key creation I use these commands
openssl genrsa -out s1024.private 1024
openssl rsa -in s1024.private -out s1024.public -pubout -outform PEM
In this way I got the public and private keys. After that I put the private key in /etc/dkim/ dir and I make the test about the key in this way
dkim-testkey -d
hostname-s s1024 -k /etc/dkim/s1024.private
the parameters means
- -d is related to the domain
- -s is the selector is the config file in this case is s1024
- -k is the key to match
and the result is this one
dkim-testkey: keys do not match
How is possibile? I have done the same procedure on another 60 different servers and everything was fine. And of course the other 60 servers are cloned from the same debian image. I also tried to uninstall and reinstall the dkim package but still nothing.
So any idea about why?