move all email to the Junk folder in office 365

our current email infrastructure details are described  below..

We have a on premise Linux based mail server with " " smtp address. and  exchange on-line  (office 365) users with same smtp address (simple domain sharing for SMTP address ) .

Mx record are pointed to our local email gateway  and this mail gateway also mange mail flow . i.e.. one mail came from outside to our email gateway ,then email gateway are verifying  the destination email address is on premises or office 365 . after verifying deliver to  destination address

our problem is when sending to a mail from outside domain like gmail ,yahoo and etc.. to office 365 user mails are moved to junk folder ..what are the possible reason for this....

Design Diagram
Who is Participating?

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

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.

Vasil Michev (MVP)Commented:
Have you added *both* O365 and the local servers to the SPF record? It should look something like this:

v=spf1 ip4: -all

Open in new window

Mai Ali (MVP)Senior Infrastructure ConsultantCommented:
you need to check EOP content filter on office 365 and Try to add sender to Allow as following:

At the top of the page, select Settings Settings: update your profile, install software and connect it to the cloud > Options, and then select one of the following:

    Block or Allow


    Mail > Accounts > Block or allow

To add an entry to Safe senders and recipients, enter the email address or domain that you want to mark as safe in the Enter a sender or domain here text box, and then press Enter or select the plus icon new next to the text box.

    For example, to mark all email from addresses that end in as safe, enter in the text box.

    To mark a particular person as safe, enter that person's full email address. For example, to mark all messages from as safe, enter in the text box.

Select Save to save your changes.
harisaboobakerAuthor Commented:
we already add above mentioned SPF record in our Public DNS Server
harisaboobakerAuthor Commented:
we already get solution from Microsoft side

The process to avoid same domain send emails that go to junk mail.

1.    Please go to EAC, and create a new rule.

2.    Select the sender is the domain, and add your own domain.

3.    Select the action, and chose the SCL is bypass.

Thanks all.. for your valuable comments

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
harisaboobakerAuthor Commented:
We already get solution from Microsoft Side
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
Office 365

From novice to tech pro — start learning today.