Dr.Web ICAPD uses two types of notification templates:
1)HTML templates – they are used for generation of notifications that display as an HTML page in the browser. These notifications are displayed to the user on attempt to access a blocked resource or download an infected or suspicious object, if 'Move' or 'Report' actions was applied according to the settings. 2)Mail templates – they are used for generation of notifications that are sent to the administrator on certain events (e.g., on attempt to access to a blocked resource, download infected objects), according to the specified settings. All notification templates are ordinary text files that reside in the following directory: %etc_dir/templates/icapd[_lng], where _lng is a suffix that denotes a language used for the templates presented in this directory (for example, ru – Russian, ja – Japanese). Note that the folder with templates for English language /icapd must be always present and the language prefix is not specified in its name.
If necessary, change the folder with used notification templates. To do this, specify the correct path to it as a Templates parameter value in the configuration file. Folder with notification templates must contain the following files (the file names must not be changed):
File name
|
Description
|
ERR_FAILED_CHECK
|
HTML template to report a file scan error
|
ERR_DOWNLOAD_BLOCK
|
HTML template to report an access error on attempt to open a blocked web page (from a black list)
|
ERR_ACCESS_DENIED
|
HTML template to report a download error on attempt to download a forbidden object. This template is used if Report action was applied to the object.
|
ERR_ACCESS_DENIED_MOVED
|
HTML template to report a download error on attempt to download an forbidden object. This template is used if Move action was applied to the object.
|
email.templ
|
Mail template for e-mail messages sent to the administrator (to the address specified in Hostmaster parameter value).
|
1. HTML templates
HTML template is a correct HTML file which can include style sheets and JavaScript codes, but must not include embedded objects, images, and URLs to external resources (outside the HTML page): for example, a style sheet from an external CSS file cannot be used.
The HTML template can contain special macros - placeholders (anywhere in the HTML document). These embedded placeholders are replaced with corresponding text while an HTML page is generated based on the template.
The following placeholders can be used:
Placeholder
|
Description
|
$DAEMON_REPORT$
|
Is replaced with a line from Dr.Web Daemon report containing the reason of the occurred incident (e.g., virus detection or failure to check the file due to specified restrictions)
|
$DATE$
|
Is replaced with a line containing date and time of when the notification was generated
|
$FILE_NAME_ERROR$
|
Is replaced with the path to a file moved to Quarantine
|
$HOSTMASTER$
|
Is replaced with the Administrator's e-mail address (specified as the Hostmaster parameter value)
|
$MANUAL_SUBMIT$
|
Is replaced with the HTML form containing only one button. When the button is clicked, information on the event is sent to Doctor Web.
Caption for the button must be specified directly after the placeholder, for example:
$MANUAL_SUBMIT$Send!
|
$RELEASE$
|
Is replaced with information on the installed Dr.Web product (including product name, product version, and version of Anti-virus Engine)
|
$URL$
|
Is replaced with the full URL to the resource requested by the user
|
$URL_SHORT$
|
Is replaced with short URL to the resource requested by the user
|
$VERSION$
|
Is replaced with the current version of Dr.Web ICAPD
|
HTML template example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blocked by Dr.Web ICAPD</title>
</head>
<body>
<H1>Content blocked!</H1>
<p>Access to this resource is denied due to administration policy.<br/>
Please save content of this page and ask your
<a href="mailto:$HOSTMASTER$">system administrator</a>
for further instructions.
</p>
<H2>Details:</H2>
<p><strong>Restricted URL: </strong><a href="$URL$">$URL_SHORT$</a></p>
<p><strong>Reason: </strong><pre>$DAEMON_REPORT$</pre></p>
<H2>Product information:</H2>
<p><strong>Release: </strong><pre>$RELEASE$</pre></p>
<p><strong>Version: </strong><pre>Dr.Web ICAPD $VERSION$</pre></p>
<p>$MANUAL_SUBMIT$Notify Dr.Web</p>
</body>
</html>
2. Mail templates
The current version of the Dr.Web ICAPD uses only one mail template – email.templ. It used for messages sent to the administrator if an incident occurs. This template has the same internal structure as the structure of a correct e-mail message of the multipart/mixed MIME format.
The mail template can contain special macros - placeholders (anywhere in the message). These placeholders are replaced with corresponding text while a message for the administrator is generated based on the template.
The following placeholders can be used:
Placeholder
|
Description
|
$ACTION$
|
Is replaced with the name of the action applied to the infected object
|
$HOSTMASTER$
|
Is replaced with the Administrator's e-mail address (specified as the Hostmaster parameter value)
|
$HTML_PAGE$
|
Is replaced with the text of HTML page displayed to the user
|
$IP$
|
Is replaced with the IP address of the user who tried to download the rejected object
|
$REASON$
|
Is replaced with the reason of the occurred event (for example, virus detection or failure to check the file due to specified restrictions)
|
$SIZE$
|
Is replaced with size of the rejected object
|
$TIME$
|
Is replaced with with the string containing date and time when the notification was generated
|
$URL$
|
Is replaced with the full URL to the resource requested by the user
|
Mail template example:
From: "DrWeb-ICAP" <drweb-icapd>
To: "System Administrator" <$HOSTMASTER$>
Subject: $REASON$
Content-Type: multipart/mixed;
boundary="001-DrWeb-Icapd-Notification"
MIME-Version: 1.0
Precedence: junk
X-Antivirus-Ticket: Dr.Web notification.
--001-DrWeb-Icapd-Notification
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Url: $URL$
Reason: $REASON$
Action: $ACTION$
Time: $TIME$
Client-IP: $IP$
Object size: $SIZE$
--001-DrWeb-Icapd-Notification
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
$HTML_PAGE$
--001-DrWeb-Icapd-Notification--

|
It is strongly recommended not to change the mail template internal structure unless it is essential. Otherwise, the structure of MIME parts and headers might be accidentally corrupted.
|
You can change text of templates in the web interface Dr.Web Console for UNIX Internet Gateways on the Template page.
|