Solved

exchange recipient policies

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange 2010 error RBAC 3 15
Windows IPv6 DHCP server 8 32
exchange 2013 4 40
knowing when local account expires (Windows Server OS-DOS) 5 30
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
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 locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

948 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

21 Experts available now in Live!

Get 1:1 Help Now