Overview
The configuration UI provides a mechanism to bulk import email addresses that should be whitelisted i.e. addresses that should never be filtered for spam. This is especially useful when you have a big list of email addresses that would otherwise take very long if they are added to the Whitelist one at a time.
This article describes the procedure to carry out the bulk import process for the Whitelist module.
Solution
The process of bulk importing email addresses/domains into the Whitelist module comprises of the following steps that should be done sequentially:
These steps are further elaborated in the next sections:
Generate a template of the Whitelist XML
The XML template can be exported from the GFI MailEssentials Configuration UI as follows:
- Open the MailEssentials configuration UI
- Expand the Anti-Spam node
- Select the Whitelist node and click on the Whitelist Tab
- Click on the Export button to generate the XML file containing the current entries in the MailEssentials Whitelist.
- The Save As dialog will prompt you to save the generated file named exported_whitelist.xml at your preferred location on your local disk.
- If you wish to keep a backup of your whitelist entries, save a copy of the XML file before making any modifications.
Edit the Generated XML file
The next step is to edit the Whitelist XML file to include any modifications you wish to make to the Whitelist. Modifications can be additions, deletions, or updates to existing entries.
Editing is done by opening the XML file using a text editor or an XML editor. The latter, if available, is preferred as it provides for syntax highlighting as well as error checking on the XML schema.
Every new entry within the whitelist is listed within the 'z:row entry'
section as follows:
<z:row description="" entry="user@domain.com" type="type number" />
Example:
<z:row description="awesome company" entry="*@gfi.com" type="1" />
Every new entry within the whitelist XML file needs to have a type ID associated with that entry. The type ID will define what rule will be applied to that whitelist entry. The following are the allowed type ID values which can be specified in the file:
- MIME to: type="0"
- MIME from: type="1"
- SMTP to: type="2"
- SMTP from: type="3"
- Recipient (SMTP and MIME to): type="4"
- Sender (SMTP and MIME from): type="5"
Note: Entries without a valid type ID will not be considered to be valid Whitelist entries and will be shown on the UI with an empty legend as shown below. These should be deleted by selecting the adjacent checkbox and clicking on the Remove button.
Add a new <z:row entry />
for every new entry you wish to include in the MailEssentials Whitelist. Once you have completed this step, save all changes to the XML file.
A sample exported_whitelist.xml file should look similar to this when the editing process is completed:
Import the Whitelist
The last step is to import the updated whitelist back into the Whitelist module configuration by following these steps:
- Open the GFI MailEssentials configuration once again
- Expand the Anti-Spam node
- Click on the Whitelist node and select the Whitelist tab
- Click in the Choose File button and browse to the path where you saved the XML file and select the updated exported_whitelist.xml file:
-
Click on the Import button.
- The bulk importation process will not have any effect on the existing whitelist entries.
- Click on the Apply button once the import is complete to save the changes
Confirmation
A successful bulk update/import is confirmed by a notification similar to the one shown below indicating the number of entries that were successfully imported.
In addition, the updated entries can be confirmed by logging on to the MailEssentials Configuration UI and navigating to GFI MailEssentials > Anti-Spam > Whitelist.
The newly Whitelisted email addresses should be visible in the Whitelist section. You may need to navigate to subsequent pages until you see the addresses you are looking for or alternatively make use of the Search button at the top of the list.
- This bulk import process will not have any effect on existing Whitelist entries. Any new entries that are included in the XML file will be added to the Whitelist, ignoring any duplicate entries that might result from the import process.
- The import XML file must be saved locally on the server where MailEssentials is installed.
- Deleting existing Whitelisted entries from the XML file will not remove them from the Whitelist. If this is desired, you have to manually select the entries from the Whitelist and click on the Remove button.