Master Exchange 2007

powershell, automation & more…

How to prevent self sending spam email spam from yourself to yourself?

Posted by shauncroucher on February 17, 2010

It’s irritating when you get spam that looks like is has come from you or from someone else (or fake person) in your organisation.

There is a way in Exchange 2007 / 2010 to prevent this from happening. It’s crude but somehow pleasing. I can’t take credit for this as I came across it when roaming around the forums.

Basically you can use the following command to remove a transport permissions from the anonymous logon account that all unauthenticated sessions will use during the session with Exchange.

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



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: