I’ve generated private key and public key using following commands.
openssl genrsa -des3 -out server.key
openssl rsa -in server.key -out server.key.insecuremv server.key server.key.secure
mv server.key.insecure server.keyopenssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
it shows error message while verifying for DKIM that public key(server.crt) should not be longer than 512 character.
Answer
SPF doesn’t use certificates, so you have misunderstood mechanisms used by SPF to stop the use of forged “from” addresses.
SPF is based on set a DNS TXT record in which you specify simple policies of what hosts can send mails using your domain name like this:
v=spf1 mx a:pluto.example.net include:aspmx.googlemail.com -all
You are probably confused with DKIM.
Attribution
Source : Link , Question Author : jay thaker , Answer Author : JorSol