Knowledge base

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 Regular-Expressions.info.

 

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):
    /test@example\.com/im
  • All emails from a certain domain (for headers, case-insensitive):
    /[\w.\-]+@example\.com/im
  • Contains the word "abracadabra" (case-insensitive):
    /abracadabra/ig
  • Auto-submitted header:
    /((auto-submitted)[\w:\-\r\t\s]+)(?!no)/i
  • X-Spam-Flag header set to YES:
    /x-spam-flag: yes/mi
  • X-Spam header:
    /^x-spam: (?!not detected).*$/im
  • Contains http://site.com/ or https://site.com/:
    /https?:\/\/site\.com\//ig
  • Catches an email if there is at least 1 Chinese character*:
    /\p{Han}+/u
  • Catches an email if there is at least 1 Cyrillic character*
    /\p{Cyrillic}+/u
  • 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, Regex101.com or RegExr.com.

Please wait...

added to cart
Go to Checkout Continue Shopping
Continue shopping
View cart & checkout