Next: BBDB Whitelists, Up: Spam Back Ends

##### 9.18.6.1 Blacklists and Whitelists

— Variable: spam-use-blacklist

> Set this variable to `t` if you want to use blacklists when splitting incoming mail. Messages whose senders are in the blacklist will be sent to the `spam-split-group`. This is an explicit filter, meaning that it acts only on mail senders declared to be spammers.

— Variable: spam-use-whitelist

> Set this variable to `t` if you want to use whitelists when splitting incoming mail. Messages whose senders are not in the whitelist will be sent to the next spam-split rule. This is an explicit filter, meaning that unless someone is in the whitelist, their messages are not assumed to be spam or ham.

— Variable: spam-use-whitelist-exclusive

> Set this variable to `t` if you want to use whitelists as an implicit filter, meaning that every message will be considered spam unless the sender is in the whitelist. Use with care.

— Variable: gnus-group-spam-exit-processor-blacklist

> Add this symbol to a group's `spam-process` parameter by customizing the group parameters or the `gnus-spam-process-newsgroups` variable. When this symbol is added to a group's `spam-process` parameter, the senders of spam-marked articles will be added to the blacklist.

> WARNING

> Instead of the obsolete `gnus-group-spam-exit-processor-blacklist`, it is recommended that you use `(spam spam-use-blacklist)`. Everything will work the same way, we promise.

— Variable: gnus-group-ham-exit-processor-whitelist

> Add this symbol to a group's `spam-process` parameter by customizing the group parameters or the `gnus-spam-process-newsgroups` variable. When this symbol is added to a group's `spam-process` parameter, the senders of ham-marked articles in ham groups will be added to the whitelist.

> WARNING

> Instead of the obsolete `gnus-group-ham-exit-processor-whitelist`, it is recommended that you use `(ham spam-use-whitelist)`. Everything will work the same way, we promise.

Blacklists are lists of regular expressions matching addresses you consider to be spam senders. For instance, to block mail from any sender at ‘`vmadmin.com`’, you can put ‘`vmadmin.com`’ in your blacklist. You start out with an empty blacklist. Blacklist entries use the Emacs regular expression syntax.

Conversely, whitelists tell Gnus what addresses are considered legitimate. All messages from whitelisted addresses are considered non-spam. Also see BBDB Whitelists. Whitelist entries use the Emacs regular expression syntax.

The blacklist and whitelist file locations can be customized with the `spam-directory` variable (`~/News/spam` by default), or the `spam-whitelist` and `spam-blacklist` variables directly. The whitelist and blacklist files will by default be in the `spam-directory` directory, named `whitelist` and `blacklist` respectively.