How can I configure Warden Anti-spam and Virus Protection from the command line to make changes across multiple servers or when using automated deployment tools like Ansible?

Overview

The Warden Command Line Interface (CLI) enables administrators to configure and manage the application during automated deployments or scripted workflows. For comprehensive documentation, refer to the official CLI reference guide.

Syntax Rules & Formatting Guidelines

Adhere to the following syntax conventions when constructing Warden CLI commands:

  • Value Assignment: Use an equal sign (=) to assign values to options (e.g., --option=value).
  • Special Characters: Enclose option values containing spaces or semicolons in single quotes.
  • Escaping Quotes: If a value requires literal single quotes, wrap the entire string in single quotes and escape internal quotes using '\''.
  • Case Sensitivity: All option names and values are strictly case-sensitive.

Command Structure & Available Tasks

The standard command syntax follows this format:

warden --task={task} --option1=value1 --option2=value2

Replace {task} with one of the supported modules listed below. To retrieve detailed usage information for a specific task, append the --help flag:

warden --task={task} --help

Supported Task Modules

* antispam:antispam
* antispam:learning
* antispam:learning:ignore
* antispam:learning:sieve
* antispam:network
* antispam:plugin:asn
* antispam:plugin:awl
* antispam:plugin:dcc
* antispam:plugin:decodeshorturls
* antispam:plugin:dkim
* antispam:plugin:extracttext
* antispam:plugin:freemail
* antispam:plugin:fromenamespoof
* antispam:plugin:olevbmacro
* antispam:plugin:phishing
* antispam:plugin:pyzor
* antispam:plugin:razor2
* antispam:plugin:redirectors
* antispam:plugin:relaycountry
* antispam:plugin:rulestatistics
* antispam:plugin:sh
* antispam:plugin:shortcircuit
* antispam:plugin:spf
* antispam:plugin:textcat
* antispam:plugin:txrep
* antispam:plugin:uridnsbl
* antispam:plugin:urilocalbl
* antispam:plugin:vbounce
* antispam:plugin:welcomlistsubject
* antispam:plugins
* antispam:reputation
* antispam:rules:customrules
* antispam:rules:rulescores
* antispam:ruleupdates
* antispam:train
* antispam:training
* antivirus:antivirus
* antivirus:scanning
* antivirus:scanninglimits
* antivirus:signatureproviders
* antivirus:signatureupdates
* antivirus:signaturewhitelist
* application:about
* application:application
* application:dashboard
* application:geolocation
* application:license
* application:maintenance
* application:maintenance:database
* application:networktools
* application:permissions
* application:setup
* application:update
* contentfilter:contentfilter
* contentfilter:milter
* contentfilter:policy
* contentfilter:policybanks
* contentfilter:scanner
* help
* mailserver:access
* mailserver:checks
* mailserver:mailserver

Usage Examples

The following examples demonstrate common CLI operations:

Install the Warden Extension

plesk bin extension --install-url https://www.danami.com/clients/downloads/warden.zip

Run Setup Wizard & Activate License

warden --task=application:setup --license_key=XXXXXX

Configure Anti-Spam Locales & Reload Service

warden --task=antispam:antispam --ok_locales='en' --reload=yes

Add Custom Rule & Apply Changes

warden --task=antispam:rules:customrules --oper=rule_add --name=NO_VIAGRA --description='messages contains viagra in the subject' --type=header --value='Subject =~ viagra' --score=100 --reload=yes

Troubleshooting & Common Issues

  • Syntax Errors: Verify that all option values use the equal sign (=) and that spaces or special characters are properly enclosed in single quotes.
  • Quote Escaping Failures: If a command fails due to malformed strings, ensure internal single quotes are escaped using the '\'' sequence as specified in the syntax guidelines.
  • Case Sensitivity Mismatches: Commands will fail if option names or values do not match the exact casing defined in the documentation. Always verify capitalization before execution.
  • Service Reload Required: Configuration changes may not take effect immediately unless explicitly triggered with the --reload=yes flag.
  • cli, ansible, command line interface
  • 0 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?

Схожі статті

How can I install or upgrade the extension?

We provide free installation and configuration for all our paid licenses. Open a support ticket...

How can I add stronger Postfix restrictions so that the bulk of spam is rejected at the SMTPD level before it gets processed by Amavis?

Overview Warden enables administrators to enforce stricter Postfix SMTPD restrictions. These...

How can I change the interface language of the extension?

Overview This article provides instructions on how to change the interface language within the...

How can I configure greylisting with Warden Anti-spam and Virus protection?

Overview Greylisting is an email filtering mechanism designed to mitigate spam by temporarily...

How can I control how much memory Amavis uses?

Overview This article details how to manage Amavis memory consumption and email processing...