With apologies for waking up this old topic, I have a metoo situation. I recently moved my personal email from gmail to a self-hosted email setup, and am now bumping up against the same issue as the OP here. I can send email from gmail into my discourse site, but I cannot send email from my self-hosted mail server. Instead I get a bounce and the same error as the OP appears in my mail receiver log.
I expected a certain amount of trouble with self hosting email (email is hard!) but wanted to give it a shot anyway. It’s been a couple months now and email seems to be flowing everywhere else so far, and my mxtoolbox.com report is lighting up all green for my domain and IP.
Would appreciate any pointers!
Edit: actually, realizing my error message is a bit different.
<22>Apr 3 18:14:28 policyd-spf[130]: : 550 5.7.23 Message rejected due to: SPF fail - not authorized. Please see http://www.openspf.net/Why?s=mfrom;id=user@example.org;ip=192.0.2.1;r=example-site.example.orgApr 03 18:14:28 discourse-mail-receiver-example-site postfix/smtpd[122]: NOQUEUE: reject: RCPT from unknown[192.0.2.1]: 550 5.7.23 <staff@example-site.example.org>: Recipient address rejected: Message rejected due to: SPF fail - not authorized. Please see http://www.openspf.net/Why?s=mfrom;id=user@example.org;ip=192.0.2.1;r=example-site.example.org; from=<user@example.org> to=<staff@example-site.example.org> proto=ESMTP helo=<discourse.example.org>
Apr 03 18:14:28 discourse-mail-receiver-example-site postfix/smtpd[122]: using backwards-compatible default setting smtpd_relay_before_recipient_restrictions=no to reject recipient "staff@example-site.example.org" from client "unknown[192.0.2.1]"
Apr 03 18:14:28 discourse-multisite-mail-receiver-example-site postfix/smtpd[122]: disconnect from unknown[192.0.2.1] ehlo=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=4/6
That link to http://www.openspf.net/Why?s=mfrom;id=user@example.org doesn’t work. Seems openspf.net no longer exists.