---
title: 'antispam:plugin:textcat'
url: 'https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-textcat'
markdown: 'https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-textcat.md'
date: '2026-10-07'
description: 'Try to guess the language used in the message body text. warden --task=antispam:plugin:textcat Option Value Default Description --ok_languages <string1,string2> all This option is used to specify which languages are considered okay for incoming mail. SpamAssassin will try to detect the la…'
taxonomy:
  category:
    - docs
  tag:
    - textcat
---

[](#)  [ Basics ](https://docs.danami.com/warden/)     [ Command Line Interface ](https://docs.danami.com/warden/command-line-interface)      Antispam       antispam:plugin:textcat    

# antispam:plugin:textcat

Try to guess the language used in the message body text.

```
warden --task=antispam:plugin:textcat
```

| Option | Value | Default | Description |
|---|---|---|---|
| `--ok_languages` | <string1,string2> | all | This option is used to specify which languages are considered okay for incoming mail. SpamAssassin will try to detect the language used in the message body text. Note that the language cannot always be recognized with sufficient confidence. In that case, no action is taken. The rule UNWANTED\_LANGUAGE\_BODY is triggered if none of the languages detected are in the "ok" list. Note that this is the only effect of the "ok" list. It does not act as a whitelist against any other form of spam scanning. In your configuration, you must use the two or three letter language specifier in lowercase, not the English name for the language. You may also specify all if a desired language is not listed, or if you want to allow any language. Use "all" for all languages. See: [https://en.wikipedia.org/wiki/List\_of\_ISO\_639-1\_codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) |
| `--ok_languages_add` | <string> |  | Add a single entry to ok\_languages. |
| `--ok_languages_del` | <string> |  | Remove a single entry from ok\_languages. |
| `--inactive_languages` | <string1,string2> | bs cy eo et eu fy ga gd is la lt lv rm sa sco sl yi | This option is used to specify which languages will not be considered when trying to guess the language. For performance reasons, supported languages that have fewer than about 5 million speakers are disabled by default. See: [https://en.wikipedia.org/wiki/List\_of\_ISO\_639-1\_codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) |
| `--inactive_languages_add` | <string> |  | Add a single entry to inactive\_languages. |
| `--inactive_languages_del` | <string> |  | Remove a single entry from inactive\_languages. |
| `--textcat_max_languages` | <digit> | 3 | The maximum number of languages any one message can simultaneously match before its classification is considered unknown. |
| `--textcat_optimal_ngrams` | <digit> | 0 | If the number of ngrams is lower than this number then they will be removed. This can be used to speed up the program for longer inputs. For shorter inputs, this should be set to 0. |
| `--textcat_max_ngrams` | <digit> | 400 | The maximum number of ngrams that should be compared with each of the languages models (note that each of those models is used completely). |
| `--textcat_acceptable_score` | <int> | 1.02 | Include any language that scores at least textcat\_acceptable\_score in the returned list of languages. |
| `--default` | <yes> |  | Reset all settings to their default values. |
| `--default_option` | <option> |  | Reset a specific setting to its default value. |
| `--reload` | <yes> |  | Reload the service after saving settings. |

## Examples

```
// set the ok_languages to english and french
warden --task=antispam:plugin:textcat --ok_languages=en,fr --reload=yes

// reset ok_languages to its default value
warden --task=antispam:plugin:textcat --default_option=ok_languages --reload=yes

// reset all settings to their default values
warden --task=antispam:plugin:textcat --default=yes --reload=yes

// stop detecting low resource languages that slow down scanning
warden --task=antispam:plugin:textcat --inactive_languages_add=ga,is,lt --reload=yes
```

## Related Pages

- [TextCat Settings](https://docs.danami.com/warden/settings/antispam/plugin-settings/textcat "TextCat Settings")
- [TextCat](https://docs.danami.com/warden/user-guide/antispam-plugins/textcat "TextCat")

 [ ](https://docs.danami.com/warden/user-guide/antispam-plugins/textcat) [](https://docs.danami.com/warden/settings/antispam/plugin-settings/textcat)

---

## Navigation

- Previous: [antispam:plugin:spf](https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-spf.md)
- Next: [antispam:plugin:txrep](https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-txrep.md)
