If you want to exclude specific domains from scanned by spam filtering, you can add a rule under mail flow with the EAC in Exchange Online as follows.

Use the EAC to create a mail flow rule that sets the SCL of a message
https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/use-mail-flow-rules-to-set-the-spam-confidence-level-scl-in-messages?view=o365-worldwide#use-the-eac-to-create-a-mail-flow-rule-that-sets-the-scl-of-a-message

Be very careful about allowing messages to skip spam filtering. Attackers can use this vulnerability to send phishing and other malicious messages into your organization. The mail flow rules requires more than just the sender’s email address or domain. For more information, see Create safe sender lists in EOP.





Mark specific messages with an SCL before they’re even scanned by spam filtering. 
Use mail flow rules to set the spam confidence level (SCL) in messages in EOP.




To block sender domains have a look at the following post.

Update Mai 2026
The former “bypass spam filtering” option is no longer exposed in current Exchange Online. The modern approach is to create a mail flow rule and set SCL = -1 for the specific sender or IP to achieve the same effect.






Links

Use mail flow rules to set the spam confidence level (SCL) in messages in EOP
https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/use-mail-flow-rules-to-set-the-spam-confidence-level-scl-in-messages

Create safe sender lists in EOP
https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/create-safe-sender-lists-in-office-365