| Exchange Server 2007 Email Routing – The Exchange Management Shell |
|
|
|
|
Exchange Server 2007 also allows another management possibility – the Exchange Management Shell. Within this article we will have a look at how to configure Email routing in Exchange Server 2007 using the Powershell console. Configuring Transport Server Properties Transport Server is the server role that is responsible for message routing. To view Transport Server configuration, you just have to use the Exchange Management Shell Command “get-transportserver”, to set any new configuration “set-transportserver” is your goal:
If a send connector is trying to send emails using external DNS lookup settings, it uses the external DNS setting configured on the transport server. This external DNS setting also applies to receive connectors for anti-spam agents like Sender ID or connection filter agents.
To configure this using the command prompt, enter the following:
To configure internal settings just replace the "external" string in the expressions above with “internal” and it works. In general the cmdlet Set-TransportServer supports the following settings:
Managing Accepted Domains Accepted Domains are global settings for the Exchange organization and on Edge Servers. These settings define whether Exchange is responsible for an SMTP domain or not. It is recommended that you configure all accepted domains in these global settings and synchronize them to your Exchange Server holding the Edge Server Transport Role in the DMZ.
We sort the accepted domains into groups:
To create an accepted domain you will have to use the following commands:
To change an accepted domain type, you should use the following syntax:
To remove an accepted domain you can use the following command:
You should make sure that it is not your default, because this cannot be removed anyway. In addition to this you can configure email policies with the command shell, too.
This command changes the primary email address assigned to receipients and keeps the existing email address as secondary.
Managing Connectors A connector defines a logical connection between source and destination server. They describe how servers communicate. The default communication protocol is SMTP, all receive connectors accept only SMTP, but send connectors (e.g. to foreign email systems) accept SMTP, X.400, etc. A receive connector defines:
To create a new send connector you will have to use the following command:
In addition to this you can create a linked connector, which is a receive connector that is linked to a send connector. For linked connectors the general routing logic based on destination domain is overridden. In general, a linked connector can be used when sending messages to a 3rd party anti-spam or antivirus service for processing and then return it to Exchange for proper delivery. To configure how Exchange receives email, we will now have a look at the receive connector configuration.
If you now want to remote a receive connector, that is quite easy when working with the Exchange Server Management Shell.
When considering security settings on your connectors you will have to choose between anonymous and secure relaying. As we all know relaying means receiving and sending emails, if ever possible we should configure each Exchange Server to only allow relaying on, e.g. specific IP-Addresses. This means that your Exchange Server box is configured to send emails only to the relay server and receives only from this one.
As you can see we now have to use two commands. The first was for creating the receive connector with anonymous relay restrictions; the second one was to configure the appropriate security settings in Active Directory.
Managing Queues After having had a look at the configuration of Exchange Server and its connectors for sending and receiving messages, we will now have a look at the queue management functionalities of the Exchange Server Management Shell. If you would like to retrieve special messages within your queue, this command should help you: Get-Message –Server Servername.domain.tld –resultsize 500 –sortorder +FromAddress,-size In addition to this you can start every task known from the Exchange Management Console within your Exchange Management Shell, likewise:
|
| < Prev | Next > |
|---|


















