Within a company, you usually want to control the signatures that users are using when sending mail outside of the company. Most companies want to include at least a "disclaimer" text, others want to control the amount of contact details as well and still others want to control the entire look and feel of the signature. Outlook offers no direct means to do this since the Signature feature in Outlook is a client side feature and thus users can create and modify their own signature. You can lock down the access to the Signature feature by using Group Policies but that still doesn't take away the issue of creating/generating a standard signature in the first place and deploying it to the users.
This guide discusses the features that Exchange offers to create and manage signatures at server level. Also, additional methods are being discussed to manage it without an Exchange server. Finally, an overview of 3rd party solutions is provided for alternative solutions.
This guide discusses the features that Exchange offers to create and manage signatures at server level. Also, additional methods are being discussed to manage it without an Exchange server. Finally, an overview of 3rd party solutions is provided for alternative solutions.
Exchange 2007
Exchange 2007 has the Transport Rules feature which you can use to set up a default disclaimer for each outgoing email message.
Exchange 2007 has the Transport Rules feature which you can use to set up a default disclaimer for each outgoing email message.
- Open the Exchange Management Console.
- In Organization Configuration select Hub Transport and then select the Transport Rules tab.
- In the Actions Pane click New Transport Rule…
- Name your rule and optionally add a Comment. For instance;
- Name: Corporate disclaimer
- Comment: This transport rule adds a standardized disclaimer text to all outgoing emails.
- Press Next.
- On the Conditions screen select the following 2 conditions;
- from users inside or outside the organization
- sent to users inside or outside the organization
- In the bottom pane, modify the conditions so that they read;
- from users Inside the organization
- and sent to users Outside the organization
- Press Next.
- In the Actions screen select the action;
- append disclaimer text using font, size, color with separator and fall back to action if unable to apply.
- In the bottom pane you can modify the conditions to your preference.
- Click on disclaimer text to set your default text.
- Note that the disclaimer text is Plain Text only so you can't type HTML code. If you want to add a link, you'll have to type it in full.
- Once done, press Next.
- You can set any exception as you see fit. You can continue without any exceptions as well.
- Press Next.
- On the Create Rule screen you'll see the PowerShell command that will be executed when clicking the New button.
- After pressing the New button the wizard has been completed and a summary is shown. Assuming it completed successfully, your Transport Rule has been created and is active now. Clicking Finish will close the New Transport Rule dialog.
Exchange 2010
Exchange 2010 also has the Transport Rules feature just as Exchange 2007 but has support for some additional customization as well. The most notable regarding signatures is that HTML code is now supported and that you can also use user information that has been stored in Active Directory to construct the signature dynamically.
Supported variables
You can use the following variables in your disclaimer text. When using them, place them between %% characters.
Example: %%DisplayName%%
Exchange 2010 also has the Transport Rules feature just as Exchange 2007 but has support for some additional customization as well. The most notable regarding signatures is that HTML code is now supported and that you can also use user information that has been stored in Active Directory to construct the signature dynamically.
- Open the Exchange Management Console.
- In Organization Configuration select Hub Transport and then select the Transport Rules tab.
- In the Actions Pane click New Transport Rule…
- Name your rule and optionally add a Comment. For instance;
Name: Corporate signature
Comment: This transport rule adds a standardized signature and disclaimer text to all outgoing emails. - Press Next.
- On the Conditions screen select the following 2 conditions;
- from users that are inside or outside the organization
- sent to users that are inside or outside the organization, or partners
- In the bottom pane, modify the conditions so that they read;
- from users that are Inside the organization
- and sent to users that are Outside the organization
- Press Next.
- In the Actions screen select the action - append disclaimer text and fall back to action if unable to apply.
- In the bottom pane you can modify the conditions to your preference.
- Click on disclaimer text to insert your default disclaimer text and add variables to include user information (see below for an overview of variables which you can use).
- Note that the disclaimer text allows you to use HTML code (including in-line CSS). This will allow you for instance to set different font size and colors for the signature and disclaimer part, add a horizontal line, hyperlink text or include a logo.
- You can use up to 5000 characters
- When a Plain Text message is sent, the HTML tags are automatically stripped off.
- Once done, press Next.
- You can set any exception as you see fit. You can continue without any exceptions as well.
- Press Next.
- On the Create Rule screen you'll see the PowerShell command that will be executed when clicking the New button.
- After pressing the New button the wizard has been completed and a summary is shown. Assuming it completed successfully, your Transport Rule has been created and is active now. Clicking Finish will close the New Transport Rule dialog.
You can use the following variables in your disclaimer text. When using them, place them between %% characters.
Example: %%DisplayName%%
UserLogonName DisplayName FirstName Initial LastName PhoneNumber OtherPhoneNumber HomePhoneNumber OtherHomePhoneNumber PagerNumber MobileNumber FaxNumber OtherFaxNumber |
Street POBox City State ZipCode Country Title Department Manager Office Company Notes CustomAttribute1 – CustomAttribute15 |
Exchange 2013, 2016, 2019 and Office 365 Exchange Online
Exchange 2013, 2016, 2019 and Office 365 Exchange Online offer support for HTML based signatures and retrieving user information from Active Directory to dynamically create personalized signatures as well as static disclaimers.
Exchange 2013, 2016, 2019 and Office 365 Exchange Online offer support for HTML based signatures and retrieving user information from Active Directory to dynamically create personalized signatures as well as static disclaimers.
- Logon to the Exchange Admin Center (ECP).
- From the Navigation Pane on the left, select: Mail Flow.
- In the Rules section, click on the + icon to create a new rule. If a menu opens up, select: Apply disclaimers… (if not, continue to the next step).
- Name your rule. For instance: Corporate External Signature and Disclaimer.
- Click on the "More options…" link to show all rule conditions and actions and to be able to add more conditions.
- Select the following "Apply this rule if…" conditions. Press the "add condition" button to add the second condition;
- The sender…-> is external/internal-> Inside the organization
- The recipient…-> is external/internal-> Outside the organization
- From the "Do the following…" list select - Apply a disclaimer to the message…-> append a disclaimer
- Click on the "Enter text…" link to construct your Signature.
- You can use HTML, inline CSS and links to images stored on a web server.
- You can use practically any Active Directory user property as a variable by placing it between double percent character like; %%DisplayName%%.
- The signature including all HTML tags can be up 5,000 characters long.
- Any HTML tags are automatically stripped when the message format is Plain Text.
- Click on the "Select one…" link to select a fallback option when the disclaimer can't be added;
- Wrap
- Enclose the original message in a new message envelope and add the disclaimer into the new message.
- Reject
- Don't deliver the message and send an NDR to the sender.
- Ignore
- Deliver the message but without the disclaimer.
- Optionally; Set any exceptions, auditing or other options for the rule.
- Press the "Save" button to create and activate the Transport Rule.
Exchange PowerShell
Signatures and Disclaimers can also be created via the New-TransportRule Exchange PowerShell cmdlet. They can later be managed via the Disable, Enable, Get, Set and Remove cmdlets.
The example above becomes the following PowerShell command;
New-TransportRule -Name 'Corporate External Signature and Disclaimer' -FromScope 'InOrganization' -SentToScope 'NotInOrganization' -ApplyHtmlDisclaimerText '<br>Yours faithfully,<br>%%DisplayName%%<br>%%Title%%<br><hr>The following <a href="http://www.yourcompany.com/emaildisclaimer.htm">disclaimer</a> applies to this message.' -ApplyHtmlDisclaimerFallbackAction 'Wrap'
Outlook Signature deployment via VBS script
If you are not using Exchange or are looking for a client (Outlook) level solution to generate your signatures, you can do this via a script. There are various ways to do this of course but there are a couple of common things to keep in mind when going for a custom script;
Below you'll find a sample script to help you on your way, it is not intended for use as-is.
If you are not using Exchange or are looking for a client (Outlook) level solution to generate your signatures, you can do this via a script. There are various ways to do this of course but there are a couple of common things to keep in mind when going for a custom script;
- The signature has to end up in the user's Signatures folder.
- A single signature contains a Plain Text, HTML and Rich Text version of your template with their corresponding file formats;
- *.txt, *.htm and *.rtf
- You'll need to query Active Directory via LDAP if you want to include user specific information.
- Consider how you want to update the signature. For instance;
- Are you going to run the script each time at logon or only once and then users can run the script manually via a Start Menu shortcut?
- Are you going to disable access to the Signature feature via Group Policies?
- Note that you cannot set the deployed signature as the default via Group Policies; this requires an additional one-time Registry modification (see below script example for further details).
'Option Explicit
On Error Resume Next
Dim strSigName
Dim strFullName, strTitle, strCompany, strTel, strFax, strEmail, strWeb, strCorpEmail
Dim boolUpdateStyle
'==========================================================================
' Some script variables
'==========================================================================
' Name signature
strSigName = "Standard Signature"
' If signature exists, overwrite (true) or leave alone (false)?
boolUpdateStyle = true
'==========================================================================
' Set some static information
'==========================================================================
' Company information
strCompany = "Your Company Name"
strTel = "+12 1234 567890"
strFax = "+12 9876 543210"
strWeb = "http://www.yourdomain.com"
' Fallback email address when no address is found
strCorpEmail = "This email address is being protected from spambots. You need JavaScript enabled to view it."
'==========================================================================
' Read User's Active Directory information
'==========================================================================
Dim objSysInfo, objUser
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.Username)
strFullName = objUser.displayname
strTitle = objUser.title
strEmail = objuser.emailaddress
If Trim(strTitle) = "" Then strTitle = "_"
If Trim(strEmail) = "" Then strEmail = strCorpEmail
Set objUser = Nothing
Set objSysInfo = Nothing
'==========================================================================
' Get Signature Folder
'==========================================================================
Dim objShell
Set objShell = CreateObject("WScript.Shell")
strSigFolder = ObjShell.ExpandEnvironmentStrings("%appdata%") & "\Microsoft\Signatures\"
Set objShell = Nothing
'==========================================================================
' Get Signature Folder
'==========================================================================
Dim objFSO, objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not (objFSO.FolderExists(strSigFolder)) Then
Call objFSO.CreateFolder(strSigFolder)
End If
strHTMFile = strSigFolder & strSigName & ".htm"
strRTFFile = strSigFolder & strSigName & ".rtf"
strTXTFile = strSigFolder & strSigName & ".txt"
'==========================================================================
' Create HTM File
'==========================================================================
'chr(47) = /
Err.Clear
Set objFile = objFSO.CreateTextFile(strHTMFile, boolUpdateStyle, False)
If Err.Number = 0 Then
objFile.Write " <" & Chr(47) & "title> <" & Chr(47) & "head> "&vbCrLf
objFile.Write "
"&vbCrLf
objFile.Write strFullName & "
"&vbCrLf
objFile.Write strTitle & "
"&vbCrLf
objFile.Write strCompany & "
"&vbCrLf
objFile.Write "T: " & strTel & " F: " & strFax & "
"&vbCrLf
objFile.Write "E:
FONT-FAMILY: Calibri"""
objFile.Write ">" & strEmail & "<" & Chr(47) & "a>"&vbCrLf
objFile.Write "
Calibri"""
objFile.Write ">" & strWeb & "<" & Chr(47) & "a>"&vbCrLf
objFile.Write "<" & Chr(47) & "p>"&vbCrLf
objFile.Write ""&vbCrLf
objFile.Write "P<" & Chr(47) &
"span>"&vbCrLf
objFile.Write "Please consider the environment - do you really need to print this email?
"&vbCrLf
objFile.Write "<" & Chr(47) & "span><" & Chr(47) & "p>"&vbCrLf
objFile.Write "<" & Chr(47) & "body> <" & Chr(47) & "html> "&vbCrLf
objFile.close
End If
'==========================================================================
' Create TXT File
'==========================================================================
Err.Clear
Set objFile = objFSO.CreateTextFile(strTXTFile, boolUpdateStyle, False)
If Err.Number = 0 Then
objFile.Write strFullName & vbCrLf
objFile.Write strTitle & vbCrLf
objFile.Write strCompany & vbCrLf
objFile.Write "T: " & strTel & " F: " & strFax & vbCrLf
objFile.Write "E: " & strEmail & vbCrLf
objFile.Write strWeb & vbCrLf & vbCrLf
objFile.Write "Please consider the environment - do you really need to print this email?" & vbCrLf
objFile.close
End If
'==========================================================================
' Create RTF File
'==========================================================================
Err.Clear
Set objFile = objFSO.CreateTextFile(strRTFFile, boolUpdateStyle, False)
If Err.Number = 0 Then
objfile.write "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}
{\f1\froman\fprq2\fcharset2 Webdings;}}" & vbCrLF
objfile.write "{\colortbl;\red031\green073\blue125;\red0\green0\blue255;\red0\green128\blue0;}" &
vbCrLF
objfile.write "{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard
\sb100\sa100\cf1\lang2057\f0\fs20 " & strFullName & "\line "
objfile.write strTitle & "\line " & strCompany & "\line T: " & strTel & " F: " & strFax & "\line E: "
objfile.write "{\field{\*\fldinst{HYPERLINK ""mailto:" & strEmail & """}}{\fldrslt{\ul " & strEmail &
"}}}\ulnone\f0\fs20 "
objfile.write "{\field{\*\fldinst{HYPERLINK """ & strWeb & """}}{\fldrslt{\ul " & strWeb & "}}}\ulnone
\f0\fs20\par" & vbCrLF
objfile.write "\cf3\f1\fs36 P\fs20 \f0 Please consider the environment - do you really need to print
this email?\par" & vbCrLF
objfile.write "\pard\cf1\lang1033\par" & vbCrLF
objfile.write "}" & vbCrLF
objFile.close
End If
'==========================================================================
' Tidy-up
'==========================================================================
set objFile = Nothing
set objFSO = Nothing
On Error Resume Next
Dim strSigName
Dim strFullName, strTitle, strCompany, strTel, strFax, strEmail, strWeb, strCorpEmail
Dim boolUpdateStyle
'==========================================================================
' Some script variables
'==========================================================================
' Name signature
strSigName = "Standard Signature"
' If signature exists, overwrite (true) or leave alone (false)?
boolUpdateStyle = true
'==========================================================================
' Set some static information
'==========================================================================
' Company information
strCompany = "Your Company Name"
strTel = "+12 1234 567890"
strFax = "+12 9876 543210"
strWeb = "http://www.yourdomain.com"
' Fallback email address when no address is found
strCorpEmail = "This email address is being protected from spambots. You need JavaScript enabled to view it."
'==========================================================================
' Read User's Active Directory information
'==========================================================================
Dim objSysInfo, objUser
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.Username)
strFullName = objUser.displayname
strTitle = objUser.title
strEmail = objuser.emailaddress
If Trim(strTitle) = "" Then strTitle = "_"
If Trim(strEmail) = "" Then strEmail = strCorpEmail
Set objUser = Nothing
Set objSysInfo = Nothing
'==========================================================================
' Get Signature Folder
'==========================================================================
Dim objShell
Set objShell = CreateObject("WScript.Shell")
strSigFolder = ObjShell.ExpandEnvironmentStrings("%appdata%") & "\Microsoft\Signatures\"
Set objShell = Nothing
'==========================================================================
' Get Signature Folder
'==========================================================================
Dim objFSO, objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not (objFSO.FolderExists(strSigFolder)) Then
Call objFSO.CreateFolder(strSigFolder)
End If
strHTMFile = strSigFolder & strSigName & ".htm"
strRTFFile = strSigFolder & strSigName & ".rtf"
strTXTFile = strSigFolder & strSigName & ".txt"
'==========================================================================
' Create HTM File
'==========================================================================
'chr(47) = /
Err.Clear
Set objFile = objFSO.CreateTextFile(strHTMFile, boolUpdateStyle, False)
If Err.Number = 0 Then
objFile.Write " <" & Chr(47) & "title> <" & Chr(47) & "head> "&vbCrLf
objFile.Write "
"&vbCrLf
objFile.Write strFullName & "
"&vbCrLf
objFile.Write strTitle & "
"&vbCrLf
objFile.Write strCompany & "
"&vbCrLf
objFile.Write "T: " & strTel & " F: " & strFax & "
"&vbCrLf
objFile.Write "E:
FONT-FAMILY: Calibri"""
objFile.Write ">" & strEmail & "<" & Chr(47) & "a>"&vbCrLf
objFile.Write "
Calibri"""
objFile.Write ">" & strWeb & "<" & Chr(47) & "a>"&vbCrLf
objFile.Write "<" & Chr(47) & "p>"&vbCrLf
objFile.Write ""&vbCrLf
objFile.Write "P<" & Chr(47) &
"span>"&vbCrLf
objFile.Write "Please consider the environment - do you really need to print this email?
"&vbCrLf
objFile.Write "<" & Chr(47) & "span><" & Chr(47) & "p>"&vbCrLf
objFile.Write "<" & Chr(47) & "body> <" & Chr(47) & "html> "&vbCrLf
objFile.close
End If
'==========================================================================
' Create TXT File
'==========================================================================
Err.Clear
Set objFile = objFSO.CreateTextFile(strTXTFile, boolUpdateStyle, False)
If Err.Number = 0 Then
objFile.Write strFullName & vbCrLf
objFile.Write strTitle & vbCrLf
objFile.Write strCompany & vbCrLf
objFile.Write "T: " & strTel & " F: " & strFax & vbCrLf
objFile.Write "E: " & strEmail & vbCrLf
objFile.Write strWeb & vbCrLf & vbCrLf
objFile.Write "Please consider the environment - do you really need to print this email?" & vbCrLf
objFile.close
End If
'==========================================================================
' Create RTF File
'==========================================================================
Err.Clear
Set objFile = objFSO.CreateTextFile(strRTFFile, boolUpdateStyle, False)
If Err.Number = 0 Then
objfile.write "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}
{\f1\froman\fprq2\fcharset2 Webdings;}}" & vbCrLF
objfile.write "{\colortbl;\red031\green073\blue125;\red0\green0\blue255;\red0\green128\blue0;}" &
vbCrLF
objfile.write "{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard
\sb100\sa100\cf1\lang2057\f0\fs20 " & strFullName & "\line "
objfile.write strTitle & "\line " & strCompany & "\line T: " & strTel & " F: " & strFax & "\line E: "
objfile.write "{\field{\*\fldinst{HYPERLINK ""mailto:" & strEmail & """}}{\fldrslt{\ul " & strEmail &
"}}}\ulnone\f0\fs20 "
objfile.write "{\field{\*\fldinst{HYPERLINK """ & strWeb & """}}{\fldrslt{\ul " & strWeb & "}}}\ulnone
\f0\fs20\par" & vbCrLF
objfile.write "\cf3\f1\fs36 P\fs20 \f0 Please consider the environment - do you really need to print
this email?\par" & vbCrLF
objfile.write "\pard\cf1\lang1033\par" & vbCrLF
objfile.write "}" & vbCrLF
objFile.close
End If
'==========================================================================
' Tidy-up
'==========================================================================
set objFile = Nothing
set objFSO = Nothing
Set generated signature as the default signature
Registry Editor buttonAs mentioned before, you'll need to set and remove additional Registry values in order to have Outlook use the deployed signature as the default for newly created emails and replies and forwards.
Their string values need to be set to the name of the signature.
After Outlook has been started, the First-Run key is being added back again and the NewSignature and ReplySignature values are automatically being removed. When multiple mail accounts are configured, they will all have their new and reply/forward signature set to the ones specified in the Registry file.
The example below makes the appropriate Registry modifications for Outlook 2016, Outlook 2019, and Office 365 and uses the signature name of "Standard Signature".
Registry Editor buttonAs mentioned before, you'll need to set and remove additional Registry values in order to have Outlook use the deployed signature as the default for newly created emails and replies and forwards.
- Remove the First-Run value name from: HKEY_CURRENT_USER\Software\Microsoft\Office\\Outlook\Setup
- Add the NewSignature and ReplySignature value names to: HKEY_CURRENT_USER\Software\Microsoft\Office\\Common\MailSettings
After Outlook has been started, the First-Run key is being added back again and the NewSignature and ReplySignature values are automatically being removed. When multiple mail accounts are configured, they will all have their new and reply/forward signature set to the ones specified in the Registry file.
The example below makes the appropriate Registry modifications for Outlook 2016, Outlook 2019, and Office 365 and uses the signature name of "Standard Signature".
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Setup]
"First-Run"=-
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\MailSettings]
"NewSignature"="Standard Signature"
"ReplySignature"="Standard Signature"
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Setup]
"First-Run"=-
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\MailSettings]
"NewSignature"="Standard Signature"
"ReplySignature"="Standard Signature"
3rd party solutions & Alternatives way
If all of the above solutions do not fit your needs, not to worry! There are plenty of 3rd party solutions available to manage corporate signatures at either Exchange or Outlook level which you can google it.
Alternatively, you can also contact me by clicking the link HERE to get assistance from Lemon Web Solutions.