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:
- 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%”>
<img border=”1″ src=”http://www.expta.com/images/%%Firstname%%%20%%Lastname%%.jpg”>
</td><td valign=”top”><font face=”Garamond”>
<font size=”2″ face=”Calibri”>%%department%%<br>
Telephone: %%Phone%% <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
in the images
folder on the http://www.expta.com/
server. Each user will need a JPG file in the images folder on the web server in this Firstname Lastname.jpg
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=”http://www.expta.com/images/logo.jpg”>
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.