Link to home
Start Free TrialLog in
Avatar of Fr. Vandecan
Fr. VandecanFlag for Belgium

asked on

How to restrict receipient emails in Exchange Server. (I want to exclude some recipient (not in the domain) to receive emails by blocking them at the server level

I would like to restrict some emails address from receiving emails. The purpose is linked to GDPR.
Ex : I (personally do not want to receive a email from a company (lets say CORP.COM))

so as CORP.COM I want to restrict the send of email to my personal address.

- Exchange 2016
- PowerShell based
- Should be a transport rule I guess, but witch one?

Many tks !
Avatar of Fethi ABASSI
Fethi ABASSI
Flag of Tunisia image

Set-RecipientFilterConfig –BlockedRecipients "user@contoso.com"
If you're sure you want to do this at the server level, you can create a Transport Rule:

Conditions:  sent to people
(After adding this condition, click the link at the bottom of the window to select specific people (recipient emails) that this rule will apply to)
   AND
Conditions:  when the From address contains specific words  (or use 'when the From address matches text patterns' if that's more relevant)
(After adding this condition, click the link at the bottom of the window to add the specific domain you are looking to block)


Action: Delete the message without notifying anyone
    OR
Action: Send rejection message to sender

The Transport Rule can be highly targeted in that it can be programmed to only affect certain recipients.

When checking for specific words, you can use phrases and also regular expressions.
Here is a link with some examples:
https://docs.microsoft.com/en-us/office365/SecurityCompliance/use-transport-rules-to-configure-bulk-email-filtering
Avatar of Fr. Vandecan

ASKER

Tks for your answer.

"Set-RecipientFilterConfig –BlockedRecipients "user@contoso.com" "

-BlockedRecipients
The BlockedRecipients parameter specifies one or more SMTP addresses. To enter multiple SMTP addresses, separate the addresses by using a comma. The maximum number of individual SMTP addresses that you can input is 800.

We could have more... :(
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.