Skip to main content
xorlab Security Platform (XSP) allows you to customize email notification templates to match your organization’s branding, language, and communication preferences. You can modify logos, colors, fonts, and localized texts or create new templates for specific use cases. This guide explains how to manage and customize templates using the shared/email_templates folder in the Expert Editor. Email templates in Expert Editor

Branding Customizations

You can replace the default logo in two ways:
  • URL: Use a publicly accessible link to a logo image.
  • Embedded file: Store a base64-encoded image file within XSP.
In the first case, you have to make sure the graphic file is publicly available, i.e., your browser displays it when you paste the URL into the browser’s address bar. If it’s not publicly available, the logo won’t show up when the mail message is opened while a user is not connected to your company’s network. The second option is independent from any server or network, but it requires you to save the graphics as a base64-encoded text file in the shared/email_templates/shared folder. You can convert the graphics to a base64-encoded text using an online tool such as Base64.guru or CyberChef. Either way, you have to change the default.yml file from the style folder:
  1. Click the style folder to expand it and click the default.yml file.
  2. The first part in the section titled Branding & Colors is marked as #logo:.
  3. Using the ++ctrl+slash++ (++cmd+slash++ on macOS) keyboard shortcut, uncomment its first line (that is logo:) and the last two lines, then change them to the following convention:
    • when using a URL link to the graphics:
    • when using graphics embedded in a txt file (note that the path is relative to the email_templates folder, not to the root directory):
  4. In the case of a URL link, click Publish to accept changes. In the case of a txt file, add a new folder using the context menu for the shared/email_templates folder. Hamburger icon for the context menu
  5. Enter shared as the name of the folder in the dialog box that appears and click Create.
  6. Use the same context menu technique on the newly created shared folder, but this time select New File from the menu. Enter the name for the logo file and click Create.
  7. Scroll down to the file you have just created, click it, and in the right pane paste the result of Base64 encoding the logo. Click Publish to accept changes.

Change the colors

In the same Branding & Colors section of the default.yml file, you can change the colors used in the mail notification templates to match your company’s brand identity.
  1. Click the style folder to expand it and click the default.yml file.
  2. The second part in the section titled Branding & Colors is marked as #colors:.
  3. Using the ++ctrl+slash++ (++cmd+slash++ on macOS) keyboard shortcut, uncomment the colors line and the required lines that follow. Enter new values for color properties that can be changed:
    • error, alert, warning, ok, neutral—the color of the text label for the findings (aka the “kicker”, e.g., ALERT, WARN, GREEN LIGHT or UNDECIDED)
    • background—self-explanatory: the color of the background
    • light and dark—reserved (unused)
    • info—links in the SSQ digest (message subject)
    • subscript—secondary text in the SSQ digest (message info: from, date, etc.)
  4. Click Publish to accept changes.

Change the font

  1. Click the style folder to expand it and click the default.yml file.
  2. Go to the section titled Typography.
  3. Using the ++ctrl+slash++ (++cmd+slash++ on macOS) keyboard shortcut, uncomment the font line and the required lines that follow. Enter new values for font properties that can be changed:
    • size—if you want to specify a new size
    • family—if you want to use another font family
    • color—for specifying a new font color
The resulting Typography section can look like the one below:

Company Information

All company information appearing as an email footer is configurable in the default.yml file located in the info folder.
  1. Click the info folder to expand it and click the default.yml file.
  2. Using the ++ctrl+slash++ (++cmd+slash++ on macOS) keyboard shortcut, uncomment the required lines. Enter new values for company info properties that can be changed:
    • name—your company name
    • details—additional info, e.g., the department name such as "Security Operations Center"
    • email—contact email address
    • url—the URL address for a self-service quarantine link in notification mails, e.g., "https://customer.activeguard.cloud"
    • provider—the name of the service provider
The resulting company information file can look like the one below:

Localization

In order to support localization for a particular language (lang) of a given country (COUNTRY), follow the steps below:
  1. Click the locale folder to expand it and click the default.yml file.
  2. In the right pane, select and copy the whole content of the file.
  3. Use the context menu for the locale folder to add a new file.
  4. Enter the name for the file in the dialog box that appears. Use the convention of default_lang_COUNTRY.yml, e.g., default_pt_BR.yml for the Brazilian Portuguese version of a file. Click Create.
  5. Scroll down to the file you have just created, click it, and in the right pane paste the content of the previously copied content of the default.yml file. For each template entry in the new localization file, replace the default text with its translation. Click Publish to accept changes.

Change the default language

The default language for notifications is defined in the default.yml file located in the config folder.
  1. Click the config folder to expand it and click the default.yml file.
  2. You will see only one entry: defaultLocale. Set it to your country code (currently, only EN and DE values are supported).
  3. Click Publish to accept changes.

Using Language Headers

If you want to use another language in notifications for a particular report email, set the x-ag-locale email header in the report email to the locale desired for the template (this header must be set in the “outer” email that carries the reported email as attachment). For example, if you want to set the template for Swiss German, set the value to de-CH. For this reported email, xorlab Security Platform will then use the default_de_CH.yml instead of the default.yml template to pick the translation. To read the language from a custom header, for example my-custom-language-header instead of x-ag-locale, you would need to edit activeguard/core/active_guard.yml the following way:

Managing Templates

Disable a Template

There are plenty of email notification templates to choose from when responding to a reported email. Sometimes it’s just too much and you would want to have only some of them at hand. Fortunately, it’s fairly easy to get rid of templates you don’t need:
  1. In the main shared/email_templates folder, click a .yml file for the notification template you want to disable.
  2. In the right pane, go to the category keyword and change its value from ANALYST_FEEDBACK to DEFAULT.
  3. Repeat these actions for every unwanted template and click Publish to accept changes.
For example, the screenshot below illustrates disabling the email notification template for the result of a file analysis when a Flash script was found (the FILE_ANALYSIS_FLASH.yml file): Disabling the FILE_ANALYSIS_FLASH template

Create a New Template

To create a new email notification titled NOTIFICATION_NAME for the default tenant:
  1. Use the context menu for the email_templates folder to create a new file inside of it.
  2. Enter NOTIFICATION_NAME.yml as the name for the file in the dialog box that appears. Click Create.
  3. Scroll down to the file you just created, click it, and in the right pane paste the following content:
  4. Enter values that match the template usage—please refer to the Template configuration section.
  5. Go to the locale folder and, in each localization file of the default tenant, add a new entry for the new NOTIFICATION_NAME template using the YAML structure given below. For example, to localize the email notification into US English, add the following lines to default.yml:
The table below explains the purpose of each key:
Template nameThe file name of the new template (e.g., NOTIFICATION_NAME.yml, without the .yml extension) must be the same as the “id:” specified inside the template file, as well as the new block name inside the localization file.
Untranslated sectionsAny template sections that are not translated will be rendered as empty in the final email notification.

Template configuration

The table below lists template parameters and their allowed values:

Using variables in templates

It is possible to use some variables in notification templates so that notifications contain more details about the email messages they refer to. The table below lists all available variables. In order to use them, type $email.<variable_name>, e.g., $email.subject or $email.senderAddress, where you want the desired value to appear in the notification email.
The contextFields variable is an exception in the usage. Since it’s a map, you have to use the following pattern: $email.contextFields.get("<indicator>"), e.g., $email.contextFields.get("dce.indicator.shortened").