block emails based on headers

eg1995 1,146 Reputation points
2023-02-14T13:38:32.2333333+00:00

hi team,

i have below requirements for exchange online and need your advise:

  • block emails from specific countries: I found that it can be done in the anti spam policies
  • Block selective emails from gmail.com. I wasn't able to find that, i was just bale to find that i can include gmail.com in the allow/block list but my requirement is i want to block unknown emails recieved from gmail addresses such as ads.. but allowing users personal gmail emails. Do we have this option?
  • block emails based on headers. I wasn't able to find this in the anti spam policy but i found something similar in mail flow rules. Can you advise on this one? and what is the priority between mail flow rules and inboud spam policies

thank you so much

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,578 questions
{count} votes

Accepted answer
  1. Andy David - MVP 149.2K Reputation points MVP
    2023-02-14T13:54:58.8666667+00:00

    hi there, for the last two:

    1. There is really no way to do this other than letting the EOP/Defender intelligence handle. You can tune the BCL settings perhaps to a lower value and test: https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-spam-spam-vs-bulk-about?view=o365-worldwide#how-to-tune-bulk-email
    2. Yes, use transport rules for header checks. They take priority over anti-spam rules so use carefully

    https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/create-safe-sender-lists-in-office-365?view=o365-worldwide

    User's image

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.