---
name: "sb_imapfilter"
section: "1"
platform: "linux"
package: "spambayes"
version: "1.1b1+git20190201.1335ca8-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/sb_imapfilter"
---

# sb\_imapfilter(1)

An IMAP filter

## NAME

sb\_imapfilter - An IMAP filter

## DESCRIPTION

An IMAP message box is scanned and all non-scored messages are scored and (where necessary) filtered.

### Usage:

-

  sb\_imapfilter \[options\]

-

  note: option values with spaces in them must be enclosed

-

  in double quotes

-

  options:

- **-p**

  dbname  : pickled training database filename

- **-d**

  dbname  : dbm training database filename

- **-t**

  : train contents of spam folder and ham folder

- **-c**

  : classify inbox

- **-h**

  : display this message

- **-v**

  : verbose mode

- **-P**

  : security option to prompt for imap password,

-

  rather than look in options\["imap", "password"\]

- **-e** y/n

  : expunge/purge messages on exit (y) or not (n)

-

  **-i** debuglvl : a somewhat mysterious imaplib debugging level

-

  (4 is a good level, and suitable for bug reports)

- **-l** minutes

  : period of time between filtering operations

- **-b**

  : Launch a web browser showing the user interface.

-

  **-o** section:option:value :

-

  set \[section, option\] in the options database to value

-

  Classify inbox, with dbm database

-

  sb\_imapfilter **-c** **-d** bayes.db

-

  Train Spam and Ham, then classify inbox, with dbm database

-

  sb\_imapfilter **-t** **-c** **-d** bayes.db

-

  Train Spam and Ham only, with pickled database

-

  sb\_imapfilter **-t** **-p** bayes.db

### Warnings:

-

  o We never delete mail, unless you use the **-e**/purge option, but we do

-

  mark a lot as deleted, and your mail client might remove that for you.  We try to only mark as deleted once the moved/altered message is correctly saved, but things might go wrong.  We \*strongly\* recommend that you try this script out on mail that you can recover from somewhere else, at least at first.

## SEE ALSO

The full documentation for **option** is maintained as a Texinfo manual.  If the **info** and **option** programs are properly installed at your site, the command

-

  **info option**

should give you access to the complete manual.
