Master Exchange 2007

powershell, automation & more…

Archive for February, 2010

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



Posted in AntiSpam, Transport | Leave a Comment »

Change port used by Exchange 2007 or 2010 send connector when using smarthost

Posted by shauncroucher on February 16, 2010

A lot of people are having trouble finding where they can change the port used to send outbound mail to their smarthost provider.

Some smarthost providers will only allow you to connect to ports other than port 25. Godaddy are a good example of this, where the relay service they offer their customers typically  operates on port 3535

The bottom line is that you have to configure the port used by a send connector at the Exchange Managment Shell. It cannot be done using the Exchange Management Console.

It’s easy enough.

To find the ports used by all your send connectors along with the smarthost used just open the shell and type:

Get-SendConnector | ft Id*,Sm*s,po*

Now, to send the port to something different just run Set-Sendconnector. So if the connector is called “OutboundMail” and you want it to use port 3535 it would be:

Set-SendConnector “OutboundMail” -port 3535


Posted in Transport | 1 Comment »