{"id":478,"date":"2016-03-16T19:55:13","date_gmt":"2016-03-16T19:55:13","guid":{"rendered":"http:\/\/russandbecky.org\/blog\/?p=478"},"modified":"2017-01-09T02:08:30","modified_gmt":"2017-01-09T02:08:30","slug":"bluehost-dkim-getting-email-working","status":"publish","type":"post","link":"https:\/\/russandbecky.org\/blog\/2016\/03\/16\/bluehost-dkim-getting-email-working\/","title":{"rendered":"Bluehost DKIM (getting email working)"},"content":{"rendered":"<p>Yuck. In this day and age, if I&#8217;m paying someone to provide email service for me, I don&#8217;t understand why this isn&#8217;t automated. Maybe because many of my provider&#8217;s clients have multiple domains? Still, it should be automated for each domain.<\/p>\n<p>Anyway, if you&#8217;re using Bluehost as your webserver and email provider (shared hosting, ie the cheapest plan), then you need to setup your email so that Yahoo, Hotmail, Gmail, and others don&#8217;t automatically flag emails from your domain (ie anybody@russandbecky.com) as SPAM. To do this, you need to setup DKIM (DomainKeys Identified Mail).<\/p>\n<p>On the plus side, the setup is actually pretty simple:<\/p>\n<ul>\n<li>Go to <a href=\"http:\/\/dkimcore.org\/tools\/keys.html\">dkimcore.org<\/a>, and create a public\/private key pair. Just enter your domain, and press the &#8220;Generate&#8221; button. In a few moments, you&#8217;ll get a key pair. Keep this page open or saved, so you can grab the public key later.<\/li>\n<li>Go to your domain management Web GUI, for Bluehost it will be something like https:\/\/my.bluehost.com\/cgi\/dm\/zoneedit?domain=yourdomain.com<\/li>\n<li>Look for a DNS TXT record (a key value pair), with &#8220;_domainkey&#8221; as the key. In my Bluehost setup, it already had a &#8220;_domainkey&#8221; record with &#8220;o=~&#8221; as the key, so I updated it with the <strong>public<\/strong> key generated by dkimcore.org.<\/li>\n<li>dkimcore.org will spit out 3 formats for the public key. I found the easiest to use was the Tinydns Format, which had everything on one line. Just copy everything from &#8220;v=DKIM1;&#8221; to the first colon. You&#8217;ll notice that everything from that colon to the end of the line is not included in the other formats.<\/li>\n<li>Now paste this value into the GUI for changing the TXT record for &#8220;_domainkey&#8221;<\/li>\n<\/ul>\n<p>At this point you just have to wait &#8220;4 hours&#8221; (in my case only a few minutes) for the DNS records to update. dkimcore.org mentions something about attaching a token to each outgoing email, but the Bluehost support staff assured me that I didn&#8217;t have to do anything else.<\/p>\n<p>Something that is confusing to me and friends I&#8217;ve talked to is that I didn&#8217;t have to do anything with the <strong>private<\/strong> key generated by dkimcore.org. Does Bluehost get it from them behind the scenes? That would be kinda sketchy. Is it not required for the system to work? Also sketchy.<\/p>\n<p>Anyway, before I did this, when I checked the email headers to a yahoo acc\/ount I get<\/p>\n<pre>Authentication-Results: mta1247.mail.bf1.yahoo.com \u00a0from=russandbecky.org; domainkeys=neutral (no sig); \u00a0from=russandbecky.org; dkim=temperror (key retrieval failed)<\/pre>\n<p>While after the changes I get:<\/p>\n<pre>Authentication-Results: mta1444.mail.bf1.yahoo.com from=russandbecky.org; domainkeys=neutral (no sig); from=russandbecky.org; dkim=pass (ok)<\/pre>\n<p>For comparison, when sending from a gmail account to yahoo, I get:<\/p>\n<pre>Authentication-Results: mta1340.mail.ne1.yahoo.com from=gmail.com; domainkeys=neutral (no sig); from=gmail.com; dkim=pass (ok)<\/pre>\n<p>Some related links:<\/p>\n<ul>\n<li><a href=\"https:\/\/support.rackspace.com\/how-to\/create-a-dkim-txt-record\/\">Rackspace&#8217;s notes on setting up DKIM<\/a><\/li>\n<li>Fuller set of <a href=\"http:\/\/dkimcore.org\/tools\/\">tools<\/a> (including checks on DKIM records) from dkimcore.org. The &#8220;Check a published DKIM Core Key&#8221; doesn&#8217;t seem to come back with anything if it worked, and only provides info when it fails. The &#8220;Check a DKIM Core Key Record&#8221; can be used to verify what you cut and paste into the TXT record&#8217;s value.<\/li>\n<li><a href=\"http:\/\/www.appmaildev.com\/en\/dkim\/\">Checking DKIM setup of your domain with gmail or yahoo<\/a><\/li>\n<\/ul>\n<hr \/>\n<h2>2017-01-08 Update<\/h2>\n<p>I just got an email from Scott Cordon. Seems like something to try&#8230;<\/p>\n<blockquote><p>Very considerate of you to post your experiences with DKIM on your blog!<br \/>\nAppreciated; your tips page is also very good. I have used most of them<br \/>\nover the years.<br \/>\nThank you!<\/p>\n<p>I am also on Bluehost, have recently moved &#8220;up&#8221; to a VPS (lowest level)<br \/>\nbecause I can handle<br \/>\nlinux admin &#8212; have been doing for a number of years.<\/p>\n<p>Noted that you have derived a 1024-bit based key for your DKIM. That was<br \/>\nwell-supported at one time.<br \/>\nI think gmail still insists on at least that level. However, most of the<br \/>\nworld seems to be moving on to<br \/>\n2048-bit keys &#8230; and alas, they don&#8217;t fit (easily) within the protocol<br \/>\ndesignated in the DNS TXT record<br \/>\nwhich identifies you. Not even sure the libraries and MTAs can put<br \/>\ntogether the UDP packet&#8217;s 255-byte-limited<br \/>\nsubstrings for a long DKIM key. I suspect you might get it into one UDP<br \/>\npacket, but not necessarily into one string.<br \/>\nTwo separate parts to the TXT record are needed, not sure about two UDP<br \/>\npackets&#8230;<\/p>\n<p>But some people seem to be doing it&#8230; just wondered whether you ran<br \/>\ninto anyone on Bluehost who is doing it?<br \/>\nBy using 2048-bit keys, you can really lock in the power of cryptography<br \/>\nto use a key with a &#8220;chain&#8221; to validate<br \/>\nyour identity &#8212; and have a totally verifyable identity chain.<\/p>\n<p>Any ideas or ramblings welcome.<\/p>\n<p>Scott<br \/>\n(yep, if you want it done, DIY)<\/p>\n<p>&#8212;<br \/>\nScott Corcoran<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Yuck. In this day and age, if I&#8217;m paying someone to provide email service for me, I don&#8217;t understand why this isn&#8217;t automated. Maybe because many of my provider&#8217;s clients have multiple domains? Still, it should be automated for each domain. Anyway, if you&#8217;re using Bluehost as your webserver and email provider (shared hosting, ie [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[14],"tags":[],"class_list":["post-478","post","type-post","status-publish","format-standard","hentry","category-technical"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3p6ZE-7I","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/posts\/478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/comments?post=478"}],"version-history":[{"count":9,"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/posts\/478\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/posts\/478\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/media?parent=478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/categories?post=478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/russandbecky.org\/blog\/wp-json\/wp\/v2\/tags?post=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}