Security Policy Errors

Should Exchange Hybrid Add Its Public IP to SPF?

Adam DavisAdam Davis Nov 13, 2026 869 views

Question details

Determine whether an Exchange hybrid organization needs to include its on-premises public IP address in its SPF record.

Should an Exchange Hybrid Environment Add Its Public IP to SPF?
Product
Microsoft Exchange hybrid and Microsoft 365
Device & OS
not provided
Scenario
An organization wants to authenticate outbound email sent from its hybrid Exchange environment.
Observed behavior
The organization needs an SPF record that authorizes the services and IP addresses that send mail directly to recipients for the relevant domain.
Before you start

Identify the public IP addresses and services that deliver outbound mail directly to recipients, including any third-party senders. Check the existing DNS TXT records for the domain used in the email envelope sender.

Solution 1Recommended

Authorize only the outbound senders used by your Exchange hybrid domain

Use the actual outbound mail route to decide whether the on-premises public IP belongs in the domain's SPF record.

Add the on-premises public IP if mail for the domain is delivered directly to recipient servers from that IP. If all mail goes through Microsoft 365 or another authorized relay, the local IP is not needed for SPF, even if the mail originated on an on-premises server.

SPF checks the connecting sender IP against the envelope sender domain's policy. Omitting an IP that sends directly can cause SPF to fail, potentially affecting message acceptance or delivery.

1
Trace outbound mail

In the Exchange admin center, review mail flow and connectors, then inspect message headers or message traces to determine which service or public IP delivers mail to external recipients.

2
Find the existing SPF record

Open your DNS host's management panel and look for a TXT record beginning with v=spf1 for the relevant domain. Alternatively, run nslookup -type=txt example.com and inspect the results.

3
Update the SPF policy

Edit the existing SPF TXT record at your DNS host. For example, a domain using Microsoft 365 and a direct on-premises sender might use "v=spf1 ip4:203.0.113.10 include:spf.protection.outlook.com ~all". Replace the example IP and include any other authorized senders; omit the ip4 mechanism if the local IP does not send directly.

4
Check the published record

Save the DNS change, then query the domain's TXT records again with nslookup -type=txt example.com. Confirm that only one TXT record for that domain starts with v=spf1, and send a test message to check its authentication results.

Authorize only the outbound senders used by your Exchange hybrid domain
Keep one SPF record per domain: Combine all authorized senders in one SPF record rather than publishing multiple v=spf1 records. SPF also has a limit of 10 DNS-lookup-triggering terms, so check complex policies for lookup-limit errors.
Free Microsoft Office alternative

Work with Exchange Planning Documents in WPS Office

WPS Office is a free, lightweight alternative for working with office documents. Its familiar interface and Microsoft Office format compatibility help teams migrate existing files, though it does not configure Exchange or DNS records.

Document outbound mail routes and SPF changes in spreadsheets or documentsOpen and edit Microsoft Word and Excel formats, including DOCX and XLSXUse a familiar interface for everyday document and spreadsheet tasksMove existing Office files into a lightweight, free office suite
QA img-9

Frequently Asked Questions

Is the on-premises public IP mandatory in an Exchange hybrid SPF record?

No. Add it only if it sends mail directly to recipient servers for the domain. If outbound mail is delivered through Microsoft 365 or another authorized relay, authorize that service instead.

What happens if I leave out an IP that sends mail directly?

Messages sent from the omitted IP may fail SPF. Depending on the recipient's filtering and the domain's DMARC policy and alignment, those messages could be marked as spam or rejected.

Can I publish separate SPF records for Microsoft 365 and my local server?

No. Multiple v=spf1 records for the same domain can cause an SPF permanent error. Edit the existing TXT record to combine the authorized Microsoft 365 include, local IP, and any other senders.

How can I check which SPF record is published?

Run nslookup -type=txt example.com, replacing example.com with the relevant envelope sender domain. Look for the TXT record beginning with v=spf1 and confirm that it lists the intended senders.

Does passing SPF guarantee that email will be delivered?

No. Recipients may also evaluate DKIM, DMARC alignment, sender reputation, and message content. Check the Authentication-Results header on a test message for SPF and other authentication results.