Menu

Debugging

Matthias Andree

Debugging hints

If you think the lexer (the part of bogofilter that breaks out the works from the input) is goofing up, try running bogofilter or bogolexer again, and add -vvvv -xbilmt to the command line. Note that this produces copious output and should not be placed in cron jobs, mail filters, or thereabouts.

The full list of debug flags is in the source tarball in debug.h, excerpt shown below:

#define BIT_NAMES       "abcdghilmrstuwyz"
#define BIT_ALGORITHM   MASK_BIT('A')
#define BIT_READER      MASK_BIT('B')
#define BIT_CONFIG      MASK_BIT('C')
#define BIT_DATABASE    MASK_BIT('D')
#define BIT_GENERAL     MASK_BIT('G')
#define BIT_HTML        MASK_BIT('H')
#define BIT_ICONV       MASK_BIT('I')
#define BIT_LEXER       MASK_BIT('L')
#define BIT_MIME        MASK_BIT('M')
#define BIT_MULTI       MASK_BIT('U')
#define BIT_REGISTER    MASK_BIT('R')
#define BIT_SPAMICITY   MASK_BIT('S')
#define BIT_TEXT        MASK_BIT('T')
#define BIT_WORDLIST    MASK_BIT('W')
#define BIT_MEMORY      MASK_BIT('Y')
#define BIT_TEST        MASK_BIT('Z')

These are the bits you would add to the -x option. For instance, -xl would enable lexer debugging, -xlm would enable lexer and MIME debugging. Whether you use capital or small letters does not matter.

The "-v"s are to raise the output level, some debug output is only generated at high verbosity levels.