Score:2

Set SPF to send email using Gmail

co flag

(Disclaimer: I totally suck at being a sysadmin) I am sending email for a domain using Gmail. The domain is partyboatcharters.com.au (I hope I am allowed to put domains here). Gmail is configured to send email as that. Emails sent to sales@partyboatcharters are forwarded straight away to [email protected] by the MX.

The MX is s412.syd5.hostingplatform.net.au (there is only one MX).

I can send email fine. However, sometimes (but only sometimes) emails are not getting through, with this error message (received by the SENDER):

[email protected]
host gmail-smpt-in.l.google.com [4004:6800:4003:c00::1a]
SMTP error from remote email server after end of data:

550-5.6.26 This message does not pass authentication checks [SPF and DKIM both[
550-5.6.26 SFP checl for [partyboatcharters.com.au] does not pass
550-5.6.26 with IP> [2400:b800:6::52] 

I found this document:

https://support.google.com/googlecloud/answer/10756302?hl=en

Which reads:

**Problem**
I need to set up SPF on my domain to send emails with Gmail, not receive.

**Environment**
MX (mail exchange) entry is set to `v=spf1 a mx -all` with domain host
Set up a Sender Policy Framework (SPF) record to send emails with Gmail interface

**Solution**
Sign in to the management console for your domain host.
Locate the page where you update TXT records for your domain.
Create a custom TXT record for SPF: It should look like this: v=spf1 [IP ADDRESS] include:_spf.google.com include:[DOMAIN] ~all

I tried adding this TEXT entry to the DNS:

TXT @ v=spf1 [43.250.142.8] include:_spf.google.com include:[partyboatcharters.com.au] ~all

As 43.250.142.8 is the IP address of the MX server...) However, I don't really know what I am doing here. The article seems to cover sending emails with Gmail for another domain... not receiving them.

This other article:

https://support.google.com/a/answer/10685031

Seems to imply that the SPF should be:

v=spf1 include:_spf.google.com ~all

But I am NOT using Google Workspaces (I know, I know, I should...). I am simply 1) Forwarding emails from [email protected] TO [email protected] 2) Configuring Gmail so that it sends emails from [email protected].

So, what should SPF be? What about DKIM?

diya avatar
la flag
In many cases mentioning the actual domain name is essential for the community to be able to help diagnose DNS related issues. So thank you for doing that. Please refer to [this Q&A](http://meta.serverfault.com/q/963/37681) for our recommendations with regards to how and what (not) to obfuscate in your questions.
diya avatar
la flag
The IPv6 address `[2400:b800:6::52]` that is reported is problematic is not your MX record, but resolves to se8.syd.hostingplatform.net.au which isn't included in any way in [your current SPF record](https://mxtoolbox.com/SuperTool.aspx?action=spf%3apartyboatcharters.com.au) - if that is valid host host should be allowed to send email on behalf of your domain (maybe a web- or application server running a mail script) then it should be included in your SPF record
co flag
se8.syd.hostingplatform.net.au is Zuver -- it's the provider doing the forwarding! So I should add Zuver to our SPF... how do I do that?
diya avatar
la flag
See for example this Q&A https://serverfault.com/q/369460/984089
co flag
I did but the question doesn't cover using a server as a forwarder...
co flag
Plus how did you translate that `[2400:b800:6::52]` into `se8.syd.hostingplatform.net.au`...?
diya avatar
la flag
I assume I did `dix -x 2400:b800:6::52`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.