# Troubleshooting SpamBayes sb_server

This is a list of common problems, and hopefully their solutions. Please feel free to suggest additional topics. Currently, we have the following problems listed:

- I did the SpamBayes configuration, but my mail doesn't filter
- Mail doesn't filter and there is a "X-SpamBayes-Exception header"
- All other problems

Some other resources that may be useful in tracking down any problems:

- There is an online FAQ for SpamBayes with lots of information.
- The latest online version of this document may have information added since release.

If you must send someone a mail about SpamBayes, please read this first.

## I did the SpamBayes configuration, but my mail doesn't filter

Have you changed your mail client to connect to "localhost", instead of directly to your mail server? SpamBayes acts as a "proxy", which means that your mail client asks for new mail via SpamBayes, so that SpamBayes can add some information to incoming mail about what type of mail it thinks that message is.

## Mail doesn't filter and there is a "X-SpamBayes-Exception header"

If mail stops filtering, have a look at the headers of a message. If it doesn't have a "X-SpamBayes-Classification" header, but does have a "X-SpamBayes-Exception" header, this means that something is going wrong when SpamBayes tries to classify the message. It's ok if this happens with one or two messages, but if this happens to every message, something is wrong.

The most common reason is that something has happened to your database - if this is the case, then the Exception header probably has "DBRunRecovery" in it. Information about this problem rapidly changes, so please see the online FAQ for more information.

For all other problems, please send us a mail, including a copy of the information in the X-SpamBayes exception header.

## All other problems

If you are simply unsure about what SpamBayes is doing, please send a mail to the SpamBayes mailing list with as much information as possible. If you are fairly sure you have struck a bug, then please report it. Please do not mail any of the contributors directly.

## Process Descriptions

This explains some of the processes above in more detail.

### Determine your installation type.

If you are running from Python source code, and installed Python, plus SpamBayes as separate components, then you are running the source code version. If you downloaded an installer .EXE file, then you are running the binary version. If you ran the "sb_service" application, then you are probably running as a service (although note that SpamBayes will try to fall back to a regular binary version if the service is unavailable).

### Check the log file

Determine your installation type. If you are running the source code version, you will need to run sb_server in a command window to get the error messages, unless you are running as a service.
If you are running as a service and/or the binary version, then SpamBayes writes a log in your Windows temp directory. This directory is generally \WINDOWS\TEMP for Windows 9x, or \Documents and Settings\{username}\Local Settings\Temp for Windows 2000/XP.

Note that by default, in Windows 2000 and XP, Windows Explorer will not show the Local Settings directory, as it is hidden. You can convince Windows Explorer to show this directory (and therefore allow you to see the Temp directory under it by doing either:

- Select the folder \Documents and Settings\{username}. This directory should be reflected in the Address Bar. In the Address Bar, simply type at the end "\Local Settings" (thereby giving that full path name), and press Enter. Explorer will then show this folder.

or

- Select Tools->Folder Options, select the View tab, and in the list, select Show hidden files and folders. Select OK. This folder will now be visible. You may like to then reset this option back to the default value.

For binary users, the log file for the most recent execution of sb_server is named SpamBayesServer1.log , the second most recent is named SpamBayesServer2.log, and so on for the four previous runs. For those that run as a service, the files are named SpamBayesService1.log, and so on. You can view these files with notepad. Usually, you will simply see messages which indicate that SpamBayes is doing its job; however in some cases there will be errors in this file. If there are errors, please report a bug.

### Locating your Data Directory

SpamBayes stores all configuration and database information in a single directory. By default, this directory is located under the user's Application Data directory. At the top of the Configuration Page in the web interface the full path to your configuration file is listed - this will almost certainly be in your Data Directory. If you need to locate it by hand, on Windows NT/2000/XP, it will probably be C:\Documents and Settings\[username]\Application Data\Spambayes, or on other versions of Windows it will probably be C:\Windows\Application Data\Spambayes. Note that the Application Data folder may be hidden, so Windows Explorer may not show it by default, but you can enter the path into the Address Bar and Explorer will open it.
Note that by modifying the configuration files, you can tell SpamBayes to store this data in any directory, so it is possible your data is being stored elsewhere - contact your network administrator if this appears to be the case.

### Report a bug

All SpamBayes bugs are maintained in this page at sourceforge. Please have a check of the bugs already reported to see if your bug has already been reported. If not, open a new bug, making sure to set the Category to pop3proxy, and setting the Group to the appropriate version. Please also ensure you attach the log file to the bug.
If you are unsure about the bug, or need any assistance, please send a mail.

### Send a mail

If all else fails, you may want to send someone a mail. Please make sure you have read this document thoroughly before doing do.
Your mail should be sent to the SpamBayes mailing list (spambayes@python.org) Please do not mail any of the contributors directly (see "good karma" below).
Please ensure this mail contains:

- the version of Windows you are using
- the version of SpamBayes
- any log files.

If you also mention that you read this trouble-shooting guide and are still stuck, then you will be more likely to get answered! (And if you can subscribe to this mailing list and help answer other questions, good karma will come your way!)