Used Macros

The following macros can be used in any template:

Macro

Description

$LC*$

Replaced with a string that have the specified number in a language files (* – decimal number of the string; for example,$LC150$).

The used language file is determined by the $LANG$ macro.

Conversion of the result text to the required encoding is configured by the values of the $CHARSET$ and $CONTENT_TRANSFER_ENCODING$ macros

$POSTMASTER$

Address to which all notifications are sent (value of the AdminMail parameter from the [Notifier] section is used)

$FILTER_MAIL$

Address used by Dr.Web MailD (value of the FilterMail parameter from the [Notifier] section is used)

$HOSTNAME$

Name of the host on which Dr.Web MailD is operating (value of the Hostname parameter from the [General] section is used).

This macro cannot be used in loops; for details, refer to Control constructions

$LANGS$

Contains the list of languages on which notifications are generated (values of the NotifyLangs parameter from the [Notifier] section are used).

This macro can have a list as a value and can be used in loops; for details, refer to Control constructions

$LANG$

Name of the language on which this part of a notification is generated.

The macro value defines interpretation of some other macros (for example, $CHARSET$)

$CHARSET$

Set of the current language characters. The character set is specified in the language file.

Name of the currently used language is specified by the $LANG$ macro

$CONTENT_TRANSFER_ENCODING$

Content-Transfer-Encoding for the current language. The value for a certain language is specified in the language file.

Name of the current macro is specified by the $LANG$ macro

$TYPE$

Notification content type (HTML or PLAIN).

The content type is specified by the html parameter in the message processing Rules.

$FULLHEADERS$

Complete set of mail message headers.

$MSGID$

Internal message identifier in MTA which transmitted the message

$SUBJECT$

Message subject (empty if the subject is not specified).

When inserted to the generated message, the macro value is converted, if required, according to $CHARSET$ and $CONTENT_TRANSFER_ENCODING$ macro values.

$DIRECT_SUBJECT$

Message subject (empty if the subject is not specified).

Is not converted to another encoding or CTE when inserted.

$SENDER$

Address of the original message sender

$RCPTS$

List of all message recipient addresses.

This macro can have a list as a value and can be used in loops; for details, refer to Control constructions

$SECURE_RCPTS$

This macro is similar to $RCPTS$ if the message has only one recipient. Otherwise, the macro value is set to "Recipients of original message" <#@[]>

$LOG_REPORT$

Records from the Dr.Web MailD log file that contain information on processing of the message on which the notification is generated

$STOP_REASON$

Record from the Dr.Web MailD log file that contain the reason for sending this notification

$REPORT$

Plug-in report on analysis of the message on which the notification is generated

$MESSAGE_STATUS$

Status of the original message specified by POP3 and IMAP filters according to the processing results.

This macro can have one of the following values: reject, discard, tempfail, and error.

$BLOCK_LIST$

List of strings describing reasons to block the message by a plug-in (more than one reason is possible). For example, if a threat is detected, Drweb plug-in returns the threat name. If the message is blocked due to another reason (for example, as a reaction to a SkipObject event), the plug-in returns a full value of the configuration string <parameter> = <value>, which caused the message block.

$SCAN_STAT$

Statistics on results of the plug-in message check

$ARCHIVE_RECORD$

Name of the file in Quarantine

$ORIGINAL_MESSAGE$

Body of the original message for which notification is generated.

Be careful when inserting the macro in a notification: if, for example, the original message body contained a virus, the generated notification could be blocked by another anti-virus system!

$R_MAILS$

List of addresses to which notifications are to be sent.  The macro value is specified in the Mail parameter in the [Reports] section.

This macro can have a list as a value and can be used in loops; for details, refer to Control constructions.

$CO_CLIENT_IP$

IP address of the client that transmitted the message (if known)

$CO_CLIENT_PORT$

Port number used by the client which transmitted the message (if Receiver provided this information)

$CO_AUTH$

The value is set to yes, if the client which sent the original message is successfully authorized (if Receiver provided this information)

$CO_SERVER_UNIX_SOCK$

Name of the UNIX socket which was used by Receiver to get the original message (if Receiver provided this information)

$CO_SERVER_IP$

IP address of the listening socket which was used by Receiver to get the original message (if Receiver provided this information)

$CO_SERVER_PORT$

Port of the listening socket which was used by Receiver to get the original message (if Receiver provided this information)

$CO_RS_ID$

Identifier of Receiver which got the original message (if this Receiver instance was started with a non-empty identifier)

$CO_SENDER_ADDRESS$

Address specified in the SenderAddre parameter value in Rules for the message

$Q_CONTROL_BY_EMAILS$

The value is set to yes, if control messages for Quarantine management are allowed

$TEMPLATES_DIR$

Name of the directory with notification templates.

The path is also used for search of all files specified in the template in the include directive; for details, refer to Control constructions

$Q_REMOVE_TIME$

Time when the message was deleted from Quarantine (an empty string if the period of storing a message is not restricted)

$PRODUCT$

The following string: "MailD"

$EXT_PRODUCT$

The following string: "for Unix mail servers"

The following macros used in statistics reports

Macro

Description

$R_PLUGINS$

List of plug-ins for which statistics reports are generated.

The value is specified in the Names parameter from the [Reports] section.

This macro can have a list as a value and can be used in loops; for details, refer to Control constructions

$R_PERIOD$

Time period during which statistics reports are generated

$RP_NAME$

Plug-in for which the statistics report is generated

$RP_BLOCKED_OBJECTS_WITH_NUM_AND_PERCENTS$

Calculated statistics on blocked objects for the plug-in specified in the $RP_NAME$ macro value

$RP_SENDERS_ENVELOPE_WITH_NUM_AND_PERCENTS$

Statistics on senders of the blocked objects for the plug-in specified in the $RP_NAME$ macro value

$RP_CLIENT_IP_WITH_NUM_AND_PERCENTS$

Statistics on IP addresses blocked by the plug-in specified in the $RP_NAME$ macro value

$RP_BLOCKED_OBJECTS_NUM$

Number of blocked objects included in the statistics.

If the macro value is 0, objects are not output. If the value is –1, all blocked objects are output. In other cases, the specified number of objects is output.

Depends on the $RP_NAME$ macro value

$RP_SENDERS_ENVELOPE_NUM$

Number of senders included in the statistics on blocked objects.

If the macro value is 0, senders of blocked objects are not output. If the value is set to –1, all senders of blocked objects are output. In other cases, the specified number of senders is output.

Depends on the $RP_NAME$ macro value.

$RP_CLIENT_IP_NUM$

The number of IP addresses  included in the statistics on blocked objects.

If the value is 0, no IP address is output. If the value is set to –1, all IP addresses are output. In other cases, the specified number of IP addresses is output..

Depends on the $RP_NAME$ macro value.

$RP_TEMPFAIL_SIZE$

Total size of messages for which the plug-in specified in the $RP_NAME$ macro applied the tempfail action

$RP_PASS$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied the pass action

$RP_REJECT$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied the reject action

$RP_DISCARD$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied the discard action

$RP_TEMPFAIL$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied the tempfail action

$RP_REJECT_PLUS_TEMPFAIL$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied reject or tempfail action

$RP_QUARANTINE$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied the quarantine action

$RP_REDIRECT$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied the redirect action

$RP_NOTIFY$

Number of messages for which the plug-in specified in the $RP_NAME$ macro applied the notify action

$RP_PASS_SIZE$

Total size of messages for which the plug-in specified in the $RP_NAME$ macro applied the pass action

$RP_REJECT_SIZE$

Total size of messages for which the plug-in specified in the $RP_NAME$ macro applied the reject action

$RP_DISCARD_SIZE$

Total size of messages for which the plug-in specified in the $RP_NAME$ macro applied the discard action

$RP_REJECT_PLUS_TEMPFAIL_SIZE$

Total size of messages for which the plug-in specified in the $RP_NAME$ macro applied the reject or tempfail actions

$RP_QUARANTINE_SIZE$

Total size of messages for which the plug-in specified in the $RP_NAME$ macro applied the quarantine action

$RP_REDIRECT_SIZE$

Total size of message for which the plug-in specified in the $RP_NAME$ macro applied the redirect action

$RP_NOTIFY_SIZE$

Total size of messages for which the plug-in specified in the $RP_NAME$ macro applied the notify action

$RP_BLOCK_PERC$

Total per cent of messages blocked by the plug-in specified in the $RP_NAME$ macro

$RP_BLOCK_SIZE$

Total per cent of messages blocked by the plug-in specified in the $RP_NAME$ macro

$RP_CHECK_TIME_SUM$

Total time required to check messages by the plug-in specified in the $RP_NAME$ macro

$RP_CHECK_TIME_AVR$

Average time required to check messages by the plug-in specified in the $RP_NAME$ macro

$RP_CHECKED_MSGS$

Total number of messages checked by the plug-in specified in the $RP_NAME$ macro

$RP_CHECKED_SIZE$

Total size of all messages checked by the plug-in specified in the $RP_NAME$ macro

$RP_AGENT_STAT_UUID$

UUID of the switch used by Dr.Web Agent for sending statistics to the Dr.Web statistics server or to the central protection server (the macro value is an empty string if this option is disabled)