4.6 Specific email headers

The following email headers are added once the email is processed by MetaDefender Email Gateway Security. These headers can be used for example for custom rules on mail servers such as spam rules using X-Metadefender-Core-Result.

In header keys only a specific set of characters are allowed. 153230588 are validated for allowed characters.

In header values only a specific set of characters are allowed. If a forbidden character is provided (for example : (colon, which is the separator between the header key and value)), then the whole value gets encoded.

For details see the Syntax of encoded-words section in RFC 2047.

Identification header

X-MD-Email-Security-Id

This header contains the unique identifier of this email within MetaDefender Email Gateway Security.

Scan information headers

X-Metadefender-Core-Url

This header contains the MetaDefender Core REST API URL used in scanning operations for this email.

This header will contain exactly the same value that is configured for the appropriate server in the applied server profile. For details about server profiles see: 3.7 Server profiles.

Example

Server profile setting

Header

images/download/attachments/2979068/image2018-2-12_13-27-28.png

X-Metadefender-Core-URL: http://127.0.0.1:8008

X-Metadefender-Core-Result

This header value will contain the MetaDefender Core process result. For Blocked results, the reason is also displayed (separated by a / character).

Examples

Header

Description

X-Metadefender-Core-Result: Allowed

None of the scan engines found a threat in the email and thus it was treated as clean.

X-Metadefender-Core-Result: Blocked/Dirty

Some (or all) of the scan engines found threat(s) in the email.

X-Metadefender-EmailSecurity-Sanitized

This header is added to all emails indicating whether the email have been sanitized by the Email Gateway Security or not (header value: True or False ).

X-Metadefender-EmailSecurity-OriginalCopy

This header is added to all original copies of blocked or sanitized emails (header value: True).

X-Metadefender-Core-Rule

This header value will contain the name (or the value Automatic) of the MetaDefender Core rule that was configured to be used to scan this email. For details see 3.7 Server profiles.

Examples

Server profile setting

Header

images/download/attachments/2979068/image2018-2-12_13-28-1.png

X-Metadefender-Core-Rule: File scan

X-Metadefender-Core-Rule: Automatic

External quarantine header

X-Metadefender-To-Quarantine

If external quarantining is configured then this header is added to every email that is to be quarantined. For details see 3.6.1 Quarantine emails on another mail server.

Sender policy framework lookup header

X-Metadefender-Spf-Result

If performing SPF lookups is enabled then this header is added to every email containing the validation results. For details see the Sender Policy Framework lookup section in 3.4 General settings.

Custom headers

In addition to the above headers, Email Gateway Security can also add custom headers to every email processed. These headers are configured in the security policy.

For details see the Actions and Advanced scan settings sections in 4.2 Security rules.