Using Dynamic Signatures in Exchange 2010

Thursday, June 3, 2010
Exchange 2010 offers a new feature called Dynamic Signatures.  Dynamic Signatures are hub transport rules that automatically apply a personalized signature to the bottom of an e-mail based on the sender’s Active Directory (AD) attributes.  You can also configure this feature to apply rich, HTML signatures with specific fonts, company logos, and more.

In this article I'll demonstrate how to create a Dynamic Signature based on the user's name, department, phone number, company name and address in AD.  The signature will also include a custom image for each user, as shown below:

Let's get started.  Open the Exchange Management Console and navigate to Hub Transport under Organization Configuration.  Click the Transport Rules tab in the work pane.  Now click New Transport Rule in the Actions pane and configure it as follows:

Begin the Edit Transport Rule wizard by entering a name and description for the rule, as shown below.

Now configure the Conditions for the signature.  I always start by making the new rule apply only to myself, so I can test the rule's functionality before deploying it to everyone.  Once you've confirmed that it functions as expected, you would normally apply this rule "from users that are inside the organization".

For Actions, check "append disclaimer text and fallback to action if unable to apply".  This is where we enter our Dynamic Signature text and variables, as shown below.

Click disclaimer text to enter the text for the Dynamic Signature.  You can use standard HTML or plain text for the signature.  In this demo I'm using HTML, which allows me to specify text formatting and allows me to create a custom link to a photo on a web server.

Tip: You can use an HTML editor like Microsoft Web Expressions or Frontpage to create the basic layout of the signature, and then paste it into the Specify Disclaimer Text box for editing.

The trick to making the signature dynamic is to use variables for attributes in Active Directory.  These variables must be placed between %% symbols.  For example, %%firstname%%.  The following is a list of the supported variables that are available:
  • UserLogonName
  • DisplayName
  • FirstName
  • Initials
  • LastName
  • PhoneNumber
  • OtherPhoneNumber
  • HomePhoneNumber
  • OtherHomePhoneNumber
  • PagerNumber
  • MobileNumber
  • FaxNumber
  • OtherFaxNumber
  • Email
  • Street
  • POBox
  • City
  • State
  • ZipCode
  • Country
  • Title
  • Department
  • Manager
  • Office
  • Company
  • Notes
  • CustomAttribute1 – CustomAttribute15
Enter the the signature text into the Specify Disclaimer Text box as shown below.

The HTML text I'm using in this demo is as follows.


<table border="0" width="100%">
<td width="85">
<img border="1" src="">
</td><td valign="top"><font face="Garamond">
<b>%%Firstname%% %%Lastname%%</b></font><br>
<font size="2" face="Calibri">%%department%%<br>
Telephone: %%Phone%% <br>
%%Company%% <br>
%%Street%% <br>
%%City%%, %%State%% %%ZipCode%%
This code creates a two column, single row table with a graphic in the first cell (in red) and the formatted text in the second cell (in blue). 

Note that the image is a link to a JPG file named Firstname[%20(space)]Lastname.jpg in the images folder on the server.  Each user will need a JPG file in the images folder on the web server in this Firstname Lastname.jpg format.

Alternatively (and to keep it more simple), you could opt to use a single image for all users, such as a company logo.  Simply change the line in red to a static link, such as:
<img border="1" src="">
Now finish the Edit Transport Rule wizard to complete the Dynamic Signature rule and test it out.

As with all the Exchange 2010 wizards, you have the opportunity to copy the Powershell code that will be used to create the transport rule.  This allows you to save and edit the code for future use.