Email Rejecting Patterns in Help Desk Ultimate

Email Rejecting Patterns in Help Desk Ultimate

Help Desk Ultimate is empowered with the email rejecting option, which helps to configure the incoming emails and omit creating tickets from auto reply messages, spam messages, certain domain, etc.


Email rejecting patterns in helpdesk are the regular expressions for PHP and fully comply it's syntax rules. More information about them can be found on the site


In order to add a new pattern, go to the Help Desk > Email Rejecting > Manage Patterns page at the backend and click the Add New button.


The Pattern field arouses most difficulties among our customers as you have to know what variables to use.


Here are the examples of the most used patterns:


  • Exact email address (case-insensitive):
    /[email protected]\.com/im
  • All emails from a certain domain (for headers, case-insensitive):
    /[\w.\-][email protected]\.com/im
  • Contains the word "abracadabra" (case-insensitive):
  • Auto-submitted header:
  • X-Spam-Flag header set to YES:
    /x-spam-flag: yes/mi
  • X-Spam header:
    /^x-spam: (?!not detected).*$/im
  • Contains or
  • Catches an email if there is at least 1 Chinese character*:
  • Catches an email if there is at least 1 Cyrillic character*
  • Catches the emails which have 3 different substrings "[#ABC-12345] Ticket Created: " in their subject:
    /(\[\#[A-Z]{3}\-[\d]{5}\]\sTicket created:\s){3}/im

*Despite these expressions are good at detecting spam, they will catch any email which contains at least one Cyrillic or Chinese character. Effectively, it means that they will also reject the emails from your real customers if their names or signatures contain such characters.


There is also a number of sites where you can test your regular expressions. For example, or