O365 Mailflow rules, validation of email address domains

spindlerm 41 Reputation points
2023-03-13T04:09:50.4566667+00:00

Hi there, I wonder if you can help? I want to validate outgoing emails from my O365 organisation such that the following rules are obeyed.

I have a defined set of valid email recipient domains e.g.

companya.com

companyb.com

companyc.com

I want to prevent emails from being sent to multiple recipient domains, e.g

joe.blogs@companya.com

john.doe@companyb.com

john.smith@companya.com

or

joe.blogs@companya.com

john.doe@companyb.com

john.smith@companyc.com

emails sent to any amount of recipients at the same domain are valid.

Can you please give me any pointers on how I might achieve this?

Microsoft Exchange Online
0 comments No comments
{count} votes

Accepted answer
  1. Aholic Liang-MSFT 13,826 Reputation points Microsoft Vendor
    2023-03-14T09:26:23.2966667+00:00

    Hi @spindlerm ,

    Can I understand that only mail is allowed to these three specified domains, but that sending will be blocked for the specified mailboxes in these domains?

    If so, you could refer to the following to set the mail flow rules:

    1.Create a mail flow rule to block messages from being sent to specified users in the domain.

    2023-3-14-3

    2.Create a new mail flow rule that allows delivery to the specified domain.

    2023-3-14-4

    (Kindly note: Note the priority of the rule!)

    Moreover, if the above is not your scenario or I have misunderstood anything, please correct me . Your patience and cooperation are highly appreciated.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bharat Mishra 0 Reputation points
    2023-03-14T09:49:32.3566667+00:00

    you can validate outgoing emails from O365 organization through Message tracking, or message tracing, it is one of the most basic tools used by administrators to monitor the email flow.

    you can add sender and recipient address into below command and with Date too you can get validate it,

    • Sender and Recipient
    • Send and receive dates

    Get-MessageTrace -RecipientAddress <user’s address> -StartDate 11/02/2023 -EndDate 11/13/2023 | Format-list -Property Received,SenderAddress,Status,MessageTraceId

    User's image

    similarly you can validate email in GUI mode as well,

    User's image

    as stated by @spindlerm you can block any email with specific domain or address with email Rule in office 365.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments