Can't send email to gmail. SPF check for [mydomain] does not pass with ip

I can get, but can’t send email to google mail, get error:

Mail delivery failed: returning message to sender

SPF and DKIM has

Sends a letter to another postal service (yandex), but says that there is no signature, although SSL is set, in any case, it works, letters come. Outlook also works, but goes to spam, but google…

P.S. Everything worked until the panel was upgraded to the latest version.

Is it possible that you need to set SPF for google and for ip6?

on ipv6 it is tough to handle the spam and ipv6

But I don’t have ip6, I just saw it in the message on the screen, so I asked

what is the results of the mail tester?

I contacted the support of my server provider. They said that Google’s answer points to the ip6 of their mail relay. They told me to try disabling ip6. I’ve done

inet protocols from all to ip4, and restarted postfix of course (systemctl restart postfix)

It did not help

Then googled this

  1. Add/edit the following within /etc/postfix/
    smtp_reply_filter = pcre:/etc/postfix/smtp_reply_filter
  2. Create /etc/postfix/smtp_reply_filter with the following content:
    /^5(\d\d )5(.*information. \S+ - gsmtp.*)/ 4${1}4$2
  3. Be sure to have postfix-pcre installed on your system. If not, then:
    apt-get install postfix-pcre
  4. Restart Postfix for the new config to take effect:
    services postfix restart (systemctl restart postfix)

Didn’t help either

I don’t understand why SPF and DKIM fail the test, the panel automatically generates them. There were no problems before the panel upgrade.

Google error with IP6 - IP of relay my hoster server. I’ve added, itsn’t work

Mail tester says about IP4 of relay my hoster. I’ve added, waiting for update records.

But I don’t know what to do with DKIM, why is it invalid. I found a theory about extra quotes on this forum, removed them, I’ll wait for the update and check.

My SPF records haven’t changed, 2 days have passed, the mail tester shows the old record, mxtoolbox too.

Now - v=spf1 a mx ip4:78.myserver ip4:78.relayip4 ip6:relayip6 ~all

Mail tester and mxtoolbox output old v=spf1 a mx ip4:78.myserver ~all

why are my records not changing for SPF and DKIM records?

Why does the mail tester see them as invalid if your panel generates them automatically.
Everything stopped working for me after upgrading the panel, why after the upgrade there are always bugs and errors, judging by the topics on the forum?

The provider turned off his relay. Everything is working.

Thank you all, I barely had time to answer everyone, there were so many suggestions :slight_smile:

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.