0
votes

I have a messaging system on my app where users can send messages directly to other users straight from my domain (not going through Mailchimp's Mandrill templates or Google Apps). I also have cron jobs that sends users' statistics to about 5,300 users every week. Again, the script sends messages straight from my domain.

Most e-mails are going to users' spam box, which I need to fix as soon as possible. I recently found out an app that tests e-mail deliverability and gives scores based on how well configured your email server is (among other things). This is the URL https://www.mail-tester.com. I was able to fix several things and my score went up from -0.2/10 to 7.7/10. However, although the tester says my e-mail is "good stuff", I know hundreds of emails are either not being delivered (returned because sender is not trusted) or going straight into the spam box.

The last thing I need to fix to have an almost perfect score is to add a DKIM signature to the emails. Hopefully that will increase deliverability rates. This is the message the email tester gives me about DKIM: "Your message is not signed with DKIM. DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message."

I did try to work this issue out with my server (BlueHost) but they were not able to help me (they helped me with other issues though).

Does anybody know how to add a DKIM signature to emails that come from the domain itself. Is there a command line that does that?

Thank you!

P.S. App is written in PHP

1

1 Answers

0
votes

DKIM authentication consists of two parts - public key and private key. First you need to generate the keys and you can google for generate DKIM and choose which tool you want. Here is one for example https://www.port25.com/support/domainkeysdkim-wizard/ And there are two places you have to put everything in. Public key is something that you add in your domain DNS according to instructions you get from DKIM tool.
Another part is the email signing itself and here it can be either your mailing software - php in your case when you create your email you have to instruct your php code to sign email with your private key, or it can be your mailing agent (smtp) software that can have functions to sign email.
There are two alternatives on which domain you should sign - you can either sign you send from address domain or you can sign domain of your smtp. Depends on which parts of your system you can reach and apply changes. The domain you choose to sign must be the same domain you adding public key DKIM DNS record for.