Import and Export spamBlocker Exception Rules

If you manage several Fireboxes, or use spamBlocker with more than one proxy policy, you can import and export exception rules between them. This saves time because you must define the rules only once.

You can transfer exception rules between proxies or Fireboxes in two ways:

  • You can write an ASCII file that defines the rules and import it to other Fireboxes or proxy policies.
  • Define exception rules in Policy Manager, export the exception rules to an ASCII file, and import that file to another Firebox configuration file or proxy policy.

Write Rulesets in an ASCII File

You can write rules in a normal ASCII file that uses the standard UTF-8 character set.

You must include only one rule per line. The syntax for rules is:

[action, <tag>,] sender [, recipient]


action = Allow, Add subject tag <tag>, Quarantine, Deny, or Drop. (Quarantine, Deny, and Drop are not supported by the IMAP or POP3-proxy.) The default action is Allow.

tag = The identifier you want to add to the email messages. The identifier must be enclosed in angle brackets.

sender = Email address ([email protected]) or pattern (* The default is all senders.

recipient = Email address ([email protected]) or pattern (* The default is all recipients.

The fields enclosed in brackets are optional. If you omit them, the default values are used.

To add comments to a file, precede the comment with a number sign (#). Make sure the comment is on its own line.

Here is an example of a spamBlocker exception rules file:
# allow all email from *
# use **SPAM** tag on all email from Add subject tag, <**SPAM**>, *
# deny all email from to [email protected] Deny, *, [email protected]

Import an ASCII Exceptions File

To import spamBlocker exceptions to a spamBlocker configuration, from Policy Manager:

  1. Edit the spamBlocker configuration.
  2. From the Exceptions section of the spamBlocker Configuration dialog box, click Import.
  3. Select the ASCII file. Click Open.
  4. If exceptions are already defined in spamBlocker, select whether to Replace the existing rules or Append the imported rules to the list of existing rules.
    If you click Append, the imported rules appear in the Exceptions section under any existing rules. To change the order of the exception rules, see Change the Order of spamBlocker Exceptions.

If you import a rule with the Deny action into the Exceptions list for a POP3 or IMAP-proxy, an error message appears.

Export Rules to an ASCII File

When you export exception rules from a proxy policy, Policy Manager saves the current rules to an ASCII text file.

To export spamBlocker exception rules, from Policy Manager:

  1. Edit the spamBlocker configuration that contains the rules you want to export.
  2. In the spamBlocker Configuration dialog box, on the Exceptions tab, define exceptions as described in Add spamBlocker Exception Rules.
  3. Click Export.
    The Open dialog box opens.
  4. Select where you want to save the exceptions file. Click Save.
    You can now open another SMTP, IMAP, or POP3-proxy definition in the same or in a different Firebox configuration file and import the exceptions file.

Log Exceptions

To send a log message each time an email message matches an exception rule, in the Exceptions tab, select the Send log message for each email that matches one of the above exceptions check box.