Overview
GFI MailEssentials adds internal server information to external email:
x-originating-ip: [<IP address>]
x-gfi-smtp-submission: 1
x-gfi-smtp-hellodomain: <server FQDN>
x-gfi-smtp-remoteip: <IP address>
This article provides a way of disabling X-Headers if organizations do not wish these headers to be included in outbound emails.
Information
X-headers are user-defined header fields that exist in the email message header. X-headers are not specifically mentioned in RFC 2822 but the use of an undefined header field starting with "X-" has become an accepted way to add unofficial header fields to a message. X-header fields are usually preserved but ignored by messaging servers and clients that don't use them and organizations may opt to disable the headers from their outbound emails.
MailEssentials appends the following X-Headers when processing emails for spam and malware:
- X-GFI-SMTP-Submission
- X-GFI-SMTP-HelloDomain
- X-GFI-SMTP-RemoteIP
- X-GFIME-MASPAM (optional X-Header for the spam tagging action)
- X-GFIME-BLOCK-REASON
With these extra headers, the administrator can use other third-party software to process emails containing such headers. An example use case would be for E-mail archiving by GFI MailArchiver.
X-GFIME-BLOCK-REASON is the X-Header that appends the Block Reason to the email subject by adding the reason why an email was considered to be spam to the subject of the email.
Currently, only this X-Header can be disabled from the configuration UI:
- Navigating to GFI MailEssentials > Anti-Spam > Anti-Spam Settings
- Under the General tab, uncheck "Append an XHeader to the headers with the blocked reason"
- Click Apply to save the setting.
Disabling the option to add Spam X-Header (X-GFIME-MASPAM) to emails is done through the Registry Editor by following these steps:
- Open the registry editor by going to Start > Run and type regedit
- x86 machine: navigate to HKEY_LOCAL_MACHINE\SOFTWARE\GFI\MailEssentials\Antispam\Config
- x64 machine: navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GFI\MailEssentials\Antispam\Config
- Edit addmaspamxheader and set its value to 0 to disable the X-GFIME-MASPAM header
- Close the registry editor
- Re-start all GFI MailEssentials services
All the other X-Headers (X-GFI-SMTP-Submission, X-GFI-SMTP-HelloDomain, and X-GFI-SMTP-RemoteIP) cannot be disabled from the configuration UI or MailEssentials registry as these are always appended when any email is processed by the MailEssentials filters.
A workaround that can be used in Exchange environments is to create Exchange Transport Rules to strip the unwanted X-Headers as described below:
- Create a transport rule in Exchange to match the messages having the unwanted X-Headers.
- Select "Remove this header", and input the respective X-Header values.
Multiple rules might be needed to be created for all the X-Headers that you need to strip.