Quantcast
Channel: Exchange Server 2013 - Mail Flow and Secure Messaging forum
Viewing all articles
Browse latest Browse all 3660

Add information to a Transport rule from CSV

$
0
0

I have a transport rule that will block internal employees from emailing certain external email address' and send a notification that the message was blocked from going out. That's working fine but I will need to add the external email address' from an ever growing list that will be automatically generated on a day to day basis. I am looking for a way to automate the addition of the email address' to the transport rule. I tried using  the following but it applied the change to all outgoing email, internal and external so all email sent was being blocked.

$address = import-csv C:\address.txt

Set-TransportRule "CASL Test" -SentTo $address

The address.txt file mentioned above only had 2 email address' in it but the production list will have hundreds or even thousands of address to prevent mail flow to.  

This is in preparation of a new Canadian law coming up on July 1st regarding spam and opting in and out of receiving commercial email for products and/or services (basically anything sales related).

Any assistance in this is highly appreciated. 


Viewing all articles
Browse latest Browse all 3660

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>