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?

Warden 4.01 comes with a new command line interface (CLI) that you can use to configure it during automated deployment. You can view the full CLI documentation here.

Important

  1. Option values should be set using the equal sign (=).
  2. If an option value has spaces or semicolons then the value should be wrapped in single quotes.
  3. If an option value needs single quotes then the value should be wrapped in single quotes with value single quotes properly escaped replacing a single quote with '\''
  4. Options are case sensitive.

Run the following command for more information:

warden --task=help

Minion is a cli tool for performing tasks

Usage:

/usr/local/sbin/warden --task={task} --option1=value1 --option2=value2

Where {task} is one of the following:

  * 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:relaycountry
  * 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:rules
  * antispam:ruleupdates
  * antivirus:antivirus
  * antivirus:scanning
  * antivirus:scanninglimits
  * antivirus:signatureproviders
  * antivirus:signatureupdates
  * antivirus:signaturewhitelist
  * application:about
  * application:application
  * application:dashboard
  * application:geolocation
  * application:maintenance
  * application:maintenance:database
  * application:networktools
  * application:permissions
  * application:setup
  * contentfilter:contentfilter
  * contentfilter:milter
  * contentfilter:policy
  * contentfilter:policybanks
  * contentfilter:scanner
  * help
  * mailserver:access
  * mailserver:checks
  * mailserver:mailserver

For more information on what a task does and usage details execute:

/usr/local/sbin/warden --task={task} --help

Examples using the CLI:

// install the warden extension
plesk bin extension --install warden

// Run the setup wizard to active the extension license, run the application installer, and configure the application
warden --task=application:setup --license_key=XXXXXX

// set the anti-spam OK locales to western character sets only and reload the service applying the changes
warden --task=antispam:antispam --ok_locales='en' --reload=yes

// add a custom rule to match viagra in a message subject line, give it a +100 score, and reload the service applying the new rule
warden --task=antispam:rules --oper=rule_add --name=NO_VIAGRA --description='messages contains viagra in the subject' --type=header --value='Subject =~ viagra' --score=100 --reload=yes

 

  • cli, ansible, command line interface
  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

How can I change the interface language of the extension?

You can change the interface language under Settings -> Application Settings -> Locale...

How can I disable admin email notifications in Amavis?

Amavis has different default options for controlling where virus, spam, banned file attachments,...

How can I whitelist or blacklist a mail server from greylisting?

To Whitelist a Mail Server From Greylisting Navigate to Warden -> Settings ->...

How can I enable third party anti-virus signatures within Warden to improve the ClamAV detection rate?

Warden supports enabling third party anti-virus signatures to improve the detection rate. These...

How can I setup a local caching DNS resolver to speed up DNS queries used by Amavis?

Run the following command to check if local DNS caching is enabled: host -tTXT...