---
title: 'antispam:plugin:decodeshorturls'
url: 'https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-decodeshorturls'
markdown: 'https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-decodeshorturls.md'
date: '2026-10-07'
description: 'Decode shortened URLs in messages then add the URLs to a list of URIs which can then be scored and accessed by other plug-ins. This plugin has been deprecated in favor of the Redirectors plugin. warden --task=antispam:plugin:decodeshorturls Option Value Default Description --url_sh…'
taxonomy:
  category:
    - docs
  tag:
    - decodeshorturls
---

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

# antispam:plugin:decodeshorturls

Decode shortened URLs in messages then add the URLs to a list of URIs which can then be scored and accessed by other plug-ins.

> > > > > This plugin has been deprecated in favor of the Redirectors plugin.

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

| Option | Value | Default | Description |
|---|---|---|---|
| `--url_shortener_cache_type` | <dbi\|none> | dbi | The cache type that is being utilized. Most servers should use dbi to cache lookups to MariaDB/MySQL. |
| `--url_shortener_cache_ttl` | <digit> | 86400 | The length of time a cache entry will be valid for in seconds. |
| `--url_shortener_cache_autoclean` | <digit> | 1000 | Automatically purge old entries from database. The value describes a random run chance of 1/x. The default value of 1000 means that cleaning is run approximately once for every 1000 messages processed. A value of 1 would mean database is cleaned every time a message is processed. Set 0 to disable automatic cleaning and to do it manually. |
| `--url_shortener_loginfo` | <1\|0> | 0 | If this option is enabled then short URLs and the decoded URLs will be logged with info priority. |
| `--url_shortener_timeout` | <digit> | 5 | The maximum time a short URL HTTP request can take, in seconds. |
| `--max_short_urls` | <digit> | 10 | The maximum amount of short URLs that will be looked up per message. Chained redirections are not counted, only initial short URLs found. |
| `--max_short_url_redirections` | <digit> | 10 | The maximum depth of chained redirections that a short URL can generate. |
| `--url_shortener_user_agent` | <string> | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36 | The user-agent header for HTTP requests. Some services require it to look like a common browser. |
| `--url_shortener_custom_user_agent` | <string1,string2> |  | The custom HTTP user-agents to be used for specific domains, instead of the default specified in url\_shortener\_user\_agent. Required for some services like t.co to return blocked URL correctly. (SA 4.0.2+) |
| `--url_shortener_custom_user_agent_add` | <string> |  | Add a single entry to url\_shortener\_custom\_user\_agent. |
| `--url_shortener_custom_user_agent_del` | <string> |  | Remove a single entry from url\_shortener\_custom\_user\_agent. |
| `--url_shortener` | <string1,string2> |  | Domains that should be considered as a URL shortener. If the domain begins with a ".", 3rd level tld of the main domain will be checked. |
| `--url_shortener_add` | <string> |  | Add a single domain to url\_shortener. |
| `--url_shortener_del` | <string> |  | Remove a single domain from url\_shortener. |
| `--url_shortener_get` | <string1,string2> |  | Alias to url\_shortener. The HTTP request will be done with a GET method, instead of the default HEAD. Required for some services like bit.ly to return blocked URL correctly. |
| `--url_shortener_get_add` | <string> |  | Add a single domain to url\_shortener\_get. |
| `--url_shortener_get_del` | <string> |  | Remove a single domain from url\_shortener\_get. |
| `--clear_url_shortener` | <string1,string2> |  | Clear configured url\_shortener and url\_shortener\_get domains, for example to override default settings from an update channel. If domains are specified, then only those are removed from list. |
| `--clear_url_shortener_add` | <string> |  | Add a single domain to clear\_url\_shortener. |
| `--clear_url_shortener_del` | <string> |  | Remove a single domain from clear\_url\_shortener. |
| `--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 url_shortener_cache_type to cache to MariaDB/MySQL
warden --task=antispam:plugin:decodeshorturls --url_shortener_cache_type=dbi --reload=yes

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

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

// look up up to 20 short URLs per message and halve the cache lifetime to 12 hours
warden --task=antispam:plugin:decodeshorturls --max_short_urls=20 --url_shortener_cache_ttl=43200 --reload=yes

// log short URLs and their decoded targets while investigating a phishing campaign
warden --task=antispam:plugin:decodeshorturls --url_shortener_loginfo=1 --reload=yes
```

## Related Pages

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

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

---

## Navigation

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