4. Creating New Rules with the Exchange Management Console
To create a new transport rule on your Hub Transport servers using the EMC, launch the EMC. Navigate to Exchange Organization => Organization Configuration =>
Hub Transport in the left-hand pane, then select the Transport Rules
tab in the middle pane. Click the New Transport Rule task in the pane
on the right to start the New Transport Rule wizard.
Figure 4
shows the Introduction screen of the wizard. Here you provide the name
and optional description of the new rule, as well as select whether the
rule will be enabled once it is created. The Name field is required. We
recommend using the Comment field liberally—otherwise, after you have
50 transport rules you will begin to lose track of what each one does
without digging through the rule itself. Click Next to continue once
you have configured a name and comment.
Figure 2
(shown previously) shows the Conditions page of the wizard. The default
condition is Apply Rule To Messages (there is no check box for this),
which will match all messages. If you want to narrow down which
messages will be affected, select the check boxes of one or more
conditions; they will be added to the lower text field.
To fill in the values of the conditions, click the
underlined blue text fields and select the results from the selection
dialog boxes that are opened. Once you are satisfied with the
selections, click OK to close the selection dialogs. Click Next to
continue.
Figure 3
(also shown previously) shows the Actions page of the Edit Transport
Rule wizard. There are no default actions. Select the check boxes of
one or more actions; they will be added to the lower text field.
Figure 5
shows the Exceptions screen; essentially this is the same set of
conditions that you find on the Conditions page. Unlike the Conditions
page, though, there are no default exceptions. Exceptions allow you to
specify the conditions under which the transport rule will not
apply. If you want to create an exception, select the check boxes of
one or more exceptions; they will be added to the lower text field.
Figure 6
shows the Create Rule screen. This screen gives you a summary of the
rule that will be created. In this figure, you can see a rule we have
created that applies a disclaimer to all messages received that have an
X-header value of SPAM. The transport rule states that the messages
must have a disclaimer added except if the message is from the email
address [email protected] or if the sender's address contains the string "CEO".
Transport rules are always fun to describe to
customers, since they have a familiar point of reference. We simply
tell them that they are similar in experience to what they create with
the Outlook Rules wizard, except that these rules have many more
available settings and run completely server-side.
One of the things that we often run into, when we start diving a bit deeper, is the ability to get creative
around transport rules. Specifically, we had a customer who needed to
define a disclaimer based on the user's department. This customer ran
Exchange Server 2007 on all Hub Transport servers and had not yet
upgraded to Exchange Server 2010. So for users in the legal department,
the outbound disclaimer had to state the legal requirements regarding
client communication, while the sales department disclaimer had to
state the company's warranty information.
So our first reaction was "Sure, basic stuff!" So we
fired up the New Transport Rules wizard and chose the "if sender and
recipient AD attributes are evaluation" condition. When we selected attributes
in the editing pane, we were presented with a list of available Active
Directory attributes that could be added to our rule condition. Well...
bad news... Department is not one of the AD attributes that were
available. We then realized that we do have all the AD Custom
Attributes available. We simply ran a script in Active Directory that
cloned the value of the department attribute to the Custom Attribute
15, and then selected Custom Attribute 15 for our condition. Done—and
we successfully fought and conquered devolution!
Now, what we didn't realize at that time—and what
would have helped us back then—is that Exchange Server 2010 now
includes pretty much every Exchange recipient attribute as an available
Transport Rule condition. So today, in Exchange Server 2010, we can
create a new rule for this customer simply by selecting the Department
attribute.
|