How can we help?
Searching in {{docApp.searchFilterBySpecificBookTitle}}
{{docApp.searchResultFilteredItems.length}} results for: {{docApp.currentResultsSearchText}}
in {{docApp.searchFilterBySpecificBookTitle}}
Search results have been limited. There are a total of {{docApp.searchResponse.totalResultsAvailable}} matches.
You have an odd number of " characters in your search terms - each one needs closing with a matching " character!
-
{{resultItem.title}}
{{resultItem.url}}
{{docApp.libraryHomeViewProduct.title || docApp.libraryHomeViewProduct.id}}
{{docApp.libraryHomeViewProduct.description}}
{{group.title || group.id}}
{{group.description}}
Ensure email routing rules work as intended
- Article
- Wed Jul 02 2025
- 4 minutes to read
- 1 contributors
When you have created inbound routing rules that do not process some or all emails, it is likely that you have used incorrect syntax in the expression criteria of the rules.
This article explains some of the common syntax errors and how to resolve them, and highlights steps you can take to identify and fix issues when email rules are not applied.
As a general rule, expressions used in routing rules follow the syntax used in SQL expressions and use SQL logical operators.
Before you begin
To do this | You need this role assigned |
---|---|
Configure routing rules | Admin or Super User role |
Access mailbox and email log files | A dedicated user role created by you |
Introduction
Inbound routing rules allow you to automate actions that occur on receipt of emails received into Hornbill. For example, you can create a rule that raises a new incident type request from emails with the term VPN in the subject. Using multiple rules helps you automatically direct and manage the flow of incoming emails across your service desk without human intervention.
Common errors that you can fix
Here are some common misconfigurations and how to fix them:
-
The string/character values used in expressions are not contained within double quotes. For example, a criterion like
fromAddress = example@domain.com
is incorrect because it is missing quotation marks aroundexample@domain.com
. It must be configured asfromAddress = "example@domain.com"
. -
The string/character values used in expressions are not fully enclosed within quotes. For example, a criterion like
fromAddress = "example@domain.com
is incorrect because it is missing the closing quote. It needs to be configured asfromAddress = “example@domain.com”
. -
The string/character values used in expressions are enclosed with a mix of single and double quotes. For example, a criterion like
fromAddress = "example@domain.com'
is incorrect. It must be configured asfromAddress = "example@domain.com"
orfromAddress = 'example@domain.com'
. -
When using the LIKE operator, the value does not contain a wildcard. When using the LIKE operator in a criterion to match specific patterns, the value must contain at least one wildcard, otherwise the operator will evaluate as a hard match (equal). For example, a criterion like
subject LIKE "test"
will evaluate assubject = "test"
because the value used for the LIKE evaluation does not contain any wildcard. If you need your expression to match the value as a pattern within the evaluated parameter (for example, the email subject) then the expression must be:subject LIKE "%test%"
, to match the value anywhere within the evaluated parameter — e.g. subject contains…subject LIKE "test%"
, to match the value at the beginning of the evaluated parameter — e.g. subject starting with…subject LIKE "%test"
, to match the value at the end of the evaluated parameter — e.g. subject ending with…
Important
When evaluating
toDomain
,toAddress
, orccAddress
parameters, always use the LIKE operator. This ensures the routing rule will match the email even if it is addressed to multiple recipients. If the criterion is using the equal operator for these parameters instead of LIKE and the email is addressed to multiple recipients, the routing rule will not match the email. -
Routing rules are disabled. This setting for globally turning routing rules on or off can be found in Configuration > Platform Settings > Advanced Tools & Settings > Advanced System Settings:
mail.autoresponder.enable
Troubleshooting steps
When an email arrives in your inbox that was not processed by the autoresponder, you can troubleshoot this by reviewing the delivery log through these steps:
- Select the email menu icon and navigate to Hornbill’s email inbox:
- Select the email that didn’t process as expected, then from the menu bar select the More icon, then select Show inbound delivery log, as shown in this screenshot:
- Here you’ll see the delivery log for this email. Scroll down through the log text until you see the log entries for the autoresponder processing the email. This is indicated by the text,
mail.autoresponder.enable
. This screenshot shows an example: - The information shown here can help you identify and troubleshoot issues. In the example screenshot, there are no rules with criteria that match the content of the email. Because of this, no routing rules are applied.
Best practices
Ensure that expressions used in routing rules follow the syntax used in SQL expressions and are using SQL logical operators.
Further information
For further information on configuring inbound routing rules and how multiple rules use ordering to work together, see:
- Using email routing rules in the Platform Configuration Guide.
- Hornbill’s Email Routing Rules blog article and video.
- Email Routing Rule Templates in Hornbill blog article and video.
- Version {{docApp.book.version}}
- Node {{docApp.node}} / {{docApp.build}}