On Premis server rejecting emails because emails relayed through Office 365

When Office 365 relays email to my On Premise server, the On Premise server rejects some email as spam, because the Office 365 server is not in the SPF record of the external organization that sent the record.

Background Info:
The organization I work for is about to move to Office 365 from our Exchange 2010 On Premise service. I am also moving mailboxes from one Exchange 2010 server to another as the previous server is currently running on is Server 2008R2 and on old hardware we want to retire. Because of this I have 2 Exchange 2010 servers with mailboxes split between the two as I move. All email originating from outside the organization's network comes through an Exchange 2010 Edge server.
All mail to and from external addresses goes through Office 365.

I need to know how to set up the connectors on my On Premise servers so that my On Premise server will only accept email from Office 365, so that I can turn of the spam filter that is rejecting valid emails.

Thanks.
LVL 2
byt3Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

byt3Author Commented:
I haven't setup Hybrid configuration yet and it just occurred to me that may fix the problem. Something to try on Monday.
0
timgreen7077Exchange EngineerCommented:
you can just whitelist the sending domain so that your server dont reject it.
0
timgreen7077Exchange EngineerCommented:
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

MaheshArchitectCommented:
When Office 365 relays email to my On Premise server, the On Premise server rejects some email as spam, because the Office 365 server is not in the SPF record of the external organization that sent the record.

This is not clear, where the spf record comes in picture or u r saying that external org don't have spf?

All you need is
Your mx need to point to O365, then only O365can take care of rest
Since your mailboxes remains onpremise, you should change O365 domain to "internal relay" from authoritative
Also setup one simple smtp connector from o365 to Onpremise network
Then when O365 receive email, 1st it will check if it have mailbox, if not forward it to On-Premise exchange through smtp connector
Also in order to Onpremise exchange to accept emails from O365, you must add O365 EOP ips to On-Premise default server receive connector

Now for outgoing mail flow, use on premise exchange to send email to external world

Optionally,
You could have email users (mail enabled users) with O365 synced through directory sync tool if you also want to move mailboxes to O365 through hybrid setup
Setup hybrid and it will take care of everything
Point your mx to O365
Finally you need to modify ur existing spf record to include o365 spf host
0
byt3Author Commented:
My MX records point to office 365 and office 365 relays the messages to my on premise server.

Let's say contoso.com emails my organization of example.com. First the message from contoso goes to Office 365, then office 365 relays the message to my on premise server. My on premise server checks contoso.com's SPF record and doesn't find the IP or server name of Office 365 (the server that my on premise exchange received the email from), so my on premise server rejects it as spam.

I hope that clears it up.

Thanks for the suggestions and links. I will check them out on Monday.
0
MaheshArchitectCommented:
Thanks for explanation
But spf is not issue, ur onpremise exchange server will look for O365 spf and not contoso.com spf, as long as you have set O365 domain (example.com) as internal relay and have included O365 SPF wirh example.com existing SPF record, SPF cannot be an issue
Also As i stated earlier,
In order to Onpremise exchange to accept emails from O365, you must add O365 EOP ips to On-Premise default server receive connector
U can google for for ip list

did you done these two things?
0
MaheshArchitectCommented:
Infact you only need to add O365 eop ips with On-Premise default receive connector
O365 will check contoso.com spf and tjhen internally relay messages to On-Premise exchange as long as o365 domain (example.com) is set to internal relay
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
byt3Author Commented:
I have not added the EOP addresses to the recieve connector. I will Google for the list and add them.
0
MaheshArchitectCommented:
You must need to create new receive connector onpremise for this instead of modifying default receive connector
0
byt3Author Commented:
I Googled the Office 365 IP list (here)

I added these IP ranges to the IPAllowList, but I haven't heard back about emails continuing to bounce yet.
0
MaheshArchitectCommented:
0
byt3Author Commented:
I didn't actually use the property to restrict by IP ranges and instead I added the IPs to the IPAllowList in the Content Filtering, which did the trick.

Though I will probably eventually add them to the restricted IP ranges.


Thank you for the help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.