---
title: 'antispam:plugin:extracttext'
url: 'https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-extracttext'
markdown: 'https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-extracttext.md'
date: '2026-09-22'
description: 'Use external tools to extract text from images, PDFs, and other document types. warden --task=antispam:plugin:extracttext Option Value Default Description --extracttext_maxparts <string> 10 The maximum mime parts number to analyze, a value of 0 means all mime parts will be analyzed. --e…'
taxonomy:
  category:
    - docs
  tag:
    - extracttext
---

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

# antispam:plugin:extracttext

Use external tools to extract text from images, PDFs, and other document types.

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

| Option | Value | Default | Description |
|---|---|---|---|
| `--extracttext_maxparts` | <string> | 10 | The maximum mime parts number to analyze, a value of 0 means all mime parts will be analyzed. |
| `--extracttext_timeout` | <string> | 5 10 | The timeout in seconds of external tool checks, per attachment. The second number speficies maximum total time for all checks. |
| `--extracttext_use` | <string1,string2> |  | Specifies what tool to use for what message parts. The general syntax is <name> <specifiers>. <name> - the internal name of a tool. <specifiers> - File extension and regular expressions for file names and MIME types. The regular expressions are anchored to beginning and end. |
| `--extracttext_use_add` | <string> |  | Add a single entry to extracttext\_use. |
| `--extracttext_use_del` | <string> |  | Remove a single entry from extracttext\_use. |
| `--extracttext_external` | <string1,string2> |  | The external tool. The tool must read a document on standard input or from a file and write text to standard output. The special keyword "{}" will be substituted at runtime with the temporary filename to be scanned by the external tool. Environment variables can be defined with "{KEY=VALUE}", these strings will be removed from command line. It is required that command line used outputs result directly to STDOUT. The general syntax is <name> <command> <parameters>. <name> - The internal name of this tool. <command> - The full path to the external command to run. <parameters> - Parameters for the external command. The temporary file name containing the document will be automatically added as last parameter. |
| `--extracttext_external_add` | <string> |  | Add a single entry to extracttext\_use. |
| `--extracttext_external_del` | <string> |  | Remove a single entry from extracttext\_use. |
| `--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 extracttext_timeout
warden --task=antispam:plugin:extracttext --extracttext_timeout='7 15' --reload=yes

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

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

## Related Pages

- [ExtractText Settings](https://docs.danami.com/warden/settings/antispam/plugin-settings/extracttext "ExtractText Settings")

 [](https://docs.danami.com/warden/settings/antispam/plugin-settings/extracttext)

---

## Navigation

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