Rule Filename Conventions

SpamAssassin rules files typically look like this: or The convention is:

  • a two-digit number at the start of the file
  • some descriptive text
  • ending in ".cf"


These have grown organically, and are just conventions – so take this with a pinch of salt!

These are ordered with SpamAssassin in mind, particularly the way it reads the files in sorted order, so lower numbers are read first. The convention goes like this:

  • default values for settings/preferences: typically 10
  • rules: typically 20-25
  • translations: typically 30 (defined after the rules are)
  • scores: 50-60
  • settings to configure whitelist/blacklist/shortcircuit rules: 60
  • sandbox stuff: 70 (NOTE: see below)

Note that files at level 70 in the SpamAssassin distribution's rules dir are not installed by "make install". That's a magic level.

All the others are approximate.

Descriptive Text

Our convention is to use all lower case, no spaces, characters from the set
/[-_0-9a-z.]/ .


Rules files have to end in ".cf", otherwise SpamAssassin will ignore them. Plugins have to end in ".pm".

  • No labels