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.

warden --task=antispam:plugin:decodeshorturls
Option
Value Default Description
--url_shortener_cache_type <none|dbi> none The cache type that is being utilized. High volume 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 <string1,string2> Domains that should be considered as an 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 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 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

Related Pages