Exchange 2019 Outgoing mail to gmail failure due to SPF record error

JOE TAM 121 Reputation points
2025-05-29T02:37:10.91+00:00

Dear Sir,

 Customer has an Exchange 2019 organization with 2 Exchange servers (Server name: Ex1 & Ex2) in 1 organization. Email has only 1 domain: domain1.com. 

They encountered an SPF return error message when the send out email outgoing from ex2 server only to Gmail. It is fine when the outgoing email to Gmail is from ex1.

Current server setting is:

Server EX1 IP: 1.2.3.4

Server EX2 IP: 5.6.7.8

In nslookup:

Set type=mx

domain1.com

MX: record:

domain1.com MX Preference=0, mail exchanger=mail.domain1.com

domain2.com MX preference=20, mail exchanger=mail2.domain1.com

mail.domain1.com internet address=1.2.3.4

mail2.domain1.com internet address=5.6.7.8

set type=ptr

1.2.3.4

Server: 8.8.8.8

Address: 8.8.8.8

Non-authoritative answer:

4.3.2.1.in-addr.arpa name = mail.domain1.com

5.6.7.8

Non-authoritative answer:

8.7.6.5.in-addr.arpa name = mail.domain1.com

set type=txt

domain1.com

Server: 8.8.8.8

Address: 8.8.8.8

Non-authoritative answer:

domain1.com text =

    "v=spf1 a mx a:mail.domain1.com a:mail2.domain1.com ip4:1.2.3.4 ip4:5.6.7.8 include:azurance.com ~all

===============================================================

May I know the SPF record failure due to the PTR record of 5.6.7.8 ? It should be pointing to mail2.domain1.com ? Please suggest.

Joe Tam

Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
583 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.