none
Prevent Send Email by Powershell command " Send-emailmessage" to Exchange Server in Our Domain RRS feed

  • Question

  • Hello 

    We have problem with Exchange Server 2016 . 

    Everybody in my organization can send Email by Command prompt  or powershell  without Authentication ! : Send-MailMessage

    i want to prevent users can send email by command . i search in web  and delete  permission ms-exch-smtp-accept-authoritative-domain-sender with 

    Get-ReceiveConnector “Default Frontend MAIL” | Get-ADPermission -user “NT AUTHORITY\Anonymous Logon” | where {$_.ExtendedRights -like “ms-exch-smtp-accept-authoritative-domain-sender”} | Remove-ADPermission

    But still my problem was not resolved!!


    Wednesday, June 19, 2019 5:53 AM

All replies

  • Hi,

    We don't suggest modify default receiver connector.

    I would suggest you take steps below to prevent user using "Send-MailMessage":

    1. Create a new receive connector:

    2. Modify "Remote Network Settings", make it only listening to your internal IP address.

    3. Have a look about it's permission group, don't check the "Anonymous Users":

    Then, reopen PowerShell, you will see, internal user cannot send email with "Send-MailMessage":

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Thursday, June 20, 2019 3:10 AM
    Moderator
  • Hi,

    I am writing here to confirm with you how thing going now?

    If the above suggestion helps, please be free to mark it as an answer for helping more people.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, June 25, 2019 1:30 AM
    Moderator