Conditions and exceptions
Signature rules let you decide when to add email signatures, and to which senders. The signature adding algorithm is based on conditions and exceptions. Conditions are circumstances that need to be fulfilled to trigger a signature rule. Exceptions are the exact opposite - they suppress the action of adding a signature. Conditions and exceptions are defined in the Manage Signatures App, on the Senders, Keywords and Email direction tabs, with additional settings available on the Options tab. This article explains:
- how to set conditions and exceptions for a signature rule,
- how various conditions/exceptions are related,
- what happens to messages sent by delegates with the Send As or Send on Behalf permissions.
This section will show you how to configure conditions and exceptions. To start, launch the Manage Signatures App, log in to your tenant and select one of your rules (or add a new one and name it on the Overview tab). Proceed to the Senders tab.
The Senders tab lets you specify to which users or groups your signature rule will be applied (Fig. 1.). On the top list (Add signatures to emails...) you can define conditions by choosing senders whose emails will be stamped with your signature. The bottom list (Do not add signatures to emails...) allows you to add exceptions, i.e. users or groups who will not get the signature. In the example below we configured the rule to add signatures to emails sent by our IT guys, excluding the managers.
The program allows you to define the conditions and exceptions in many ways, e.g. by adding all/individual users, groups, or setting filters (Fig. 2.).
|Fig. 2. Various selection options.|
Keep in mind that the scope of users who can get signatures might also be limited during the configuration of connectors.
In our example (Fig. 1.), the software knows when to add signatures because we added an Azure Active Directory filter condition to check if the sender's Department field in Active Directory is equal to IT (Fig. 3.). In a similar way, an exception to the rule was defined: if the user's Title in AD contains the value Manager, the rule will not be triggered.
|Fig. 3. Azure Active Directory filter options.|
Thanks to all these user configuration possibilities, you can apply your signature rule to a group of users and exclude one or more users at the same time, e.g.:
- add a signature to the whole IT department except for the manager whose signature is covered by a different rule for managers, as shown in the example above;
- add a legal disclaimer to all company emails except for the emails of employees from a foreign site, because different laws apply there;
- add signatures with marketing banners to the whole customer support department but not to emails sent by people from other departments, etc.
Remember to define at least one user in the conditions field (top list). If you leave this section empty, signatures will be added to all users specified in the connectors wizard (learn more). The program will notify you about that (and automatically add the All users condition to the list) when you submit your changes via the Save () button.
If you would like to create a rule, but do not want to apply it to any users, you can temporarily disable it via the switch () button.
The Keywords tab (Fig. 4.) allows you to define specific phrases that will trigger or suppress your signature rule. This option is very useful e.g. when you want to apply an additional signature only to selected recipients or if you want to quickly remove the default signature of your company from a private message. The latter is shown in Fig. 4.: if the program finds the #nosignature phrase in the email subject or body, the signature will not be added and the phrase itself will be removed from the message.
When adding or editing a keyword (Fig. 5.) you can define where to search for the phrase and decide if the program should delete it from the message.
|Fig. 5. Keyword configuration options.|
You can insert your keyword anywhere inside the message title or body. An asterisk (*) may be used as a wildcard character. Add it before and/or after the phrase to make sure that your keyword is always found (see Fig. 5.).
The Email direction tab (Fig. 6.) lets you decide if a signature rule should be applied to all sent emails or to internal/external correspondence only.
If an email contains both internal and external recipients, and you have different rules configured for each message direction, then the outcome will depend on how Exchange Online processes this message. Usually, Exchange Online splits such emails into two messages - one with internal and one with external recipients - and delivers each type separately to the CodeTwo Email Azure Service. In this scenario, different rules are applied to external and internal recipients, as expected. In rare cases, e.g. when you use a non-standard email client, Exchange Online might not split your message. In such situations, our program will apply the rule for external recipients to process this email.
On the Options tab (Fig. 7.) you can:
- define how the program should process subsequent rules if you have more than one,
- use the Scheduler to specify when your rule will be active.
The Scheduler is configured separately for each signature rule. It allows you to manage the activity of a rule by selecting time ranges and recurrence patterns. You can create daily, weekly, monthly or custom patterns (Fig. 8.). If you turn the Scheduler on for your rule, a small icon appears next to the rule's name (see Fig. 7.). This icon shows if the rule is currently active () or not ().
If the Scheduler is off or is not yet configured for a signature rule, this rule will be active continuously (without any time limits).
The Scheduler's activity is based on your local time zone.
|Fig. 8. Configuration of the Scheduler.|
As described above, the Senders, Keywords and Email direction tabs let you set conditions/exceptions that need to be fulfilled by a message to trigger a rule and add/exclude an email signature. Apart from conditions/exceptions, you can specify when a signature rule should be active by using the Scheduler available on the Options tab.
To use the program efficiently, you need to understand how conditions and exceptions are related.
Conditions can be defined in the upper lists of the Senders and Keywords tabs and on the Email direction tab. By default, all these conditions are connected via the and logical operator (logical conjunction). This means that:
All defined conditions have to be fulfilled to trigger a rule and add a corresponding signature.
As an example, let us analyze the following scenario: a company has a new product "XYZ" and would like to add a dedicated signature to selected emails sent by the marketing team outside the organization. Let us assume that a signature template for our new product is already prepared and we only need to define conditions.
First, we add the Online Marketing group as the only condition in the Senders tab, with no exceptions (Fig. 9.). This means that our signature will be added only to emails sent by employees from Online Marketing.
Next, we define a keyword condition (upper list in the Keywords tab), as shown in Fig. 10. Now the dedicated signature will be added only to emails sent by Online Marketing which contain the XYZ phrase in their subjects. The message subjects will remain unchanged (the keyword phrase will not be removed).
Finally, we set the email direction to external only (Fig. 11.).
With this configuration, our signature will be added only to emails which simultaneously fulfill all 3 conditions:
- are sent by Online Marketing
- and contain the XYZ phrase in the message subject
- and are sent to users outside the organization.
Exceptions (the bottom lists on the Senders and Keywords tabs) are connected via the or logical operator (logical disjunction). In other words:
If you define several exceptions, a signature rule is suppressed for each exception individually.
The following example will help you understand how the exceptions are processed by the program. Let us modify the signature rule described in the previous example. On the Senders tab, we add an exception (the bottom list) by creating an Azure AD filter, as shown in Fig. 12. This will exclude the users whose names contain letter A or a (our search algorithm is case-insensitive) from having their emails stamped with the associated signature.
We can add an additional exception on the Keywords tab, as shown in Fig. 13. Now every email which contains the removesignature phrase in its body or subject will not receive the signature, and the phrase itself will be removed from the message.
With these 2 exceptions and 3 conditions combined, our rule will:
- add signatures only to emails sent by Online Marketing which contain the XYZ phrase in the message subject and are external,
- not add signatures in 2 cases: if emails are sent by users whose names contain letter A or if the removesignature phrase is found in the message subject or body.
Sometimes a user or a group of users have permission to send messages as other users or on their behalf. These users are referred to as delegates (see Microsoft Technet, e.g. this article, for more information on delegate permissions).
If User A, who has the Send As right to the User B's mailbox, sends a message and enters the User B's email address into the From field, this message will be considered as sent by User B. Therefore, the rules covering User B will be executed.
However, User A may also have the On behalf of delegate permissions to the mailbox of User B. In such a case, if User A enters the email address of User B into the From field when sending a message, the message will be considered as coming from User A, and the rules covering User A will be executed.
Delegate permissions may affect the visibility of signatures in the Sent Items folder. For more information, see this article.
Signature editor - an overview of the built-in signature editor.
Template library - learn how to use the signature templates available in the program and how to create custom templates.