The solution to such a issues depends on 3 things
a) To setup SPF for a domain name can use tool http://www.spfwizard.net/
b) For DKIm you can use tool from Socketslab
https://www.socketlabs.com/domainkey-dkim-generation-wizard/
for DKIm you can use key name as key1 or domain1 or any random words
c) Once done you can check whether its valid or not using a vaiidator
http://dkimvalidator.com/results
For validitor you need to send email to email ID shown on screen and check once done click on show results
Where it will show if set DKIM and spf are valid or not