powershell script for pulling DL properties

Posted on 2014-04-11
Medium Priority
Last Modified: 2014-10-25
We are getting too many spams to the DL SMTP address from outside. We are using Exchange 2007.

Is there any way we can stop those ...Keep the SMTP address of the DL but stop spam from outside...

Otherwise our plan is to pull all the DL with "SMTP address" and the "owner" with "notes" field of DL. In the note field we have some alternate administrator names.

Once we have that then we will ask the owner/administrator to confirm whether they require SMTP address for the DL ? Based on their input we will remove the SMTP and only use the DL for internal e-mails.

Appreciate your help...
Question by:principiamanagement
LVL 85

Expert Comment

by:David Johnson, CD, MVP
ID: 39995641
check to make sure you are not an open relay mxtoolbox.com

What does the short form DL stand for?
LVL 12

Accepted Solution

Carlo-Giuliani earned 2000 total points
ID: 39996233
You don't need to remove the SMTP addresses.  You can configure delivery restrictions on each mailbox to "require all senders are authenticated", which will prevent external senders from using the DL.  This is actually set be default in Exchange 2010 and 2013, but not in Exchange 2007.

Set-Mailbox -Identity "DL name" -RequireSenderAuthenticationEnabled $true

Open in new window

To do it for all distribution lists:
Get-DistributionGroupMember | Set-Mailbox-RequireSenderAuthenticationEnabled $true 

Open in new window

To get a listing of status of the DLs:
Get-DistributionGroupMember | ft name,managedby,notes,RequireSenderAuthenticationEnabled

Open in new window


Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

624 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