Remote Commands

Remote commands facilitate adding domains or email addresses to the Email Blocklist/Whitelist, as well as update the Bayesian filter with spam or ham (valid emails).

Remote commands work by sending an email to GFI MailEssentials. Addressing an email to rcommands@mailessentials.com (configurable) will have GFI MailEssentials recognize the email as containing remote commands and processes them as described below.

With remote commands, the following tasks can be achieved:

  1. Add Spam or ham to the Bayesian Analysis database.
  2. Add keywords either to the subject keyword checking feature or to the body keyword checking feature.
  3. Add email addresses to the Email Blocklist filter and Whitelist.

Configuring remote commands

1. Click Anti-Spam > Anti-Spam Settings, go to Remote Commands tab and select Enable remote commands.

2. Edit the email address to which remote commands should be sent to.

NOTE

The email address should NOT be a local domain. The default address is rcommands@mailessentials.com. A mailbox for the configured address does not need to exist, but the domain-part of the address must consist of a real email address domain that returns a positive result to an MX-record lookup via DNS. This can also be a public email account that you can manage (for example Gmail or Yahoo mail)

3. Optionally, configure some basic security for remote commands:

4. Click Apply.

Using remote commands

Remote commands can be sent via email to GFI MailEssentials from an email client within the domain. Conditions for sending remote commands:

  • The email must be in Plain Text format
  • The subject of the email is ignored
  • The following syntax must be used for all commands:

<command name>: <parameter1>, <parameter2>, <parameter3>, … ;

For example: ADDBLIST: spammer@spam.com;

  • There can be more than one command in the body of an email with each command separated by a semi-colon (;).
  • If a password is configured for remote commands, enter the password in the first line using the following syntax:

PASSWORD: <shared password>;

  • Command names are case-sensitive and should be written in UPPERCASE only.
  • Conditions such as IF, AND, OR are not supported.
  • Remote commands can only be used to add entries and not delete or modify existing entries.

Keyword commands

Use keyword commands to add keywords or combination of keywords in the body or subject lists in Keyword Checking filter.

Available commands are:

  • ADDSUBJECT - Adds keywords specified to the subject keyword checking database.
  • Example: ADDSUBJECT: sex, porn, spam;
  • ADDBODY - Adds keywords specified to the body keyword checking database.
  • Example: ADDBODY: free, “100% free”, “absolutely free”;

NOTE

When configuring phrases other than a single words, enclose them in double quotes (“ ”).

Blocklist commands

Use blocklist commands to add a single email address or an entire domain to the email blocklist.

Available commands are:

  • ADDBLIST: <email>;
  • Example: ADDBLIST: user@somewhere.com;

NOTES

1. Add an entire domain to the blocklist by specifying a wildcard before the domain

Example: ADDBLIST: *@domain.com;

2. Wildcards cannot be used in domain names.

Example: ADDBLIST: *@*.domain.com; is invalid and will be rejected.

3. For security reasons, there can be only one ADDBLIST command in an email, and only one address can be specified as the command parameter. The parameter is either a user email or a domain:

Example: ADDBLIST: spammer@spam.com; or ADDBLIST:*@spammers.org;

Bayesian filter commands

Add spam email or valid email (ham) to the Bayesian filter database. Available commands are:

Command Description
ADDASSPAM Instructs Bayesian filter to classify email as spam.
ADDASGOODMAIL Instructs Bayesian filter to classify email as HAM.

NOTE

These commands do not have parameters - the content of the email is the parameter.

Remote command logging

To keep track of changes made to the configuration database via remote commands, each email with remote commands (even if the email with remote commands was invalid) is saved in:

<GFI MailEssentials installation path>\GFI\MailEssentials\AntiSpam\ADBRProcessed\

The file name of each email is formatted according to the following format:

  • <sender_email_address>_SUCCESS_<timestamp>.eml - in case of successful processing.
  • <sender_email_address>_FAILED_<timestamp>.eml - in case of failure.

NOTE

Timestamp is formatted as yyyymmddhhmmss.