4.2.1 Disclaimer variables
Starting from version 4.4.0 you can add some predefined variables to the disclaimers to show additional email specific information there.
Variable format
The common format of a variable looks like this: %[<prefix>]<variable_name>[<placeholder>]%
A variable contains three parts:
-
prefix: this text will be displayed before the value of the variable if the value is not empty or there is a placeholder defined
-
variable_name: the name of the variable
-
placeholder: this text will be displayed if the vale of the variable is empty
Examples:
Variable |
Value |
Output in disclaimer |
%[]email_subject[]% |
Test subject |
Test subject |
%[]email_subject[]% |
"" |
"" |
%[Subject: ]email_subject[]% |
Test subject |
Subject: Test subject |
%[Subject: ]email_subject[]% |
"" |
"" |
%[Subject: ]email_subject[No subject]% |
"" |
Subject: No subject |
%[]email_subject[No subject]% |
"" |
No subject |
%[]email_subject[No subject]% |
Test subject |
Test subject |
Available variables
Generally available variables
The following variables are available for any disclaimer:
-
email_date
-
email_sender
-
email_recipients
-
email_subject
-
email_message_id
-
origin_ip
-
scan_verdicts
Specific variables
Emails with encrypted attachments
The following variables are available for disclaimers to emails with encrypted attachments only:
Variable |
Description |
||||
rescan_link_url |
Replaced by the Settings > Global Settings / PUBLIC SERVER ADDRESS (see 3.4 General settings). If the PUBLIC SERVER ADDRESS is not set then the "Your administrator did not set a public server address for rescan" text will be displayed instead. |
||||
rescan_link_expiry |
Replaced by the Settings > Global Settings / RESCAN LINK AVAILABILITY value (see 3.4 General settings). |
||||
rescan_link_expiry_time |
Replaced by the date and time value calculated using the Settings > Global Settings / RESCAN LINK AVAILABILITY value. Calculation method The date and time value is calculated as: (Time of email arrival to Email Gateway Security) + (Settings > Global Settings / RESCAN LINK AVAILABILITY) UTC or server local time The value of Settings > Global Settings / USE THE SERVER'S LOCAL TIMEZONE INSTEAD OF UTC affects the format of this value:
|
Example disclaimer with variables
Here is an example disclaimer for blocked contents:
---
MetaDefender Email Gateway Security has removed one or more attachments in this email because it contained potentially malicious embedded objects. For more information on MetaDefender Email Gateway Security, please visit https://www.opswat.com/products/metadefender/email-security.
%[Date: ]email_date[]%
%[Sender: ]email_sender[]%
%[Recipients: ]email_recipients[]%
%[Subject: ]email_subject[]%
%[Message ID: ]email_message_id[]%
%[Origin IP: ]origin_ip[]%
%[Scan verdicts: ]scan_verdicts[]%
And an example result after sending an infected attachment:
---
MetaDefender Email Gateway Security has removed one or more attachments in this email because it contained potentially malicious embedded objects. For more information on MetaDefender Email Gateway Security, please visit https://www.opswat.com/products/metadefender/email-security.
Date: 2018-08-15 13:07:51 UTC
Sender: test1@test.com
Recipients: test2@test.com
Subject: Eicar attachment
Message ID: 90b5cc66-cf5d-9ef5-9ac8-4f9dcce083aa@test.com
Origin IP: 127.0.0.1
Scan verdicts: Eicar attachment/eicar.com: Infected