Solved

exchange recipient policies

Posted on 2014-04-25
1
180 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now