GUIDE: DKIM & SFP Setup - Gmail UNSPAM
GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Hello!
Earlier I searched the forum to setup DKIM & SPF to allow my server to send e-mails to gmail, hotmail and other 'mainstream' e-mail services without my e-mails appearing in the users spam folder.
After searching for a while, I thought I'd give back and describe what I did to hopefully make it easier for you guys to send e-mails from your own servers without them being filtered as spam.
For this, you'll need access to your domain's dns settings. My provider is GoDaddy.
Domain Setup:
Step 1) Head over to https://www.sparkpost.com/resources/tools/dkim-wizard
Step 2) Enter your servers domain name in the first field (Described as Domain name of the “From:” header address, not the SMTP “MAIL FROM”. (e.g., port25.com))
Step 3) Enter a selector name (we'll need this later) - I used the simple 'dkim' as selector.
Step 4) Press Create Keys at the bottom.
Step 5) Scroll down the page after the keys have been created to "Step 1"
Step 6) Copy and paste "k=rsa\; p=..." from the "Step 1"
Just before Step 1 on port25's site, there is a block which starts with "-----BEGIN RSA PRIVATE KEY-----"
Be sure to copy that, the whole thing. So your copy should start with "-----BEGIN RSA PRIVATE KEY-----" and end with "-----END RSA PRIVATE KEY-----"
Create a new file that we can reference later, I've called mine "dkim.htrcloud.co.uk" and it's extensions has to be PEM (.pem)
Step 7) Head over to DNS settings of your domain.
Step 8| Create a new TXT record, enter [SELECTOR]._domainkey into the host field. [selector] should be replaced with the selector you wrote into step 3.
Step 9) In the value field, enter "v=[SELECTOR]; t=s;" then enter the copied text from Step 6. Some Domain Servers allow non-alphanumeric characters in these fields, however godaddy doesn't. So be sure to remove the quotes and any backslashes from the copied text from Step 6.
Be sure to replace [SELECTOR] in both Step 8 & 9 with the selector you used earlier in Step 3.
Step 10) Save that record, then head over to https://www.spfwizard.net/
Step 11) This is quite self-explanatory. Firstly enter your domain into the first field called "Your Domain"
Step 12) Set the appropriate settings, my settings you can see in the images below.
Step 13) You will see above the form a block labeled "The DNS entry (copy and paste this)" - do exactly what that says, copy between the quotes "v=spf1 ..."
Step 14) Head back over to your dns settings, add another TXT field. The host name in this record should be your domain name, (for me I can use @ as this sends it to my domain anyway with GoDaddy).
Step 15) In the Value field, paste exactly what we copied in Step 13.
Step 16) Save your DNS file and all is good domain side.
hMailServer Setup:
Step 1) Open hMailServer Administrator and select your domain under "Domains"
Step 2) On the right side, select DKIM Signing.
Step 3) Check Enabled
Step 4) Enter the location of that PEM file we made earlier.
Step 5) Enter the selector we specified earlier (From Step 3)
Step 6) Header method should be relaxed
Step 7) Body method should be relaxed
Step 8| Signing algorithm should be SHA256
If you followed these steps exactly, you should be able to send e-mails to hotmail / gmail without them being filtered as spam!
Here's some reference screenshots below. Please note that some dns servers can take up to 24/48 hours to update if I remember correctly so be patient. To check these settings have worked, you can send an email to: check-auth@verifier.post25.com <-- They will send an automatic e-mail back with your e-mails full details.
See "Auth Report" below for a report example from my own e-mail server after sending a blank e-mail to check-auth.
Step 1 to Step 4 - Enter domain & selector
Step 6 - Copy public key for dns
Step 8 to Step 9 - Enter public key into dns
Step 10 to Step 13 - SPF settings
hMail Step 1 - Open and navigate to DKIM
Response from Check-Auth
Earlier I searched the forum to setup DKIM & SPF to allow my server to send e-mails to gmail, hotmail and other 'mainstream' e-mail services without my e-mails appearing in the users spam folder.
After searching for a while, I thought I'd give back and describe what I did to hopefully make it easier for you guys to send e-mails from your own servers without them being filtered as spam.
For this, you'll need access to your domain's dns settings. My provider is GoDaddy.
Domain Setup:
Step 1) Head over to https://www.sparkpost.com/resources/tools/dkim-wizard
Step 2) Enter your servers domain name in the first field (Described as Domain name of the “From:” header address, not the SMTP “MAIL FROM”. (e.g., port25.com))
Step 3) Enter a selector name (we'll need this later) - I used the simple 'dkim' as selector.
Step 4) Press Create Keys at the bottom.
Step 5) Scroll down the page after the keys have been created to "Step 1"
Step 6) Copy and paste "k=rsa\; p=..." from the "Step 1"
Just before Step 1 on port25's site, there is a block which starts with "-----BEGIN RSA PRIVATE KEY-----"
Be sure to copy that, the whole thing. So your copy should start with "-----BEGIN RSA PRIVATE KEY-----" and end with "-----END RSA PRIVATE KEY-----"
Create a new file that we can reference later, I've called mine "dkim.htrcloud.co.uk" and it's extensions has to be PEM (.pem)
Step 7) Head over to DNS settings of your domain.
Step 8| Create a new TXT record, enter [SELECTOR]._domainkey into the host field. [selector] should be replaced with the selector you wrote into step 3.
Step 9) In the value field, enter "v=[SELECTOR]; t=s;" then enter the copied text from Step 6. Some Domain Servers allow non-alphanumeric characters in these fields, however godaddy doesn't. So be sure to remove the quotes and any backslashes from the copied text from Step 6.
Be sure to replace [SELECTOR] in both Step 8 & 9 with the selector you used earlier in Step 3.
Step 10) Save that record, then head over to https://www.spfwizard.net/
Step 11) This is quite self-explanatory. Firstly enter your domain into the first field called "Your Domain"
Step 12) Set the appropriate settings, my settings you can see in the images below.
Step 13) You will see above the form a block labeled "The DNS entry (copy and paste this)" - do exactly what that says, copy between the quotes "v=spf1 ..."
Step 14) Head back over to your dns settings, add another TXT field. The host name in this record should be your domain name, (for me I can use @ as this sends it to my domain anyway with GoDaddy).
Step 15) In the Value field, paste exactly what we copied in Step 13.
Step 16) Save your DNS file and all is good domain side.
hMailServer Setup:
Step 1) Open hMailServer Administrator and select your domain under "Domains"
Step 2) On the right side, select DKIM Signing.
Step 3) Check Enabled
Step 4) Enter the location of that PEM file we made earlier.
Step 5) Enter the selector we specified earlier (From Step 3)
Step 6) Header method should be relaxed
Step 7) Body method should be relaxed
Step 8| Signing algorithm should be SHA256
If you followed these steps exactly, you should be able to send e-mails to hotmail / gmail without them being filtered as spam!
Here's some reference screenshots below. Please note that some dns servers can take up to 24/48 hours to update if I remember correctly so be patient. To check these settings have worked, you can send an email to: check-auth@verifier.post25.com <-- They will send an automatic e-mail back with your e-mails full details.
See "Auth Report" below for a report example from my own e-mail server after sending a blank e-mail to check-auth.
Step 1 to Step 4 - Enter domain & selector
Step 6 - Copy public key for dns
Step 8 to Step 9 - Enter public key into dns
Step 10 to Step 13 - SPF settings
hMail Step 1 - Open and navigate to DKIM
Response from Check-Auth
Web developer for cinema and alcohol chains across the world.
My own site can be found at https://harryrichards.co.uk
My own site can be found at https://harryrichards.co.uk
- jimimaseye
- Moderator
- Posts: 10133
- Joined: 2011-09-08 17:48
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Thanks Harry. I've moved this to the TUTORIALS section.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Thank you, I soon realized after that there was a user submitted tutorials form and felt a bit silly!
Web developer for cinema and alcohol chains across the world.
My own site can be found at https://harryrichards.co.uk
My own site can be found at https://harryrichards.co.uk
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Your check auth email is still marked as spam. I suspect you may have sent the email with a blank body and/or blank subject. Put anything in both subject and body (even just "hi") and you should not be marked as spam. This is important, I think, because if you do this and it still gets marked as spam, you should investigate further as to why because port25 will certainly not be the only one marking you as spam.
The valid response should be:
Spamassassin check: ham
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
I did notice that after I made this, but you are correct - I send the email with a blank body. I did however do another test which passed all of the criteria, but thank you for pointing that out!palinka wrote: ↑2018-03-17 15:19Your check auth email is still marked as spam. I suspect you may have sent the email with a blank body and/or blank subject. Put anything in both subject and body (even just "hi") and you should not be marked as spam. This is important, I think, because if you do this and it still gets marked as spam, you should investigate further as to why because port25 will certainly not be the only one marking you as spam.
The valid response should be:
Spamassassin check: ham
Web developer for cinema and alcohol chains across the world.
My own site can be found at https://harryrichards.co.uk
My own site can be found at https://harryrichards.co.uk
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Step 8 and 9 from instruction:
don't match the image:HarryR wrote: ↑2018-02-24 23:58Step 8| Create a new TXT record, enter [SELECTOR]._domainkey into the host field. [selector] should be replaced with the selector you wrote into step 3.
Step 9) In the value field, enter "v=[SELECTOR]; t=s;" then enter the copied text from Step 6. Some Domain Servers allow non-alphanumeric characters in these fields, however godaddy doesn't. So be sure to remove the quotes and any backslashes from the copied text from Step 6.
I think the "v" parameter in the step 9 shouldn't be set to "[SELECTOR]". Instead it should be "DKIM1".
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
This is also incorrect. The correct address is check-auth@verifier.port25.com.HarryR wrote: ↑2018-02-24 23:58To check these settings have worked, you can send an email to: check-auth@verifier.post25.com <-- They will send an automatic e-mail back with your e-mails full details.
- jimimaseye
- Moderator
- Posts: 10133
- Joined: 2011-09-08 17:48
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
If problems are encountered other setup instructions for dkim can be found here viewtopic.php?f=21&t=29402. Note the warning of using 2048 bit keys.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
-
- New user
- Posts: 1
- Joined: 2018-09-10 11:29
- Contact:
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Very precise and autonomous guide thanks you helped me alot keep it up..
- jimimaseye
- Moderator
- Posts: 10133
- Joined: 2011-09-08 17:48
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Problem with images. No longer displaying.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Linked DKIM generator tool was moved to new address:
https://www.sparkpost.com/resources/tools/dkim-wizard
https://www.sparkpost.com/resources/tools/dkim-wizard
-
- Normal user
- Posts: 154
- Joined: 2009-04-23 00:42
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Seems sparkpost is gone, it now points to https://messagebird.com/?sp=true therefore i cannot follow this tute and am having issues sending to gMail since it thinks my personal domain doesnt exist.
- jimimaseye
- Moderator
- Posts: 10133
- Joined: 2011-09-08 17:48
Re: GUIDE: DKIM & SFP Setup - Gmail UNSPAM
Use the dkim setup tutorial here:Furball Zen wrote: ↑2023-07-11 23:09Seems sparkpost is gone, it now points to https://messagebird.com/?sp=true therefore i cannot follow this tute and am having issues sending to gMail since it thinks my personal domain doesnt exist.
jimimaseye wrote: ↑2018-08-11 20:05If problems are encountered other setup instructions for dkim can be found here viewtopic.php?f=21&t=29402. Note the warning of using 2048 bit keys.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829