Showing posts with label Exchange 2007. Show all posts
Showing posts with label Exchange 2007. Show all posts

Thursday, September 29, 2011

How To Block Users From Sending Emails Outside Your Organization In Exchange 2007

A question that comes up many times in forums is how to block users from sending emails outside the organization in Exchange 2007. Though the process is simple, I though I will blog it & make it easier for me to answer those questions in the forum by providing the link!
If you have many users or say a department that you want to block from sending emails outside, you can create a transport rule in Exchange 2007. In order to create a rule that blocks people from mailing outside, follow the steps.
  • Create a distribution group, say “No Outbound Emails” and add all users whom you want to block into it.
  • Navigate to Organization Configuration -> Hub Transport -> Transport Rules.
  • Click the “New Transport Rule” from the actions pane.
  • The wizard starts, give a sensible name.
  • Select “from a member of distribution list”, click on distribution list and select the group that we have created before.
  • Select “send to users inside or outside the organization”, click on Inside & change it to Outside.
  • Click Next
  • Select “send bounce message to sender with enhanced status code”.
  • You can change the default message “Delivery Not Authorized, Message Refused” to something more meaningful.
  • Click Next.
  • Click Next again.
  • A summary will be displayed, click New & Finish.
TR1
The rule will be active straightaway. If you want to block more users in the future, just add them to the group that we had created in step 1.
What if you want to block receiving external emails?
With the above method, users in that group will note be able to receive emails, as all groups in Exchange 2007 are protected by default. All groups have “Require that all senders are authenticated” option enabled by default. It’s in group properties -> mail flow settings -> message delivery restrictions -> properties.
TR2
You have to enable this option on the user properties if you want to block one user (may be few) from receiving emails from outside.

Configuring External Postmaster Address In Exchange 2007

The external postmaster address is used as the sender for system generated messages that are sent to users outside the organization. All domains which are not in the accepted domain’s list are treated as external domains. By default, the External Postmaster address is set to $null. Though it is set to $null, the behaviour is different. It doesn’t mean that there is no email address at all. The transport servers use Postmaster@defaultaccepteddomain as the external postmaster address if it is not explicitly set by the administrator.
This will work fine for organizations that have their default domain as their external domain name (externaldomain.com rather the AD domain.local). But, if you have your AD domain as your default accepted domain, you need to change the postmaster address to an external routable address. As per RFC standards, all domains should have a postmaster address configured and should be able to receive emails that come to that address. Hence you either need a mailbox for the postmaster or add the email address to an existing account.
Running Get-TransportServer gives you the current status of external postmaster address.
1
Set-TransportServer cmdlet have to be used to set the external postmaster address. Run
Set-TransportServer –identity “transportservername” –ExternalPostmasterAddress “emailaddress” This command will only set the postmaster address on the transport server specified.
2
If you want to set the address on all hub transport servers, run
Get-TransportServer | Set-TransportServer –ExternalPostmasterAddress “emailaddress”
3
If you have edge transport servers in your environment, the postmaster address has to be set on a per server basis using the Set-TransportServer cmdlet (you can’t pipe).