Solved

exchange recipient policies

Posted on 2014-04-25
1
191 Views
Last Modified: 2014-05-07
Hi there, i have a cluster of users i need to do policies on in exchange. the scenario

After 5 o clock, this cluster of users i do not want to be able to receive mail from anyone except a select few employees. Then at 7 o clock the next morning they can begin receiving mail from everyone again.
0
Comment
Question by:mrbayIt
1 Comment
 
LVL 37

Accepted Solution

by:
Jamie McKillop earned 500 total points
ID: 40027181
Hello,

First, create two distribution groups; one for the users you want to set the restrictions on ("Restricted Users") and one for the users you want to be able to send to these users after 5 ("Allowed Senders").

The second step is to create a transport rule. You would use the following syntax:

New-TransportRule "Block Messages After 5" -SentToMemberOf "Restricted Users" -RejectMessageEnhancedStatusCode "5.7.1" -RejectMessageReason "This user is not permitted to receive email messages between 5PM and 7AM" -ExceptifFromMemberOf "Allowed Senders"

Run the following command to disable the rule:

Disable-TransportRule "Block Messages After 5"

Now, create two .ps1 files on your server. The first will be called "EnableTR.ps1" and the content will be:

Enable-TransportRule "Block Messages After 5"

The second one will be called "DisableTR.ps1" and the content will be"

Disable-TransportRule "BlockMessages After 5"

Now, create two batch files. The first will be called "EnableTR.bat" and the content will be:

powershell -command "& 'c:\EnableTR.ps1' "

The second one will be called "EnableTR.ps1" and the content will be:

powershell -command "& 'c:\DisableTR.ps1' "

Now, in Task Scheduler, schedule EnableTR.bat to run at 5PM and schedule DisableTR.bat to run at 7AM.

-JJ
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
Read this checklist to learn more about the 15 things you should never include in an email signature.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question