How to configure DKIM for sending email from my domain


I have recently been spammed and as result the domain has been effected and now all emails sent to gmail,yahoo,hotmail and aol users end up in users spam folder.

In an effort to fix the issue, i have setup private name servers, which point to the vps (and also because, cpanel required the server to be an authorative nameserver for domain). After setting up the name server, i am no longer getting any error messages in cpanel for email authentication.

I then also setup a DMARC dns record for the domain. However, it appears that when sending mail via smtp on the server, there are issues with the DKIM signature. I am getting reports from Yahoo, whom are sending a report with errors (i think for which i cannot make head or tail of).

So my quetsion is what am i doing wroing? Is there another step i need to do? why are the emails sent via smtp from the server not being signed with a valid signature?

I look forward to your replies.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason CrawfordTransport NinjaCommented:
Was DKIM ever working properly?  Try testing it with MX Toolbox:

Is outbound email routed through a smarthost?  If you just need a quick bandaid you could remove the DKIM piece from the equation and just use SPF.
X-quisiteAuthor Commented:

I just tested on the tool and it appears that the DKIM is valid.

the selector is default and your is

Also emails are still going to users junk folder
Jason CrawfordTransport NinjaCommented:
The fact email is still being flagged as spam may just indicate you're still on an internal Yahoo list.  If the DKIM and DMARC configs are valid you're only option at this point is to work directly with Yahoo and request they remove whatever rule is tied to your domain.  Nine times out of ten providers like Yahoo will take you off the list if you write an email to support and describes what steps have been taken to rectify the situation.

Review this article specifically as it relates to Yahoo and you should be good:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.