A guide to Content Control in
Pegasus Mail and Mercury/32.

This document is last updated 29-November-2004.

Why does this page only refers to Mercury/32?

Mercury/32 version 4.01a and Pegasus Mail version 4.2 share exactly the same code for Content Control. The pages you are reading right now are created from the help file in Mercury/32.
You can read "Pegasus Mail" everywhere you read "Mercury".
Just for the record: Mercury/NLM (for Novell) does not have this feature.

Can we share???? YES, let's do that!!!

Did you create a content control rule that traps much of your spam and which is not yet in the spambust.dat file, please share that rule with me so David Harris can decide to add it to the master spambust.dat file.

You can get my own additions to the spambust.dat file by sending me a message with the subject send_spamadd (doublclick to send).

For sure the reply will be triggered by your content control setup so make sure to either whitelist me or keep an eye out for the message in your junk folder.
The message/file will be sent as soon as my computer get's on-line.

What is the Content Control feature anyway??

Let's face it, the worst thing about e-mail is having to wade through dozens of unwanted messages offering unwanted products and services every day - this kind of unsolicited commercial e-mail (more commonly-known as "UCE", or "spam") has become the bane of our existence in the last couple of years. Unfortunately, while spam is obviously a social problem, not a technical one, legislators around the world have been extraordinarily lax, even incompetent in their attitude towards it. As a result, we're left with no real protection from spam, even though it wastes a huge part of the Internet's dwindling resources each day.

Mercury and Pegasus Mail both provide a fully-integrated approach to handling this type of unwanted mail, but takes the notion even further, by allowing you to define for yourself what constitutes "unacceptable content" in both the e-mail sent to your site, and the e-mail sent from your site.

Just an advise: Do NOT alter the default spambust.dat file. Instead create your own additional CC-Set and create a separate file to store your own rules in. When you leave the original file unchanged, you can take advantage of the regularly updated file without modifications.

Using Content control you can create sets of tests that Mercury applies to every message it processes: each set consists of three separate and optional tests

What tests can be performed

A blacklist check
You can create a blacklist of addresses and sites from which all mail is regarded as unacceptable.

A whitelist check
This is like the blacklist, except that all addresses and sites that appear in the list are never treated as unacceptable.

A rule set check: For messages that are not caught by the blacklist or whitelist, you can create arbitrarily complex sets of rules to test the content of the message. These rules are like Mercury's general-purpose filtering rules, but are more specific to the particular task of content evaluation, allowing unlimited numbers of "and" operations to link conditions together.
Also, unlike general purpose rules, content testing rules are given a "weight": when all the rules have been processed, the weights of all the rules that were triggered are added together, and the final result is compared against a predetermined value you assign. If the combined weight of the message is greater than or equal to your preset value, the message is regarded as unacceptable. Content rule sets are stored as text files that can be easily modified using any text editor. They have a simple syntax that most system administrators should be able to learn in a very short time.

What actions can be performed

Each content control set has an action, which is applied when a message is deemed to have unacceptable content, this action can be

  • to delete the message
  • to quarantine it for later examination
  • to forward it to an alternative address
  • to add headers to it
  • to return it to the sender
  • or simply to do nothing.

You can have as many content control sets as you wish - Mercury will apply them in the order they appear in the list in the Content control configuration dialog: the first set that results in the message being quarantined, deleted, or otherwise removed from circulation will terminate content control processing for that message

Using the Content control dialog in Mercury and Pegasus Mail

To create a new content control definition, click the "Add" button, click here for detailed information on the various settings associated with a single control set.

To change the values for a single content control definition, select the definition in the list and click the "Edit" button.

To remove a content control definition, select it in the list and click the "Delete" button: Mercury will ask you if you want to delete the list and rule files associated with the definition as well as the definition itself - if you use the lists or rules in other definitions as well, you should not delete them.

To adjust the position of a content control definition in the list, select it and click the "Move up" or "Move down" button. The position of a definition in the list is important, because Mercury applies them in the order they appear, and stops applying definitions to a message when a definition results in the message being deleted or otherwise removed from circulation.

Content control definitions are stored in files with the extension .PNC in the program directory: each .PNC file contains a single definition. The name of the .PNC file is unimportant - Mercury/32 assigns a name at random when you create a definition, but you can rename them if you wish, provided Mercury/32 is not running when you do so.

Info files
Each content control definition can have an Information file associated with it: this is a simple text file containing information about the definition, and is displayed by Mercury in the Information on the selected set area of the content control definition editor dialog. The info file should have the same name as the definition file, but with ".info" added to it: so, if the file containing the definition is called BASIC.PNC, its information file would be called BASIC.PNC.INFO. Info files are useful if you plan to distribute your definitions; they cannot be created or edited within Mercury - they must be created manually.

Distributing definitions
If you create a definition that you would like to share with other Mercury users, all you need to do is provide the .PNC file containing the definition, the ruleset file, a .info file (if you wish) and any preconfigured blacklist or whitelist files the definition needs (these are optional). The recipient simply places these files in their Mercury install directory and restarts the program. Note that when designing a .PNC file for distribution, you should make sure that the whitelist, blacklist and ruleset filenames in the file do not have paths - this tells Mercury to look for them in its install directory.

Where can you get the latest CC-file

The latest version of spambust.dat will be available from our web site later.

How to proceed:

Each page in this section has a "NEXT" link. You will know everything you need to when you read all pages.

Next: Define a Content Control definition.


If you have more information that should be placed on those Content Control pages, please feel free to contact me by e-mail and I will make that information available.
Back to Han's Linkpage