User interface customization

Alert, notification and quarantine report emails

By default, alert, notification and quarantine report emails have an OPSWAT styling (colors, logos, texts). The default templates of these emails are stored as xslt templates. If the text or the style of the alert, notification and quarantine report emails need to be changed, the appropriate xslt template needs to be edited.

Overview

Templates of the notification, alert and report emails can be found in:

<installation directory>\mailagenthost\xslt

Default:

C:\Program Files\OPSWAT\MetaDefender Email Security\mailagenthost\xslt

These files are plain text xslt (Extensible Stylesheet Language Transformations) files, that can be edited using plain text editors or xslt editors.

Content and structure of the xslt templates can be changed to customize the alert, notification and quarantine report emails.

Examples

The template for blocked notifications can be found in the notification_blocked.xsl file. It is an XSLT file which contains HTML, CSS and XSLT elements. By modifying the HTML and CSS elements you can get a different look or language for your notifications. XSLT elements should not be modified as we use them to fill the email with actual data.

By default, the blocked notification email looks like below. In the following examples we will customize this.


In order to replace the logo the appropriate image reference should be found and modified in the notification_blocked.xsl file:

<a href="https://www.opswat.com/products/metadefender/email-security"> <img src="img/logo.png" /> </a>

The new logo is placed as newlogo.png image in the img folder. In this case we should modify this part to look like this:

<a href="https://www.opswat.com/products/metadefender/email-security"> <img src="img/newlogo.png" /> </a>

After this modification the notification email will look like this:


Customizing colors

To customize the colors of the table containing the information related to the blocked email modify this part in the style block of the xslt template:

table.email-details .table-header { background: #2672FB; color: #FFFFFF; } table.email-details .table-header p {font-weight: 700; white-space: nowrap;} table.email-details tr.alt td { background: #EAEFF2; } table.email-details tr.alt .table-header { background: #2672FB; }
table.email-details .table-header { background: #4e6691; color: #FFFFFF; } table.email-details .table-header p {font-weight: 700; white-space: nowrap;} table.email-details tr.alt td { background: #b1d8ef; } table.email-details tr.alt .table-header { background: #4e6691; }

After this modification the notification email will look like this:


Removing blocks

Information may be missing

Removing xslt elements may give unexpected results (e.g. information missing from the email).

To remove the Scan result link row from the notification email, the following part needs to be removed from the notification___blocked_.xsl_ template:

<tr class="alt"> <td class="table-header"> <p>Scan result:</p> </td> <td> <p> <xsl:for-each select="scan_result_links/result_link"> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="url" /> </xsl:attribute> <xsl:value-of select="result_filename" /> </xsl:element> <br/> </xsl:for-each> </p> </td> </tr>

After this modification the notification email will look like this without the scan result row: