Forum emails go to spam in Gmail

jaredt posted 11 months ago in General


Just wanted to let you that it seems all the forum emails (activation, forgotten password) go to spam in Gmail.

Google links to a page on email authentication (can't post the link, sorry), so it looks like setting an SPF record should solve it.

Here's some basic info on how to do it (forgive me if this is obvious to you!):

Update DNS > Add new record:

  • Type: TXT
  • Hostname: (some DNS providers will ask you to put '@' instead for the root domain)
  • Value: v=spf1 ip:{ip-where-emails-are-sent-from} ~all (eg. v=spf1 ip4: ~all) (this sets the IP as a permitted sender for the domain)

Hope that helps!



1 attachment(s):
  • heidisql-registration-email
ansgar posted 11 months ago

Thanks a lot for the comprehensive hint! I did not work on GMail for quite some time now.

I just have created a TXT record, while I was unsure whether to use or as hostname. I decided for the latter one, as you also wrote so.

Probably you can verify it's working when you see the notification mail in GMail?

jaredt posted 11 months ago

Hi Ansgar,

You were correct to use (without www.) as the hostname.

Have just checked and I can see the SPF record but it looks like the syntax isn't quite right (my fault as the original value I gave you had a typo, sorry). The full value should be:

v=spf1 ip4: ~all

Note the '4' in 'ip4' and the '~all' at the end.

FYI, the '~all' means "allow the ip before to send emails for this domain and SoftFail everything else". Technically you could use '-all' instead which is stricter (it would deny any other server from sending emails using the domain, but this also means if you ever used another server to send email it would get blocked. I'd recommend '~all' if you don't want to think about it :)

ansgar posted 11 months ago

Just fixed that in the nameserver settings. Would be nice if you could do a re-check :)

jaredt posted 11 months ago

Hi Ansgar, SPF syntax is correct now. However, it looks like your emails are sent from multiple IPs so not all are being validated (side note: why are things never simple..? :D)

I've just taken a look at www hosteurope de faq domains verwaltung spf (slashes between each after 'de') and they recommend the following so that all IPs your emails will send from are covered:

v=spf1 a mx ip4: ip4: ip4: ip6:2a01:488:42::/48 ~all

Hopefully this should be the final fix!

ansgar posted 11 months ago

I just updated the nameserver record. The different IP address is probably due to HostEuropes own mail servers.

jaredt posted 11 months ago

Success! SPF validation is passing and emails are going straight to the inbox, not spam.

Enjoy the rest of your weekend.

1 attachment(s):
  • heidisql-email-spf
ansgar posted 11 months ago

Thanks a lot for your help!

Please login to leave a reply, or register at first.