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 from the command line.

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:

/usr/local/psa/admin/sbin/modules/warden/minion --task=help

Minion is a cli tool for performing tasks

Usage:

/usr/local/psa/admin/sbin/modules/warden/minion --task={task} --option1=value1 --option2=value2

Where {task} is one of the following:

  * antispam:antispam
  * antispam:learning
  * antispam:network
  * antispam:plugin:asn
  * 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: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
  * antispam:sievelearning
  * antivirus:antivirus
  * antivirus:scanning
  * antivirus:scanninglimits
  * antivirus:signatureproviders
  * antivirus:signatureupdates
  * antivirus:signaturewhitelist
  * application:about
  * application:application
  * application:geolocation
  * application:maintenance:database
  * application:maintenance
  * application:networktools
  * application:permissions
  * application:setup
  * contentfilter:contentfilter
  * contentfilter:milter
  * contentfilter:policy
  * contentfilter:policybanks
  * contentfilter:scanner
  * help
  * mailserver:access
  * mailserver:mailserver

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

/usr/local/psa/admin/sbin/modules/warden/minion --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
/usr/local/psa/admin/bin/modules/warden/minion --task=application:setup --license_key=XXXXXX

// set the anti-spam OK locales to western character sets only
/usr/local/psa/admin/bin/modules/warden/minion --task=antispam:antispam --ok_locales='en'

// add a custom rule to match viagra in a message subject line  and give it a +100 score
/usr/local/psa/admin/bin/modules/warden/minion --task=antispam:rules --oper=rule_add --name=NO_VIAGRA --description='messages contains viagra in the subject' --type=header --value='Subject =~ viagra' --score=100

 

  • cli, ansible, command line interface
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

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,...

Where are the configuration files for Warden located?

Centos/RHEL/CloudLinux/AlmaLinux Configuration files: // amavis (Content Filter Settings)...

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...