Import and Export spamBlocker Exception Rules

If you manage several Fireboxes, or use spamBlocker with more than one proxy definition, 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.
  • You can use Policy Manager to define the exception rules, export the file to an ASCII file, and import that file into another Firebox configuration file or proxy definition.

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 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. Find the ASCII file and click Open.
  4. If exceptions are already defined in spamBlocker, you can choose whether to replace the existing rules or append the imported rules to the list of existing rules. Click Replace or Append.
    If you click Append, the imported rules appear in the Exceptions block under any existing rules. If you want to change the order of the exception rules, see Change the Order of spamBlocker Exceptions.

If you import a rule with the Deny exception 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 definition, 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.
  4. In the Open dialog box, select where you want to save the exceptions file and 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

Select the Send log message for each email that matches one of the above exceptions check box if you want a message written to the log file each time an email message matches an exception rule.