Setting Up Email: How to create a valid SPF record?

After testing my forum email, I received the Discourse boilerplate response that mentions:

Is your domain’s SPF record correct? Test your SPF record here. Note that TXT is the correct official record type for SPF.

When I tried to validate on kitterman.com, it showed

No valid SPF record found of either type TXT or type SPF.

Mail-tester.com gives me the following result:

[SPF] Your server is authorized to use bounce+28dcce.9420cbf-test-rs5jj=mail-tester.com@mg.mydomain.net
Sender Policy Framework (SPF) is an email validation system designed to prevent email spam by detecting email spoofing, a common vulnerability, by verifying sender IP addresses.
What we retained as your current SPF record is:

v=spf1 include:mailgun.org ~all

I’m not sure what I’m supposed to do next.

1 Like

Can it be possible that Your notification email is other than the domain you validated in mailgun?

E.g. mailgun validated domain is mg.example.com and you’re using notification email that is noreply@discuss.example.com?

If that’s the case, It is probably what is causing the issue. Try changing notification email to noreply@mg.example.com

2 Likes

That did it! Thank you!

2 Likes