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.


<html>

<body>
<table border="0" width="100%">
<tr>
<td width="85">
<img border="1" src="http://www.expta.com/images/%%Firstname%%%20%%Lastname%%.jpg">
</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%%
</font></td>
</tr>
</table>
</body>
</html>
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 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 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="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.

42 comments:

  1. do you need outlook 2010 to utilize these features?

    ReplyDelete
  2. This feature is a beauty! Have it working for all my nonblackberry users. That being said, has anyone found a fix for the blackberry plain text issue?

    Blackberries generate all new emails in plaintext which causes the signature to reveal all HTML coding.

    Would love to know if there is a fix (ie.suppress the signature from mobile devices)

    ReplyDelete
    Replies
    1. Here is what i did: BB server 5.02 - go to Management Console – Servers and Components\BlackBerry Solution topology\BlackBerry Domain\component view\Email and click on bberry server. On the right side click on Messaging\Edit instance. On the Appended disclaimer text box type a fraise like “Sent from My Company mobile device” and click Save all.
      On EMC – Organization Configuration\Hub Transport and create a new rule with Action – append disclaimer text and fallback to action if unable to apply ; apply your Signature block and Disclaimer; and on Exceptions – check – “except when the Subject field contains specific words” – RE: and FW: and also “except when the Subject field or message body contains specific words and enter - “Sent from My Company mobile device”. Create a rule and that is all. When send emails from BBerry the Signature block won’t appears.
      You can create a new rule for BBerry users and in Conditions – mark “when the Subject field or message body contains specific words” type - “Sent from My Company mobile device” and on Action – check – “append disclaimer text and …..” and apply your Bberry signature block.

      Delete
    2. Brilliant! I've been hunting for a solution for this. This is so simple, and makes so much sense I can't believe I didn't see it myself. Well done Pete, I love it.

      Delete
  3. Hi Jeff,
    I've already set the automatic signature, but when you want to reply or forward the email, the signature is come out to the bottom of the mail, not come out to the the bottom of reply email.
    Please help :)

    ReplyDelete
  4. Julius,

    You're right, I never tested that (an apparently, neither did the Exchange team).

    When you add a disclaimer or dynamic signature using a hub transport rule, it always appends it to the very bottom of the message thread, rather than insert it inline, like Outlook does. Apparently, this is expected behavior (see http://technet.microsoft.com/en-us/library/aa998315(EXCHG.80).aspx).

    I guess the best way to handle this is to create an exception that does not append the signature if it already exists or if you're replying or forwarding a message. Not very elegant.

    I'll ask the Exchange product team about it.

    ReplyDelete
    Replies
    1. Hi jeff,
      is there any update this case ?
      Thank you.

      Delete
  5. Can you have different signatures based upon departments etc?

    ReplyDelete
  6. Hi Jeff,

    How can I do this Exception configuration mentioned by you in your last post?

    Best regards,
    Paulo

    ReplyDelete
  7. Paulo,

    Make sure that the dynamic signature includes a unique word or phrase, maybe a company slogan like "Customer service is our top priority". Then edit the transport rule and in Exceptions use "except when the Subject field or message body contains specific words", then enter the company slogan as the specific words.

    ReplyDelete
  8. I really want to use this, and not Exclaimer... Unfortunately, having to choose between only one sig, or sigs repeatedly applied to the bottom of the messages makes this a no go for sure...

    Also, some "if exist" statemtens would be nice...

    ReplyDelete
  9. Hi there,

    Is there a way to add this *not* at the bottom of the email thread? I'd like to add this to the bottom of an email at the bottom of what has just been written (like an email signature) rather than at the bottom of the entire email.

    Regads,

    Kim

    ReplyDelete
  10. Need a way to embed images like Outlook. Most clients block external images.

    ReplyDelete
  11. Anybody came out with a solution for the forementioned issue? (signatures of replied emails appended at the bottom)

    ReplyDelete
  12. Does any one have a solution for the signature always appearing at the end of the eamail?

    ReplyDelete
  13. Jeff,

    One option I've been experimenting is is during the initial send we set a header to Disclaimer=Yes, and on the second time we check for that header.

    ReplyDelete
  14. has anyone found a fix for the disclaimer directly below reply?

    ReplyDelete
  15. has anyone found a fix for the disclaimer directly below reply?

    ReplyDelete
  16. Vivekbb, I suggest following the idea listed by Anonymous (right above your comment). Setting an X-Header and then checking for it should work.

    ReplyDelete
  17. not able to see image. after writing correct as well

    ReplyDelete
  18. is there any code of inserting background image to all the new mails in exchange through HTML code using disclaimer

    ReplyDelete
  19. It is not possible to insert the signature anywhere but the bottom ot the message at this time.

    ReplyDelete
  20. What a GREAT tool this would be if MS wouldn't have forgotten that 99% of email signatures appear right after the reply. Is there any update from MS regarding the issue with the signature appearing at the bottom of the email string?

    ReplyDelete
  21. No update. It's really a lot more complicated than you might think.

    ReplyDelete
  22. I don't think it can be too hard to do. There 3rd party products on the market that have this functionality for Exchange 2010. I was hoping not to have use another product to manage my email signatures when I upgraded to 2010.

    ReplyDelete
  23. Great job, but i have a question: when I receive an e-mail with signature and reply or forward it signatures stack up at the bottom. is there any way to paste sender's signature only after the body of the original message?

    ReplyDelete
  24. One thing that I have not managed to do is remove blank AD fields. Let’s say a user has no phone number for whatever reason, I don’t want this line to display as a blank line in the signature. Do you know if this is possible?

    ReplyDelete
    Replies
    1. You can make a new rule where you examine if the field has a value or not and if it has you apply rule #1 and if not than rule #2.
      But it's a waste of time anyway. I spent 2 days with setting up the rules when I realized this matter with forwarded mails. You can forget this tool as a company signature policy.

      Delete
  25. is there any way to do this in office 365?

    ReplyDelete
  26. Just want to re-ask if any SP for Exchange add the functionality of attaching signature after a reply not at the end off whole mail.

    ReplyDelete
  27. Wow, ok so useless then...

    ReplyDelete
  28. All of this one signature per thread business can be resolved be PREPENDing the signature instead of APPENDing it.

    ReplyDelete
  29. That doesn't work though does it, as you're signature then preceeds your email.

    ReplyDelete
  30. What about adding an exception to the rule not to append it if the subject contains a "re:" or "fw:".

    worked for me.

    ReplyDelete
  31. Is it possible for the signature to automatically reflect that an email is from sender on behalf user when using delegates.

    ReplyDelete
  32. I created a signature following this article, but have a problem. The problem is, if there is a custom hyperlink within the email, when the email is sent, the hyperlink will be removed from the email. This only happens to custom hyperlinks.

    For example, for this email content:

    Line1 (link to "abc:address1")text 1 (I cannot put the actual link here, as this forum does not allow a custom protocol hyperlink)

    Line 2 text 2

    After this email is sent, the hyperlink for text 1 will be stripped out. Whoever receives the email will see it like this (text 1 is still a hyperlink, but pointing to nowhere, and no problem for text2):

    Line1 text 1

    Line 2 text 2

    Can anybody help to figure out how to get around this? Is this a bug on Exchange Server?

    ReplyDelete
  33. How do you make the Image on the signature a hyperlink?

    ReplyDelete
  34. It turns out when the disclaimer is added the Html2Html converter Filter Html will remove the non common or unsafe href's. It is built into exchange and you can change it with a configuration setting(add SafeUrlScheme to Edgetransport.exe.config) but this setting is not exposed to public, so I won't post it here (contact Microsoft if you need more details).

    ReplyDelete

Thank you for your comment! It is my hope that you find the information here useful. Let others know if this post helped you out, or if you have a comment or further information.