5.9. 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.
Syntax
In header keys only a specific set of characters are allowed. Custom headers 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.
Same value as in profile
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: 4.6. Server profiles.
Example
Server profile setting |
Header |
|
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 4.6. Server profiles.
Examples
Server profile setting |
Header |
|
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 4.10. Quarantine configuration.
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 4.4. Policy.