+ All Categories
Home > Documents > Plesk Command Line Interface -...

Plesk Command Line Interface -...

Date post: 25-Jun-2020
Category:
Upload: others
View: 16 times
Download: 0 times
Share this document with a friend
172
SWsoft Plesk Command Line Interface Reference Plesk 8.1 for Linux/Unix (c) 1999-2007
Transcript
Page 1: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

SWsoft

Plesk Command Line Interface

Reference

Plesk 8.1 for Linux/Unix

(c) 1999-2007

Page 2: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

ISBN: N/ASWsoft.13755 Sunrise Valley DriveSuite 325HerndonVA 20171 USAPhone: +1 (703) 815 5670Fax: +1 (703) 815 5675

Copyright 1999-2007 SWsoft. All rights reserved. Distribution of this work or derivative of this work in any form is prohibited unless prior written permission is obtained from the copyright holder.Linux is a registered trademark of Linus Torvalds.ASPLinux and the ASPLinux logo are registered trademarks of SWsoft.RedHat is a registered trademark of Red Hat Software, Inc.Solaris is a registered trademark of Sun Microsystems, Inc.X Window System is a registered trademark of X Consortium, Inc.UNIX is a registered trademark of The Open Group.Intel, Pentium, and Celeron are registered trademarks of Intel Corporation.MS Windows, Windows 2003 Server, Windows XP, Windows 2000, Windows NT, Windows 98, and Windows 95 are registered trademarks of Microsoft Corporation.IBM DB2 is a registered trademark of International Business Machines Corp.SSH and Secure Shell are trademarks of SSH Communications Security, Inc.MegaRAID is a registered trademark of American Megatrends, Inc.PowerEdge is a trademark of Dell Computer Corporation.Request Tracker is a trademark of Best Practical Solutions, LLCAll other trademarks and copyrights referred to are the property of their respective owners.

Page 3: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Contents

Preface 4About This Guide.......................................................................................................................... 4Typographical Conventions.......................................................................................................... 4Feedback...................................................................................................................................... 5

Overview 6

Getting Started with Command-Line Utilities 8

Using Command-Line Utilities 9Administrator's Server Preferences: admin Utility......................................................................... 9Anonymous FTP Access: anonftp Utility..................................................................................... 12Client Accounts: client Utility....................................................................................................... 15Client Limits, Permissions, and Interface Settings: client_pref Utility.......................................... 20Managing Client Limits, Permissions, and Interface Settings Using client_pref Utility................ 29ColdFusion Service on Plesk Server: cfsetting Utility................................................................. 38Custom Buttons: custombutton Utility......................................................................................... 39Database Servers: database-server Utility................................................................................. 46Databases: database Utility........................................................................................................ 49Desktop Presets: desktop Utility................................................................................................. 54DNS Zone Template: server_dns Utility...................................................................................... 57DNS Zones on Domains: dns Utility........................................................................................... 63Domain Accounts: domain Utility................................................................................................ 70Domain Administrator Accounts: domadmin Utility..................................................................... 81Domain Aliases: domalias Utility................................................................................................. 89Domain Limits and Preferences: domain_pref Utility.................................................................. 92Domain Templates: domain_template Utility.............................................................................. 96Interface and System Preferences: server_pref Utility.............................................................. 105Interface Templates: interface_template Utility......................................................................... 108IP Addresses: ipmanage Utility................................................................................................. 112Mail Accounts: mail Utility......................................................................................................... 115Mail Autoresponders: autoresponder Utility.............................................................................. 121Mail Server Settings: mailserver Utility..................................................................................... 127Mailing Lists: maillist Utility....................................................................................................... 132Plesk Services: service Utility................................................................................................... 136Server Configuration: init_conf Utility........................................................................................ 139Site Applications: sitapp Utility.................................................................................................. 144Site Directories Protection: protdir Utility.................................................................................. 146Site Skeletons: skeleton Utility.................................................................................................. 150 Spam Filtering: spamassassin Utility....................................................................................... 152SSL Certificates: certificate Utility............................................................................................. 155Subdomains: subdomain Utility................................................................................................ 160Tomcat Service and Java Applications on Domains: tomcat Utility.......................................... 165Web Statistics: webstat Utility................................................................................................... 167Web Users: webuser Utility....................................................................................................... 169

3

Page 4: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

About This GuideThis document contains a complete description of command line utilities, commands, and options for Plesk for Linux/Unix.

Typographical ConventionsThe following kinds of formatting in the text identify special information.

Formatting convention Type of Information ExampleSpecial Bold Items you must select, such as

menu options, command buttons, or items in a list.

Go to the QoS tab.

Titles of chapters, sections, and subsections.

Read the Basic Administration chapter.

Italics Used to emphasize the importance of a point, to introduce a term or to designate a command line placeholder, which is to be replaced with a real name or value.

The system supports the so called wildcard character search.

Monospace The names of style sheet selectors, files and directories, and CSS fragments.

The license file is located in the httpdocs/common/license directory.

Preformatted On-screen computer output in your command-line sessions; source code in XML, C++, or other programming languages.

# ls –al /filestotal 14470

Preformatted Bold What you type, contrasted with on-screen computer output.

# cd /root/rpms/php

C H A P T E R 1

Preface

4

Page 5: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

FeedbackIf you have found a mistake in this guide, or if you have suggestions or ideas on how to improve this guide, please send your feedback to [email protected]. Please include in your report the guide's title, chapter and section titles, and the fragment of text in which you have found an error.

5

Page 6: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Plesk Command Line Interface (CLI) is designed for integration of Plesk Server Administrator with third-party applications. It can also be used for managing Plesk installations by administrators experienced in using Plesk. This feature provides the command line interface to the majority of management tasks that can be performed by Plesk administrator. The CLI provides the alternative means of control for various business objects in Plesk. Plesk command line utilities use the Plesk core functionality to create, manage, and delete clients, domains, services and other Plesk objects.

Plesk CL utilities may be used by the root user from the console or script. The utilities require "root" or "psaadm" privileges to operate.

Plesk CLI supports localized names of business objects in the same manner as Plesk does. Therefore, you can create clients with contact names using a locale of your choice. Use the LANG environment variable to set up a particular locale.

Plesk CLI does not require the Web interface of Plesk Server Administrator to run.

Plesk CLI is commonly included in the Plesk distribution kit and is also available as the separate plesk-api-cli package.

The table below presents the command utilities provided by the current version of Plesk (in alphabetical order).

Utility Affected Object(s)admin (on page 9) Plesk administrator control panel interface

preferences and personal information.

anonftp (on page 12) Anonymous FTP access on domains with physical hosting on a Plesk server.

autoresponder (on page 121) Mail autoresponders.

certificate (on page 155) SSL certificates.

cfsetting (on page 38) ColdFusion service on the Plesk server.

client (on page 15) Client accounts.

client_pref (on page 20) Client limits and permissions, IP pool, and Plesk interface preferences (for example, the default language and skin) for Plesk clients.

client_template (on page 29) Client templates.

custombutton (on page 39) Custom buttons.

database (on page 49) Databases and database users.

database-server (on page 46) Database servers.

desktop (on page 54) Desktop presets.

dns (on page 63) DNS zones on domains and domain aliases.

C H A P T E R 2

Overview

6

Page 7: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Utility Affected Object(s)

domadmin (on page 81) Domain administrator accounts.

domain (on page 70) Domain accounts.

domain_pref (on page 92) Domain limits and preferences for applications, scripting support, e-mail, and other services.

domain_template (on page 96) Domain templates.

domalias (on page 89) Domain aliases.

init_conf (on page 139) Initial configuration of the Plesk server; Plesk administrator personal info.

interface_template (on page 108)

Control panel interface templates.

ipmanage (on page 112) IP addresses on Plesk server.

mail (on page 115) Domain-level mail service, and mail names (e-mail accounts).

maillist (on page 132) Mailing lists.

mailserver (on page 127) Server-wide mail server settings.

protdir (on page 146) Password protection of Web directories on domains.

server_dns (on page 57) Server-wide DNS zone template.

server_pref (on page 105) Plesk default interface preferences, and Plesk server system preferences.

service (on page 136) Services on the Plesk server.

siteapp (on page 144) Site applications on the level of Plesk client's Application pool.

skeleton (on page 150) Site skeletons (directory structure).

spamassassin (on page 152) Spamassassin spam filter.

subdomain (on page 160) Subdomains.

tomcat (on page 165) Tomcat service and the Java-based Web applications on domains.

webstat (on page 167) Webalizer preferences.

webuser (on page 169) Web users on domains.

The Plesk for Linux/Unix command line utilities must be run from the directory in which they are stored. For general instructions on executing command line utilities on Plesk server, consult the Getting Started with Command-Line Utilities (on page 8) section.

7

Page 8: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command line utilities for Plesk for Linux/Unix are located in the /usr/local/psa/bin directory on the Plesk server.

To run command line utilities:1 Log in to the Plesk server via SSH.2 Use one of the following options to run a utility:

To run a utility from any directory, use the following command line format:

To run a utility when the /usr/local/psa/bin/ is your current directory, use the following format:

Upon successful execution, utilities return the 0 code. If an error occurs, utilities return code 1 and display the description of the encountered problem on stderr.

For exact command syntax for each utility, consult the corresponding sections in the Chapter "Using Command Line Utilities (on page 9)".

Warning: Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the arguments of the -passwd - -passwd_type options. Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the arguments of the -passwd and -passwd_type options.

C H A P T E R 3

Getting Started with Command-Line Utilities

# /usr/local/psa/bin/<utility name> [parameters] [options]

# ./<utility name> [parameters] [options]

8

Page 9: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Plesk for Linux/Unix command line utilities enable Plesk administrators to manage the Plesk server and its configuration, client accounts, domains, and various services. The utilities can be used for integration of third-party products with Plesk and for routine management of Plesk servers by system administrators.

This chapter describes in detail the commands and options currently available for the command-line utilities. Each command and option is accompanied by a description and a usage example.

Administrator's Server Preferences: admin Utility

The admin utility is used to manage Plesk administrator control panel interface preferences and view the administrator's personal information and interface preferences through CLI.

Syntaxadmin <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

The following command line sets the administrator's control panel default skin WinXP Olivegreen, sets the default interface language for Plesk administrator to Russian, and applies interface customization template CustomTemplate to the administrator's control panel.# ./admin --update -skin "WinXP Olivegreen" -locale -ru-RU -template CustomTemplateCommands

Сommand Parameter Description Example-update or -u

Updates Plesk administrator's server preferences.

To set the WinXP Olivegreen skin as the default skin:# ./admin --update -skin "WinXP Olivegreen"or# ./admin -u -skin "WinXP Olivegreen"

C H A P T E R 4

Using Command-Line Utilities

9

Page 10: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Сommand Parameter Description Example--info or -i

Displays Plesk administrator’s personal information and preferences.

To display Plesk administrator’s personal information and preferences:# ./admin --infoor# ./admin -i

--xml-info or -xi

Displays Plesk administrator’s personal information and preferences in the XML format.

To display Plesk administrator’s personal information and preferences in the XML format:# ./admin --xml-infoor# ./admin -xi

--help or -h

Displays help on the use of the utility.

To display help on the use of the admin utility:# ./admin --helpor# ./admin -h

Options

Option Parameter Description Example-locale <language

code>Sets the default interface language for Plesk administrator control panel (the Administrator's interface language parameter). The argument of the command must be a valid four-letter language code derived from the language code described in ISO-639-2 and the corresponding country code described in ISO-3166. For example, the Plesk code for the Italian language code is it-IT; the Plesk code for the American variant of English is en-US; the Plesk code for the British variant of English is en-GB.

To set the default interface language for Plesk administrator to Russian:# ./admin -u -locale -ru-RU

-skin <skin name> Sets the default interface skin for Plesk administrator control panel (the Administrator's interface skin parameter).

To set the WinXP Olivegreen skin as the default skin:# ./admin -u -skin "WinXP Olivegreen"

-template <template name>

Applies an interface customization template to Plesk administrator's control panel (the Administrator's interface customization template parameter).

To apply customization template CustomTemplate to administrator's control panel:# ./admin -u -template CustomTemplate

10

Page 11: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-multiple-sessions

true|false Allows multiple simultaneous sessions under administrator's login (the Allow multiple sessions under administrator's login parameter).

To allow multiple sessions to run simultaneously under administrator's login:# ./admin -u -multiple-sessions true

-max-button-length

<number> Sets the maximum allowed button length (in symbols) for the Plesk administrator's control panel (the Button label length parameter).

To change the button label length for the domain administrator's control panel to 20:# ./admin -u -max-button-length 20

-lock-screen

true|false Sets the Prevent users from working with the control panel until interface screens are completely loaded parameter.

To prevent Plesk administrator from working with the control panel until control panel screens are completely loaded:# ./admin -u -lock-screen true

11

Page 12: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Anonymous FTP Access: anonftp UtilityThe anonftp utility is used to manage anonymous FTP access on domains with physical hosting on a Plesk server. By using this utility, you can perform the following tasks:

enabling or disabling the anonymous FTP access on a domain setting limits for download bandwidth and the maximum number of simultaneous FTP

connections managing the incoming directory properties configuring welcome message displayed upon anonymous FTP user login

Syntaxanonftp <command> <domain name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line enables the anonymous FTP service on domain example.com and enables display of a login message with text Welcome to FTP service upon the anonymous FTP user login.# ./anonftp --update example.com -status true -message true -message-text "Welcome to FTP service"

Commands

Command Parameter Description Example--update or -u

<domain name>

Updates the anonymous FTP settings on the specified domain.

To enable downloading files from the incoming directory by users:# ./anonftp --update example.com -status true -incoming-downloads trueor# ./anonftp -u example.com -status true -incoming-downloads true

--info or -i

<domain name>

Displays information about the anonymous FTP settings on the specified domain.

To display information about anonymous FTP settings on domain example.com:# ./anonftp --info example.comor# ./anonftp -i example.com

12

Page 13: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--help or -h

Displays help on the use of the utility.

To display help on the use of the anonftp utility:# ./anonftp --helpor# ./anonftp -h

Options

Option Parameter Description Example-status true |

falseEnables or disables the anonymous FTP service on a domain.

To enable the anonymous FTP service on domain example.com:# ./anonftp -u example.com -status true

-message true | false

Enables or disables display of a login message upon anonymous FTP user login (the Display login message parameter).

To enable display of a login message upon the anonymous FTP user login on domain example.com: # ./anonftp -u -status true

-message-text

<string> Message text displayed upon the anonymous FTP user login.

To display welcome message Welcome to FTP service upon anonymous FTP user login on domain example.com:# ./anonftp -u example.com -status true -message true -message-text "Welcome to FTP service"

-incoming

true | false

Enables or disables uploading to the incoming directory (the Allow uploading to incoming directory parameter).

Set to false by default.

To allow uploading files to the incoming directory by users:# ./anonftp -u example.com -status true -incoming true

-incoming-dirs

true | false

Enables or disables creation of directories in the incoming directory (the Allow creation of directories in the incoming directory parameter).

To enable creation of directories in the incoming directory:# ./anonftp -u example.com -status true -incoming-dirs true

-incoming-downloads

true | false

Enables or disables downloading from the incoming directory (the Allow downloading from the incoming directory parameter).

Set to false by default.

To enable downloading files from the incoming directory by users:# ./anonftp -u example.com -status true -incoming-downloads true

13

Page 14: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-incoming-limit

<KB> Sets disk space allocation for the incoming directory (the Limit disk space in the incoming directory parameter).

Type "-1" to set the parameter to Unlimited.

To limit disk space in the incoming directory to 900 Kb:# ./anonftp -u example.com -status true -incoming-limit 900

-max-connects

<number> Sets the maximum number of simultaneous FTP connections (the Limit number of simultaneous connections parameter).

Type "-1" to set the parameter to Unlimited.

To set the maximum number of simultaneous FTP connections to 4:# ./anonftp -u example.com -status true -max-connects 4

-bandwidth

<KB> Sets the maximum download bandwidth (the Limit download bandwidth for this virtual FTP domain parameter).

Type "-1" to set the parameter to Unlimited.

To limit the maximum download bandwidth to 50 Kb:# ./anonftp -u example.com -status true -bandwidth 50

14

Page 15: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Client Accounts: client UtilityThe client utility is used to manage Plesk client accounts through CLI. By using this utility, you can perform the following tasks:

Creating, renaming, and removing client accounts Enabling and disabling existing client accounts Edit client's Plesk control panel login name and password Edit client's personal information

Syntaxclient <command> <client login name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

The following command line creates client account with contact name Michael Smith, Plesk control panel login name clientlogin, and password clientpass, specifies the Unites States as the client’s country, and prevents automatic sending of standard Plesk e-mail notifications (if they are enabled) about the account creation.# ./client --create clientlogin -name "Michael Smith" -passwd clientpass -country US -notify falseCommands

Command Parameter Description Example--create or -c

<login name> Creates a new client account. The argument of the command must begin with an alphabetic symbol.

To create a client account named Michael Smith with client login name clientlogin and password clientpass:# ./client --create clientlogin -name "Michael Smith" -passwd clientpassor# ./client -c clientlogin -name "Michael Smith" -passwd clientpass

--update or -u

<login name> Updates settings of an existing client account.

To change client login name to newlogin and password to newpass for the client with current login name clientlogin:# ./client --update clientlogin -login newlogin -passwd newpassor# ./client -u clientlogin -login newlogin -passwd newpass

15

Page 16: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--remove or -r

<login name> Deletes a client account.

To remove the client account with login name clientlogin:# ./client --remove clientlogin or# ./client -r clientlogin

--info or -i

<login name> Displays information about client account settings.

Displays information about the client account with login name clientlogin:# ./client --info clientlogin or# ./client -i clientlogin

--on <login name> Enables a client account.

To enable the client account with login name clientlogin:# ./client --on clientlogin

--off <login name> Disables a client account.

To the client account with login name clientlogin:# ./client --off clientlogin

--help or -h

Displays help on the use of the utility.

To display help on the client utility:# ./client --help or# ./client -h

Options

Option Parameter Description Example-status enabled|

disabled|admin|expired

Enables or disables a client account (the enabled or disabled parameters, respectively). Disables a client account and sets the account status to Account is disabled by administrator (admin), Account is expired (expired).

To enable client account with client login name clientlogin:# ./client -u clientlogin -status enabledTo disable client account with login name clientlogin and assign status Account is disabled by administrator to the account:# ./client -u clientlogin -status admin

-company <string> Sets the client's Company name.

To set company name to New Company, Inc. for the client with login name clientlogin:# ./client -u clientlogin -company "New Company, Inc."

16

Page 17: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-name <string> Sets the client's Contact

name.

Required for the --create command.

To create a client account named Michael Smith (also the contact name for the client) with client login name clientlogin and password clientpass:# ./client -c clientlogin -name "Michael Smith" -passwd clientpass

-login <client login name>

Changes the client's login name used to log in to Plesk control panel (the Login parameter).

Used only with the --update command.

To change client login name to newlogin for the client with current login name clientlogin:# ./client -u clientlogin -login newlogin

-passwd <password> Sets the client's password for logging in to Plesk control panel (the Password parameter).

Required for the --create command.

For additional comments, see the Note below.

To create a client account named Michael Smith with client login name clientlogin and password clientpass:# ./client -c clientlogin -name "Michael Smith" -passwd clientpass

-passwd_type

plain| crypt

Specifies the type of client password - plain or cryptic.

Set to plain by default.

For additional comments, see the Note below.

To set the type of the client's password to cryptic for the client with login name clientlogin:# ./client -u clientlogin -passwd_type crypt

-phone <number> Sets the client's phone number (the Phone parameter).

To set the phone number to 555-2345 for the client with login name clientlogin:# ./client -u clientlogin -phone 555-2345

-fax <number> Sets the client's fax number (the Fax parameter).

To set the fax number to 555-2345 for the client with login name clientlogin:# ./client -u clientlogin -fax 555-2345

-email <string> Sets the client's e-mail address (the E-mail parameter).

To set the e-mail address to [email protected] for the client with login name clientlogin:# ./client -u clientlogin -fax [email protected]

17

Page 18: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-address <string> Sets the client’s street

address (the Address parameter).

To set the street address to 8 Main street for the client with login name clientlogin:# ./client -u clientlogin -address "8 Main street".

-city <string> Sets the client’s city address (the City parameter).

To set the city address to New York for the client with login name clientlogin:# ./client -u clientlogin -city "New York"

-state <string> Sets the client's state or province (the State/Province parameter).

To set the province to British Columbia for the client with login name clientlogin:# ./client -u clientlogin -state "British Columbia"

-zip <string> Sets the client's postal code (the Postal/ZIP code parameter).

To set the postal code to 52345 for the client with login name clientlogin:# ./client -u clientlogin -zip 52345

-country <country code>

Sets the client's country address (the Country parameter).

The option's argument must be a valid two-letter code as described in ISO-3166).

To set the country to United States for the client with login name clientlogin:# ./client -u clientlogin -country US

-notify true|false Allows or prevents standard e-mail notifications about client account creation (Plesk domain administrators and clients).

Used only with the --create command.

To prevent sending standard e-mail notifications about creation of client account Michael Smith with client login name clientlogin and password clientpass::# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -notify false

-template <template name>

Specifies client template to be used for client creation.

Used only with the --create command.

To specify client template ClientTemplate to create client account Michael Smith with client login name clientlogin and password clientpass:# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -template ClientTemplate

18

Page 19: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-force Forces the use of a

client template to create a client account even if some of the template options cannot be implemented (the "use anyway" situation).

Used only with the --create command.

To force the use of client template ClientTemplate to create client account Michael Smith with client login name clientlogin and password clientpass:# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -template ClientTemplate -force

-creation-date

<YYYY-MM-DD>

Sets the client account creation date (can be arbitrary).

Used only with the --create command.

To set the creation date to 2006-12-30 for new client account Michael Smith with client login name clientlogin and password clientpass :# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -creation-date 2006-12-30

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

19

Page 20: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Client Limits, Permissions, and Interface Settings: client_pref Utility

The client_pref utility enables the administrator to set and edit the client's limits and permissions, to manage the client's IP pool, and to define Plesk interface preferences (e.g. the default language and skin) for the client through CLI.

Syntaxclient_pref <command> <client login name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

For the client account with the client login name clientlogin, the following command line sets the disk space limit for the account to 20 GB, sets the account's validity period up until December 31, 2007, sets the Maximum number of subdomains limit to 20 subdomains, and enables the client to manage log rotation and mailing lists.# ./client_pref --update clientlogin -disk_space 20GB -max_subdom 20 -expiration 2007-12-31-manage_log true -manage_maillists trueCommands

Command Parameter Description Example--update or -u

<login name> Updates preferences and limits for an existing client account.

To disabling the option of changing domain limits:# ./client_pref --update clientlogin -change_limits falseor# ./client_pref -u clientlogin -change_limits false

--skin-list or -sl

Displays the list of available control panel interface skins.

To display the list of available interface skins:# ./client_pref --skin-listor# ./client_pref -sl

--info or -i

<login name> Displays information about client account preferences and limits.

To display information about preferences and limits set on client account with login name clientlogin:# ./client_pref --info clientloginor# ./client_pref -i clientlogin

20

Page 21: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--help or -h

Displays help on the use of the utility.

To display help on the use of the client_pref utility:# ./client_pref --helpor# ./client_pref -h

Options

Option Parameter Description Example-create_domains

true|false Enables or disables creation of domains by a client (the Domain creation parameter).

To enable the client with login name clientlogin to create domains:# ./client_pref -u clientlogin -create_domains true

-manage_phosting

true|false Enables or disables physical hosting management by a client (the Physical hosting management parameter).

To enable the client with login name clientlogin to manage physical hosting:# ./client_pref -u clientlogin -manage_phosting true

-manage_php_safe_mode

true|false Allows/Prohibits a client to turn PHP safe mode off and on. (The PHP safe mode management parameter.)

Default value is false.

Available since Plesk 8.1.1.

To allow he client with login name clientlogin to manage PHP safe mode:# ./client_pref -u clientlogin -manage_php_safe_mode_true

-change_limits true|false Enables or disables changing domain limits by the client (the Domain limits adjustment parameter).

To enable changing domain limits by the client with login name clientlogin:# ./client_pref -u clientlogin -change_limits true

-manage_dns true|false Enables or disables DNS zone management by a client (the DNS zone management parameter).

To enable DNS zone management by a client with login name clientlogin:# ./client_pref -u clientlogin -manage_dns true

-manage_log true|false Enables or disables log rotation management by a client (the Log rotation management parameter).

To enable log rotation management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_log true

21

Page 22: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage_crontab

true|false Enables or disables crontab management (task scheduler) by a client (the Crontab management parameter).

To enable crontab management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_crontab true

-manage_anonftp

true|false Enables or disables the anonymous FTP management by a client (the Anonymous FTP management parameter).

To enable the anonymous FTP management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_anonftp true

-manage_webapps

true|false Enables or disables Java applications management by a client (the Java applications management parameter).

To enable Java applications management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_webapps true

-manage_maillists

true|false Enables or disables Mailing lists management by a client (the Mailing lists management parameter).

To enable mailing lists management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_maillists true

-manage_sh_access

true|false Enables or disables management of server shell access of any type by a client (the Management of shell access to server parameter, the Client cannot allow or disallow shell access and Client can allow access to any type of shell options).

To enable server shell access management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_sh_access true

-manage_not_chroot_shell

true|false Enables or disables management of server shell access to the chrooted environment by a client (the Management of shell access to server parameter, the Client can allow access only to a chrooted environment options).

To enable a client with login name clientlogin to manage shell access only to the chrooted environment:# ./client_pref -u clientlogin -manage_not_chroot_shell false

-manage_subdomains

true|false Enables or disables management of subdomains by a client (the Subdomains management parameter).

To enable management of subdomains by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_subdomains true

22

Page 23: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage_quota true|false Enables or disables the

hard disk quota management by a client (the Hard disk quota assignment parameter).

To enable the hard disk quota management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_quota true

-allow_local_backups

true|false Enables or disables backing up data and restoring data from backups using the the control panel repository by a client (the Allow backing up and restoring data and use / control panel's repository parameter).

To enable the client with login name clientlogin to backup and restore data using the control panel's repository:# ./client_pref -u clientlogin -allow_local_backups true

-allow_ftp_backups

true|false Enables or disables backing up data and restoring data from backups using the the FTP repository by a client (the Allow backing up and restoring data and use / FTP repository repository parameter).

To enable the client with login name clientlogin to backup and restore data using the FTP repository:# ./client_pref -u clientlogin -allow_ftp_backups true

-manage_drweb true|false Enables or disables Dr.Web antivirus application management by a client (the Dr.Web antivirus management parameter).

Deprecated since Plesk 8.1.1. Use the manage_virusfilter option instead.

To enable management of the Dr.Web antivirus application by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_drweb true

-manage_virusfilter

true|false Allows/Prohibits a client changing settings of the antivirus tool used on his/her domains.

To enable management of the antivirus tool by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_virusfilter true

-remote_access_interface

true|false Enables or disables the use of the remote XML interface by a client (the Ability to use remote XML interface parameter).

To allow client with login name clientlogin to use Plesk API RPC protocol:# ./client_pref -u clientlogin -remote_access_interface true

23

Page 24: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage_domain_aliases

true|false Enables or disables management of domain aliases by a client (the Domain aliases management parameter).

To enable management of domain aliases by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_domain_aliases true

-cp_access true|false Enables or disables client's access to control panel (the Access to control panel parameter).

To disable control panel access for the client with login name clientlogin:# ./client_pref -u clientlogin -cp_access false

-manage_dashboard

true|false Enables or disables desktop (dashboard) management by a client (the Desktop management parameter).

Can be set to true only if the -dashboard option is set to true.

To enable desktop (dashboard) management for the client with login name clientlogin:# ./client_pref -u clientlogin -manage_dashboard true

-dashboard true|false Enables or disables the use of the Desktop interface by a client. Sets the User interface parameter (the Desktop and standard interface are allowed and Only Desktop interface is allowed options only).

Can be set to false only if the -stdgui option is set to true.

To allow the use of Desktop interface by the client with login name clientlogin:

# ./client_pref -u clientlogin -dashboard true To allow the use of

standard interface by the client with login name clientlogin:

# ./client_pref -u clientlogin -stdgui true To set the Desktop and

standard interface are allowed option for the User interface parameter:

# ./client_pref -u clientlogin -dashboard true -stdgui true To set the Only standard

interface is allowed option for the User interface parameter:

# ./client_pref -u clientlogin -dashboard false -stdgui true

24

Page 25: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-stdgui true|false Enables or disables the

use of the standard interface by a client. Sets the User interface parameter (the Desktop and standard interface are allowed and Only standard interface is allowed options only).

The -stdgui option can set to false only if the -dashboard option is set to true.

To set the Only Desktop interface is allowed option for the User interface parameter:

# ./client_pref -u clientlogin -dashboard true -stdgui false

-manage_spamfilter

true|false Enables or disables spam filter management by a client (the Spam filter management parameter).

To enable spam filter management by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_spamfilter true

-max_dom <number> Sets the Maximum number of domains limit for a client.

Type "-1" to set the parameter to the Unlimited value.

To set the Maximum number of domains limit for the client with login name clientlogin to 10:# ./client_pref -u clientlogin -max_dom 10

-max_dom_aliases

<number> Sets the Maximum number of domain aliases limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of domain aliases limit for the client with login name clientlogin to 10:# ./client_pref -u -max_dom_aliases 10

-disk_space <number>[K|M|G]

Sets the Disk space limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Disk space limit for the client with login name clientlogin to 100 MB:# ./client_pref -u clientlogin -disk_space 100M

-max_traffic <number>[K|M|G]

Sets the Maximum amount of traffic limit (per month) for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum amount of traffic limit for the client with login name clientlogin to 10 GB/month:# ./client_pref -u clientlogin -max_traffic 10G

25

Page 26: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max_box <number> Sets the Maximum number

of mailboxes limit (per month) for a client.

Type "-1" to set the parameter to Unlimited.

To set he Maximum number of mailboxes limit for the client with login name clientlogin to 10:# ./client_pref -u clientlogin -max_box 10

-mbox_quota <number>[K|M|G]

Sets the Set the mailbox quota limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the mailbox quota for the client with login name clientlogin to 10 MB:# ./client_pref -u clientlogin -mbox_quota 10M

-max_redir <number> Sets the Maximum number of mail redirects limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail redirects limit for the client with login name clientlogin to 10:# ./client_pref -u clientlogin -max_redir 10

-max_mg <number> Sets the Maximum number of mail groups limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail groups limit for the client with login name clientlogin to 5:# ./client_pref -u clientlogin -max_mg 5

-max_resp <number> Sets the Maximum number of mail autoresponders limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail autoresponders limit for the client with login name clientlogin to 5:# ./client_pref -u clientlogin -max_resp 5

-max_wu <number> Sets the Maximum number of web users limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of web users limit for the client with login name clientlogin to 50:# ./client_pref -u clientlogin -max_wu 50

-max_maillists <number> Sets the Maximum number of mailing lists limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mailing lists limit for the client with login name clientlogin to 30:# ./client_pref -u clientlogin -max_maillists 30

-max_db <number> Sets the Maximum number of databases limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of databases limit for the client with login name clientlogin to 20:# ./client_pref -u clientlogin -max_db 2

26

Page 27: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max_webapps <number> Sets the Maximum number

of Java applications limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of Java applications limit for the client with login name clientlogin to 50:# ./client_pref -u clientlogin -max_webapps 50

-max_subdom <number> Sets the Maximum number of subdomains limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the maximum number of subdomains for client with login name clientlogin to 40:# ./client_pref -u clientlogin -max_subdom 40

-expiration <YYYY-MM-DD>

Sets Validity period for for a client account.

Type "-1" to set the parameter to Unlimited.

To set the validity period for the client account with login name clientlogin to February 28, 2007:# ./client_pref -u clientlogin -expiration 2007-2-28

-ip_pool add|del:<ip1>, <ip2>,..,<ipN>

Adds IP addresses to or deletes IP addresses from from a client's IP address pool.

To add IP addresses 192.168.67.78 and 192.168.78.89 to the IP address pool of the client account with login name clientlogin:# ./client_pref -u clientlogin -ip_pool add:192.168.67.78,192.168.78.89

-locale <language code>

Sets the default interface language for client's control panel (the Interface language parameter). The argument of the command must be a valid four-letter language code derived from the language code described in ISO-639-2 and the corresponding country code described in ISO-3166. For example, the Plesk code for the Italian language code is it-IT; the Plesk code for the American variant of English is en-US; the Plesk code for the British variant of English is en-GB.

To set the default interface language for the client with login name clientlogin to Russian:# ./client_pref -u clientlogin -locale ru-RU

27

Page 28: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-skin <skin

name>Sets the default interface skin for client's control panel (the Interface skin parameter).

To set the WinXP Olivegreen skin as the default interface skin for the client with login name clientlogin:# ./client_pref -u [email protected] -skin "WinXP Olivegreen"

-multiple-sessions

true|false Allows multiple simultaneous sessions under client's login (the Allow multiple sessions under administrator's login parameter).

To allow multiple sessions to run simultaneously under the client login name clientlogin:# ./client_pref -u clientlogin -multiple-sessions true

-max-button-length

<number> Sets the maximum allowed button length (in symbols) for client's control panel (the Button label length parameter).

To change the button label length to 20 for the control panel for the client with login name clientlogin:# ./client_pref -u clientlogin -max-button-length 20

-lock-screen true|false Sets the Prevent users from working with the control panel until interface screens are completely loaded parameter.

To prevent client with login name clientlogin from working with the control panel until control panel screens are completely loaded:# ./client_pref -u clientlogin -lock-screen true

-desktop-preset

<preset name>

Sets the default desktop preset for client's control panel (the Desktop preset parameter).

To set the Custom Desktop preset as the default interface skin for the client with login name clientlogin:# ./client_pref -u clientlogin -skin "Custom Desktop"

28

Page 29: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Managing Client Limits, Permissions, and Interface Settings Using client_pref Utility

The client_template utility enables the administrator to manage client templates through CLI. By using this utility, you can perform the following tasks:

Creating, renaming, and deleting client templates Editing client account limits and preferences in client templates Managing various domain hosting parameters - log file management, mail

preferences, and other parameters

Syntaxclient_template <command> <template name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

For the client template named ClientTemplate, the following command line sets the disk space limit for a client account to 20 GB, sets the account's validity period up until December 31, 2007, sets the Maximum number of subdomains limit to 20 subdomains, and enables the client to manage log rotation and mailing lists.# ./client_template --update ClientTemplate -disk_space 20GB -max-subdom 20 -expiration 2007-12-31 -manage-log true -manage-mailllists true

Commands

Command Parameter Description Example--create or -c

<client template name>

Creates a new client template.

To create a client template named ClientTemplate:# ./client_template --create ClientTemplateor# ./client_template -c ClientTemplate

--update or -u

<client template name>

Updates an existing client template.

To update a client template named ClientTemplate:# ./client_template --update ClientTemplateor# ./client_template -u ClientTemplate

29

Page 30: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example

--remove or -r

<client template name>

Deletes a client template.

To remove a client template ClientTemplate:# ./client_template --remove ClientTemplateor# ./client_template -r ClientTemplate

--xml-info or -i

<client template name>

Displays information about a client template in the XML format.

To display information about client template ClientTemplate:# ./client_template --xml-info ClientTemplateor# ./client_template -x ClientTemplate

--help or -h

Displays help on the use of the utility.

To view help on the use of the utility:# ./client_template --helpor# ./client_template -h

Options

Option Parameter Description Example-new-name <string> Sets a new name for an

existing client template.To change the name of client template ClientTemplate to NewClientTemplate:# ./client_template -u ClientTemplate -new-name NewClientTemplate

-cp-access true|false Enables or disables client's access to control panel (the Access to control panel parameter).

To disable control panel access in client template ClientTemplate:# ./client_template -u ClientTemplate -cp-access false

-create-domains

true|false Enables or disables creation of domains by a client (the Domain creation parameter).

To enable creation of domains by a client in client template ClientTemplate:# ./client_template -u ClientTemplate -create-domains true

-manage-phosting

true|false Enables or disables physical hosting management by a client (the Physical hosting management parameter).

To enable physical hosting management in client template ClientTemplate to:# ./client_template -u ClientTemplate -manage-phosting true

30

Page 31: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage_php_safe_mode

true|false Allows/Prohibits a client to turn PHP safe mode off and on. (The PHP safe mode management parameter.)

Default value is false.

Available since Plesk 8.1.1.

To allow he client with login name clientlogin to manage PHP safe mode:# ./client_pref -u clientlogin -manage_php_safe_mode_true

-manage-quota

true|false Enables or disables the hard disk quota management by a client (the Hard disk quota assignment parameter).

To enable the hard disk quota management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-quota true

-change-limits

true|false Enables or disables changing domain limits by the client (the Domain limits adjustment parameter).

To enable changing domain limits in client template ClientTemplate:# ./client_template -u ClientTemplate -change-limits true

-manage-dns true|false Enables or disables DNS zone management by a client (the DNS zone management parameter).

To enable DNS zone management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-dns true

-manage-log true|false Enables or disables log rotation management by a client (the Log rotation management parameter).

To enable log rotation management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-log true

-manage-crontab

true|false Enables or disables crontab management (task scheduler) by a client (the Crontab management parameter).

To enable crontab management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-crontab true

-manage-anonftp

true|false Enables or disables the anonymous FTP management by a client (the Anonymous FTP management parameter).

To enable the anonymous FTP management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-anonftp true

-manage-webapps

true|false Enables or disables Java applications management by a client (the Java applications management parameter).

To enable Java applications management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-webapps true

31

Page 32: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage-maillists

true|false Enables or disables mailing lists management by a client (the Mailing lists management parameter).

To enable mailing lists management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-maillists true

-manage-sh-access

true|false Enables or disables management of server shell access of any type by a client (the Management of shell access to server parameter, the Client cannot allow or disallow shell access and Client can allow access to any type of shell options).

To enable server shell access management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-sh-access true

-manage-not-chroot-shell

true|false Enables or disables management of server shell access to the chrooted environment by a client (the Management of shell access to server parameter, the Client can allow access only to a chrooted environment options).

To enable management of shell access only to the chrooted environment in a client template ClientTemplate:# ./client_template -u ClientTemplate -manage-not-chroot-shell false

-manage-subdomains

true|false Enables or disables management of subdomains by a client (the Subdomains management parameter).

To enable management of subdomains in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-subdomains true

-allow-local-backups

true|false Enables or disables backing up data and restoring data from backups using the the control panel repository by a client (the Allow backing up and restoring data and use / control panel's repository parameter).

To enable data backup and restore using the control panel's repository in client template ClientTemplate:# ./client_template -u ClientTemplate -allow-local-backups true

-allow-ftp-backups

true|false Enables or disables backing up data and restoring data from backups using the the FTP repository by a client (the Allow backing up and restoring data and use / FTP repository repository parameter).

To enable data backup and restore using the FTP repository in client template ClientTemplate:# ./client_template -u ClientTemplate -allow-ftp-backups true

32

Page 33: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage-drweb

true|false Enables or disables Dr.Web antivirus application management by a client (the Dr.Web antivirus management parameter).

Deprecated since Plesk 8.1.1. Use the manage_virusfilter option instead.

To enable management of the Dr.Web antivirus application in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-drweb true

-manage_virusfilter

true|false Allows/Prohibits a client changing settings of the antivirus tool used on his/her domains.

To enable management of the antivirus tool by the client with login name clientlogin:# ./client_pref -u clientlogin -manage_virusfilter true

-remote-access-interface

true|false Enables or disables the use of the remote XML interface by a client (the Ability to use remote XML interface parameter).

To allow the use the remote XML access interface in client template ClientTemplate:# ./client_template -u ClientTemplate -remote-access-interface true

-manage-domain-aliases

true|false Enables or disables management of domain aliases by a client (the Domain aliases management parameter).

To enable management of domain aliases in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-domain-aliases true

-manage-dashboard

true|false Enables or disables desktop (dashboard) management by a client (the Desktop management parameter).

Can be set to true only if the -dashboard option is set to true.

To enable desktop (dashboard) management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-dashboard true

33

Page 34: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-dashboard true|false Enables or disables the use

of the Desktop interface by a client. Sets the User interface parameter (the Desktop and standard interface are allowed and Only Desktop interface is allowed options only).

Can be set to false only if the -stdgui option is set to true.

-stdgui true|false Enables or disables the use of the standard interface by a client. Sets the User interface parameter (the Desktop and standard interface are allowed and Only standard interface is allowed options only).

Can be set to false only if the -dashboard option is set to true.

To allow the use of Desktop interface in client template ClientTemplate:

# ./client_template -u ClientTemplate -dashboard true To allow the use of

standard interface in client template ClientTemplate:

# ./client_template -u ClientTemplate -stdgui true To set the Desktop and

standard interface are allowed option for the User interface parameter:

# ./client_template -u ClientTemplate -dashboard true -stdgui true To set the Only standard

interface is allowed option for the User interface parameter:

# ./client_template -u ClientTemplate -dashboard false -stdgui true To set the Only Desktop

interface is allowed option for the User interface parameter:

# ./client_template -u ClientTemplate -dashboard true -stdgui false

-manage-spamfilter

true|false Enables or disables spam filter management by a client (the Spam filter management parameter).

To enable spam filter management in client template ClientTemplate:# ./client_template -u ClientTemplate -manage-spamfilter true

-max-dom <number> Sets the Maximum number of domains limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of domains limit in client template ClientTemplate to 10:# ./client_template -u ClientTemplate -max-dom 10

34

Page 35: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max-dom-aliases

<number> Sets the Maximum number of domain aliases limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of domain aliases limit in client template ClientTemplate to 10:# ./client_template -u -max-dom-aliases 10

-disk-space <number>[K|M|G]

Sets the Disk space limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Disk space limit in client template ClientTemplate to 100 MB:# ./client_template -u ClientTemplate -disk-space 100M

-max-traffic

<number>[K|M|G]

Sets the Maximum amount of traffic limit (per month) for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum amount of traffic limit in client template ClientTemplate to 10 GB/month:# ./client_template -u ClientTemplate -max-traffic 10G

-max-box <number> Sets the Maximum number of mailboxes limit (per month) for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mailboxes limit in client template ClientTemplate to 10:# ./client_template -u ClientTemplate -max-box 10

-mbox-quota <number>[K|M|G]

Sets the Set the mailbox quota limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Set the mailbox quota limit in client template ClientTemplate to 10 MB:# ./client_template -u ClientTemplate -mbox-quota 10M

-max-redir <number> Sets the Maximum number of mail redirects limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail redirects limit in client template ClientTemplate to 10:# ./client_template -u ClientTemplate -max-redir 10

-max-mg <number> Sets the Maximum number of mail groups limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail groups limit in client template ClientTemplate to 5:# ./client_template -u ClientTemplate -max-mg 5

-max-resp <number> Sets the Maximum number of mail autoresponders limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail autoresponders limit in client template ClientTemplate to 5:# ./client_template -u ClientTemplate -max-resp 5

35

Page 36: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max-wu <number> Sets the Maximum number of

web users limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of web users limit in client template ClientTemplate to 50:# ./client_template -u ClientTemplate -max-wu 50

-max-maillists

<number> Sets the Maximum number of mailing lists limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mailing lists limit in client template ClientTemplate to 30:# ./client_template -u ClientTemplate -max-maillists 30

-max-db <number> Sets the Maximum number of databases limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of databases limit in client template ClientTemplate to 20:# ./client_template -u ClientTemplate -max-db 2

-max-webapps

<number> Sets the Maximum number of Java applications limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of Java applications limit in client template ClientTemplate to 50:# ./client_template -u ClientTemplate -max-webapps 50

-max-subdom <number> Sets the Maximum number of subdomains limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of subdomains limit t in client template ClientTemplate to Unlimited:# ./client_template -u ClientTemplate -max-subdom -1

-expiration <YYYY-MM-DD>

Sets Validity period for for a client account.

Type "-1" to set the parameter to Unlimited.

To set the validity period in client template ClientTemplate to February 28, 2007:# ./client_template -u ClientTemplate -expiration 2007-2-28

-ip-pool add|del:<ip1>, <ip2>,..,<ipN>

Adds shared IP addresses to or deletes shared IP addresses from from a client's IP address pool (the Select shared IP addresses parameter).

To add shared IP addresses 192.168.67.78 and 192.168.78.89 to the IP address pool in client template ClientTemplate:# ./client_template -u ClientTemplate -ip-pool add:192.168.67.78,192.168.78.89

36

Page 37: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-excl-ip-num

<number> Sets the maximum number of exclusive IP addresses that can be assigned to a client (the Allocate exclusive IP addresses to the client / up to / IP addresses parameter).

To set the maximum number of exclusive IP addresses that can be assigned to a client in client template ClientTemplate to 5:# ./client_template -u ClientTemplate -excl-ip-num 5

37

Page 38: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

ColdFusion Service on Plesk Server: cfsetting Utility

The cfsetting utility is used to manage the ColdFusion Service. By using this utility, you can install and configure the ColdFusion service on the Plesk server.

Syntaxcfsetting <command> [<path>]Example

The following command line enables the ColdFusion software installed in the /usr/local/software/coldfusion directory on the Plesk server to work in the server mode:# ./cfsetting --server /usr/local/software/coldfusion

Commands

Command Parameter Description Example--server or -s

<path> Enables the ColdFusion application to work in the server mode.

<path> is the ColdFusion installation path parameter.

To enable the ColdFusion software installed in the /usr/local/software/coldfusion directory on the Plesk server to work in the server mode:# ./cfsetting --server /usr/local/software/coldfusionor# ./cfsetting -s /usr/local/software/coldfusion

--j2ee or -j

<path> Enables the ColdFusion application to work in the J2EE mode.

To enable the ColdFusion software installed in the /usr/local/software/coldfusion directory on the Plesk server to work in the server mode:# ./cfsetting --j2ee /usr/local/software/coldfusionor# ./cfsetting -j /usr/local/software/coldfusion

--help or -h

Displays help on the use of the utility.

To view help on the use of the utility:# ./cfsetting --helpor# ./cfsetting -h

38

Page 39: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Custom Buttons: custombutton UtilityThe custombutton utility is used to create custom buttons and manage their properties (interface location, button names, URLs, context help messages, and other parameters) through CLI.

Custom buttons of the following types can be created and managed by using this utility:

custom button pointing to a URL custom buttons linked to site applications

Syntaxcustombutton <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example 1

The following command line creates custom button CustomButton that opens URL example.com/webstore, places the custom button on domain administration pages, includes domain ID#, domain name, and client ID# in browser requests generated by clicking on the button, sets the context help message for the button as "Click to go to http://example.com/webstore", and makes the button available in control panels of all domain users.# ./custombutton --create -text CustomButton -url http://example.com/webstore -url_comp dom_id,dom_name,cl_id -conhelp "Click to go http://example.com/webstore" -location domain -public trueExample 2

The following command line creates custom button named SiteApp linked to site application SiteApplication installed on domain example.com and accessible at URL http://example.com/SiteApplication, and sets the context help message for the button as "Click to open SiteApplication".# ./custombutton --create -tex SiteApp -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -conhelp "Click to open SiteApplication"

39

Page 40: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Commands

Command Parameter Description Example--create or -m

Creates new custom button.

Requires the use of the -text and -url options.

To create a new custom button CustomButton (pointing to URL http://example.com) and print its database ID number:# ./custombutton --create -text CustomButton -url http://example.com -print-idor# ./custombutton -c -text CustomButton -url http://example.com -print-id

--info or -i

<id#> Displays properties of a custom button with the specified ID number.

To display properties of a custom button with the database ID# 14:# ./custombutton --info 14or# ./custombutton -i 14

--remove or -r

*<id#,id#,...>

Deletes one or more custom buttons with the specified ID numbers.

To delete custom buttons with ID# 14 and ID# 56:# ./custombutton --remove 14,56or# ./custombutton -r 14,56

--help or -h

Displays help on the use of the utility

To view help on the use of the utility:# ./custombutton --helpor# ./custombutton -h

--man or -m

Displays detailed help on the use of the utility with examples

To view detailed help with examples on the use of the utility:# ./custombutton --manor# ./custombutton -m

Options

Option Parameter Description Example-owner admin|

<user login name>|<domain name>

Assigns ownership of a custom button to a Plesk client. Is set to admin by default.

To set the client with login name ClientUser the owner of custom button CustomButton to be created:# ./custombutton -c -text CustomButton -url http://example.com -owner ClientUser

40

Page 41: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-sort_key <int> Sets the Priority parameter. Is

set to100 by default.To set the priority of appearance of custom button CustomButton on a Plesk page to 3:# ./custombutton -c -text CustomButton -url http://example.com -sort_key 3

-place client | domain | admin | navigation

Sets the Location parameter. Is set to client (the Client's Desktop/Home page option) by default. Other possible options: Domain Owner's Desktop/Home page - domain, Navigation panel - navigation, Administrator's desktop - admin.

To select the Domain Owner's Desktop/Home page option for Location parameter for custom button CustomButton:# ./custombutton -c -text CustomButton -url http://example.com -place domain

-text <button label>

Specifies the text accompanying a custom button (the Button label parameter).

Required with the --create command

To set Button Label for the custom button to be created to CustomButton:# ./custombutton -c -text CustomButton -url http://example.com

-url <URL> Specifies the URL that a custom button to be created will point to (the URL parameter).

Required for the --create command when creating custom buttons pointing to URLs.

To set the URL parameter to example.com for custom button CustomButton :# ./custombutton -c -text CustomButton -url http://example.com

-url_comp dom_id | dom_name | ftp_user | ftp_pass | cl_id | cname | pname | email

Specifies various parameters to be included with the custom button's URL in browser requests.

The following parameters can be included:

dom_id - Include domain ID

dom_name - Include domain nameftp_user - Include FTP user nameftp_pass - Include FTP user passwordcl_id - Include client ID

cname - Include client's company name pname - Include client's contact nameemail - Include client's e-mail

To include domain ID, domain name, and client ID in the browser requests generated by using custom button CustomButton:# ./custombutton -c -text CustomButton -url http://example.com -url_comp dom_id,dom_name,cl_id

41

Page 42: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-conhelp <text> Specifies text of a contextual

help message associated with a custom button (the Context help tip contents parameter).

To set the context help tip for the custom button CustomButton to "Click to go to example.com/webstore":# ./custombutton -c -text CustomButton -url http://example.com -conhelp "Click to go to example.com/webstore"

-file <path> Specifies path to the image file that will be used as the Background image for a custom button.

To set file ButtonImage.gif as the Background image for the custom button CustomButton:# ./custombutton -c -text CustomButton -url http://example.com -file "C:\Program Files\SWsoft\Plesk\ Images\PleskInterface\ ButtonImage.gif"

-public true | false

Specifies whether a custom button appears in control panels of users subordinate to the custom button's owner (the Visible to all sub-logins parameter).

Set to false by default.

To display custom button CustomButton that has the Location parameter set to Domain Owner's Desktop/Home page in control panels of all users on this domain:# ./custombutton -c -text CustomButton -url http://example.com -place domain -public true

-internal true | false

Specifies if the button's URL is opened in Plesk's own frame or in the new window (the Open URL in the Control Panel parameter).

Set to false by default.

To enable opening of the CustomButton custom button's URL http://example.com in Plesk's own frame:# ./custombutton -c -text CustomButton -url http://example.com -place domain -internal true

-print-id Prints the database ID number of a created custom button.

To create new custom button CustomButton with its URL set to example.com and print its database ID number:# ./custombutton -c -text CustomButton -url http://example.com -print-id

42

Page 43: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-siteapp-link

Links a custom button with a site application installed on a domain.

Requires concomitant use of the -siteapp-domain option.

To create a custom button CustomButton linked to a site application (if there is only a single application installed on a domain) that is accessible at URL http://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.comIf there are more than one application installed on a domain, you need to specify more options to identify the site application of interest.

-siteapp-domain

<domain> Specifies a domain on which a site application to be linked to a custom button is installed.

Used in conjunction with the -siteapp-link option.

To create a custom button CustomButton linked to a site application SiteApplication installed on domain example.com and accessible at URL http://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication

-siteapp-id

<int> Specifies the database ID# of a site application to be linked to a custom button.

To create a custom button CustomButton linked to a site application with database ID# 12 installed on domain example.com and accessible at URL http://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-id 12

43

Page 44: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-siteapp-name

<name> Specifies the name of a site application to be linked to a custom button.

To create a custom button CustomButton linked to a site application SiteApplication installed on domain example.com and accessible at URL http://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication

-siteapp-version

<string> Specifies the version of a site application to be linked to a custom button.

To create a custom button linked to a site application SiteApplication v.13.44.1 installed on domain example.com and accessible at URL http://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-version 13.44.1

-siteapp-release

<string> Specifies the release number of a site application to be linked to a custom button.

To create a custom button CustomButton linked to a site application SiteApplication with release number 1312.121 installed on domain example.com and accessible at URL http://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-version 1312.121

44

Page 45: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-siteapp-prefix

<directory>

Specifies the path (the Destination directory parameter) to the directory where the application is installed. The Destination directory parameter specifies the site application installation directory relative to the httpdocs directory and is determined when installing site application.

To create a custom button CustomButton linked to a site application SiteApplication which is installed in directory /httpdocs/siteapplication/v123 on domain example.com and accessible at URL http://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-prefix siteapplication/123

-siteapp-ssl

true | false

Set this option to true if a custom button is to be linked to a site application installed in the /httpsdocs directory, that is, accessible only through the HTTPS protocol.

To create a custom button CustomButton linked to a site application SiteApplication which is installed in the httpsdocs directory on domain example.com and accessible at URL https://example.com/SiteApplication:# ./custombutton -c -text CustomButton -url https://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-ssl true

-siteapp-subdomain

<name> Specifies the name of a subdomain if a site application is installed on a subdomain.

To create a custom button CustomButton linked to a site application SiteApplication which is installed in on the appsubdomain subdomain of domain example.com and accessible at URL http://appsubdomain.example.com/SiteApplication:# ./custombutton -c -text CustomButton -url http://appsubdomain.example.com/SiteApplication -sitepp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-subdomain appsubdomain

45

Page 46: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Database Servers: database-server UtilityThe database-server utility is used to manage database server entries in Plesk through CLI. By using this utility, you can perform the following tasks:

Creating database server entries in Plesk Setting and editing database server connection parameters in the entries

Syntaxdatabase-server <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line sets the new login name newdbadmin and the new password newdbadminpass for the database server administrator on a remote database server previously available at 192.168.67.78:3838 (as recorded in the database server entry in Plesk) and sets the IP address and port number for the entry to 192.168.78.89:3636.# ./database-server --update-server 192.168.72.16:67.78 -set 192.168.78.89:3636 -admin newdbadmin -passwd newdbadminpassCommands

5Command Parameter Description Example--create-server

<host name or IP address>:<port number>

Creates a database server entry in Plesk. Requires concomitant use of the -type option.

To create a database server entry in Plesk for a MySQL server available at IP address and port number 192.168.67.78:3838 and set the server administrator's login name dbadmin and password dbadminpass:# ./database-server --create-server 192.168.67.78:3838 -type mysql -admin dbadmin -passwd dbadminpass

46

Page 47: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

5Command Parameter Description Example--update-server

<host name or IP address>:<port number>

Updates database server connection settings - type, host address, port number - in the database server entry in Plesk.

The database server entry must exist in Plesk before executing this command.

The changes made by this command may adversely affect performance of site applications and user scripts.

Cannot be used to change the local MySQL database server entry settings.

To change the database server administrator's login name to newdbadmin and password to newdbadminpass on the remote MySQL server available at IP address and port number 192.168.67.78:3838:# ./database-server --update-server 192.168.67.78:3838 -admin newdbadmin -passwd newdbadminpass

--remove-server

<host name or IP address>:<port number>

Deletes a database server entry from Plesk. Only remote database servers that has no hosted databases on it can be deleted from Plesk. A default database server cannot be deleted.

To remove the database server entry from Plesk for the database server available at IP address and port number 192.168.67.78:3838:# ./database-server --remove-server 192.168.67.78:3838

--set-default-server

<host name or IP address>:<port number>

Assigns a remote database server entry as the default server for the database type. Only remote database servers can be set as default servers by using this command.

To set the database server server available at IP address and port number 192.168.67.78:3838 for databases of its type:# ./database-server --set-default-server 192.168.67.78:3838

--set-default-server-local

Assigns a local database server as the default server for the database type.

Requires concomitant use of the -type option.

To set the local MySQL server as the default server for MySQL databases:# ./database-server --set-default-server-local -type mysql

--help or -h

Displays help on the use of the utility.

To view help on the use of the utility:# ./database-server --helpor# ./database-server -h

47

Page 48: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Options

Option Parameter Description Example

-set <host name or IP address>:<port number>

Specifies the database server host and port number.

Used only with the --update-server command.

To change the IP address and port number to 192.168.78.89:3636 for the remote database server previously available at 192.168.72.16:3838 as recorded in the database server entry in Plesk:# ./database-server --update-server 192.168.72.16:3838 -type mysql -set 192.168.78.89:3636

-type mysql|postgresql

Specifies the type of a database server.

Used with --create-server, --update-server and --set-default-server-local commands.

-admin <login name>

Specifies database server administrator's login name.

Used with the --create-server and --update-server commands.

-passwd <password>

Specifies database server administrator's password.

Used with the --create-server and --update-server commands.

For additional comments, see the Note below the table.

To create a database server entry in Plesk for a MySQL server available at 192.168.67.78:3838 and set the server administrator's login name dbadmin and password dbadminpass:# ./database-server --create-server 192.168.67.78:3838 -type mysql -admin dbadmin -passwd dbadminpass

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

48

Page 49: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Databases: database UtilityThe database utility is used to manage databases and database users in Plesk through CLI. By using this utility, you can perform the following tasks:

Creating or deleting databases Adding and removing database users Adding or removing database access records for database users Editing database user credentials Setting charset for PostgreSQL databases

Syntaxdatabase <command> [<database name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates database DataStoreDB on a database server accessible at the IP address and port number192.168.67.78:3838 and prints the created database's Plesk ID number:

# ./database --create DataStoreDB -domain example.com -server 192.168.67.78:3838 -print-id

Commands

Command Parameter Description Example--create or -c

<database name>

Creates a database on a database server. Requires concomitant use of the -domain option. In addition, either the -type option is required if the database is to be created on a local database server or the -server option is required if the database is to be created on a remote database server.

To create database DataStoreDB on a the local MySQL server for domain example.com:# ./database --create DataStoreDB -domain example.com -type mysqlor # ./database -c DataStoreDB -domain example.com -type mysql

49

Page 50: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update or -u

<database name>

Updates database settings. Adds, edits, or removes a database user.

To add user db_user to database DataStoreDB:# ./database --update DataStoreDB -add_user db_useror# ./database –u DataStoreDB -add_user db_user

--remove or -r

<database name>

Deletes a database. To delete database DataStoreDB from the database server:# ./database --remove DataStoreDBor# ./database -r DataStoreDB

--remove-dbs

<id#,id#,...>

id# is the unique Plesk database ID for a database.

Deletes multiple databases from their respective databases servers.

To delete databases with with Plesk ID# 14 and ID# 56:# ./database --remove-dbs 14,56

--remove-dbus

<id#,id#,...>

id# is the unique Plesk database ID for a database user.

Deletes multiple database users.

To delete database users with Plesk ID# 22 and ID# 34:# ./database --remove-dbus 22,34

--help or -h

Displays help on the use of the utility.

To see the help info on the use of this utility:# ./database -–helpor# ./database –h

Options

Option Parameter Description Example-domain <domain

name>Specifies a domain name.

Used with the --create command.

-type postgresql | mysql

Specifies the type of the database.

Used only with the --create command.

To create database DataStoreDB on domain example.com on the local MySQL server:# ./database -c DataStoreDB -domain example.com -type mysql

50

Page 51: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-passwd <passwd> Sets the database user

password for accessing the database.

Used in conjunction with the -update_user option.

For additional comments, see the Note below the table.

To set the password to dbuserpass for user db_user to access database DataStoreDB:# ./database -u DataStoreDB -update_user db_user -passwd dbuserpass

-passwd_type plain | encrypted

Specifies the type of a database user password - plain or encrypted.

Set to plain by default.

Used in conjunction with the -update_user option.

For additional comments, see the Note below the table.

To set the type of the client's password to encrypted for the database user with login name db_user:# ./database -u DataStoreDB -update_user db_user -passwd_type dbuserpass

-add_user <database user login name>

Adds a database user to the database.

Requires concomitant use of the -passwd option.

To add the user with login name db_user to database DataStoreDB:# ./database -u DataStoreDB -add_user db_user -passwd userpass

-update_user <login name>

Updates database user login data.

To set the password to dbuserpass for user db_user to access database DataStoreDB:# ./database -u DataStoreDB -update_user db_user -passwd dbuserpass

-remove_user <user login name>

Removes a database user from the database.

To add the user with login name db_user to database DataStoreDB:# ./database -u DataStoreDB -remove_user db_user

-user_name <user login name>

Sets the login name for the DB user.

Used with the -update_user option.

To change the login name for the database user from db_user to db_newuser:# ./database -u DataStoreDB -update_user db_user -user_name db_newuser

51

Page 52: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-add-access <host name

or IP address>

Adds an access record for a database user: IP address or name of a host from which a database user can remotely access the database.

Host machine may be specified by either its host name or IP address. A subnet mask can be specified, too. MySQL wildcard characters (_ and %) are allowed; for more information, consult http://dev.mysql.com/doc/refman/5.0/en/connection-access.html).

To enable remote access to database DataStoreDB from a host with IP address 192.168.67.78 for the database user db_user:# ./database -u DataStoreDB -update_user db_user -passwd dbuserpass -add-access 192.168.67.78

-remove-access

<host name or IP address>

Removes an access record for a database user: IP address or name of a host from which a database user can remotely access the database.

Host machine may be specified by either its host name or IP address. A subnet mask can be specified, too. MySQL wildcard characters (_ and %) are allowed; for more information, consult http://dev.mysql.com/doc/refman/5.0/en/connection-access.html).

To disable remote access to database DataStoreDB from a host with IP address 192.168.67.78 for the database user db_user:# ./database -u DataStoreDB -update_user db_user -passwd dbuserpass -remove-access 192.168.67.78

-server host[:port]

Specifies the host name or IP address and port number for the machine on which a database server is hosted.

Used only with the --create command.

-print-id Prints the created database or database user ID number.

Used only with the --create command or the -add_user option.

To create database DataStoreDB on a database server accessible at 192.168.67.78:3838 and print the database's Plesk ID number:# ./database --create DataStoreDB -domain example.com -server 192.168.67.78:3838 -print-id

52

Page 53: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-charset <charset> Sets a character set for a

PostgreSQL database to be created.

To create database DataStoreDB on domain example.com on the PostgreSQL server available at 192.168.67.78:3838 and set the database's charset to UTF-8:# ./database -c DataStoreDB -domain example.com -charset UTF-8 -server 192.168.67.78:3838

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

53

Page 54: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Desktop Presets: desktop UtilityThe desktop utility enables managing desktop presets through CLI. By using this utility, you can perform the following tasks:

Creating or deleting desktop presets Changing desktop preset type Setting default desktop presets Displaying a list of a available desktop presets

Syntaxdesktop <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line adds desktop preset AdminDesktop to the administrator's repository of desktop presets and allows overwriting of the preexisting desktop with the same name.# ./desktop --add-preset /usr/local/presets/AdminDesktop.xml -overwrite true

Commands

Command Parameter Description Example--set-admin or -sa

Changes type of an existing desktop preset to the Administrator's desktop preset type.

Requires concomitant use of the -desktop-preset option.

To set existing desktop preset named AdminDesktop as an administrator's desktop preset:# ./desktop --set-admin -desktop-preset AdminDesktopor# ./desktop -sa -desktop-preset AdminDesktop

54

Page 55: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update-preset or -up **

<preset name>

Updates properties of a desktop preset.

Requires concomitant use of the -type option.

To change the type of desktop preset named AdminDesktop to Domain owner's desktop preset:# ./desktop --update-preset -desktop-preset AdminDesktop -type domainor# ./desktop -up AdminDesktop -type domain

--preset-lists or -pl

Displays the list of existing desktop presets.

To display the list of available desktops:# ./desktop --preset-listsor# ./desktop -pl

--add-preset or -ap

<file name>

Adds a preset to administrator's repository of desktop presets.

To add a desktop preset AdminDesktop to the administrator's repository of desktop presets from a desktop preset file AdminDesktop.xml:# ./desktop --add-preset /usr/local/presets/AdminDesktop.xmlor# ./desktop -ap /usr/local/presets/AdminDesktop.xml

--remove-preset or -rp

<preset name>

Deletes a desktop preset from administrator's repository of desktop presets.

To add a desktop preset to the administrator's repository of desktop presets from a desktop preset file AdminDesktop.xml:# ./desktop --remove-preset AdminDesktopor# ./desktop -rp AdminDesktop

--help or -h Displays help on the use of the utility.

To view help on the use of the utility:# ./desktop --helpor# ./desktop -h

Options

Option Parameter Description Example-desktop-preset

<preset name> Sets desktop preset To set existing desktop preset named AdminDesktop as an administrator's desktop preset:# ./desktop -sa -desktop-preset AdminDesktop

55

Page 56: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-default true|false Renders desktop

preset the default preset for the Plesk users category specified by the -type option.

To set desktop preset AdminDesktop as the default administrator's desktop preset:# ./desktop -up AdminDesktop -default true -type admin

-overwrite

true|false Allows overwriting of a desktop preset with another desktop with the same name.

Used only with the --add-preset command.

To add a desktop preset AdminDesktop to the administrator's repository of desktop presets from desktop preset file /usr/local/presets/AdminDesktop.xml and replace existing desktop with the same name in Plesk:# ./desktop -ap /usr/local/presets/AdminDesktop.xml -overwrite true

-type admin|client|domain

Sets desktop preset type:

admin - Default Administrator's desktop, domain - Default domain owner desktop, client - Default client desktop.

To change the type of desktop preset named AdminDesktop to Domain owner's desktop preset:# ./desktop -up -desktop-preset AdminDesktop -type domain

56

Page 57: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

DNS Zone Template: server_dns UtilityThe server_dns utility is used to manage the Plesk server's DNS zone template through CLI. By using this utility, you can perform the following tasks:

Adding resource records to or deleting them from the Plesk server's DNS zone template

Specifying the status to be set for a domain's DNS zone upon creation of a domain Updating the Start-of-Authority (SOA) record for the DNS zone template Setting the Plesk name server DNS zone preferences regarding recursive DNS

queries from different types of hosts Managing the Access control list (ACL records)

Syntaxserver_dns <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line adds the following two resource records to the domain DNS zone template, while removing all pre-existing resource records from the domain DNS zone template:

new MX resource record <domain> specifying mail.<domain> as the mail exchanger for the record, and setting the mail exchanger's priority to 15.

new NS resource record <domain> setting domain ns.<domain> as the name server.

# ./server_dns --set "MX,"",mail.<domain>,15;NS,"",ns.<domain>"

57

Page 58: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Commands

Command Parameter Description Example--add or -a

Adds a resource record to the Plesk server's domain DNS zone template. If a record already exists, the command returns code 2.

To add new MX resource record mail.<domain> to the domain DNS zone template and specify mail exchanger mail.<domain> and set the mail exchanger priority to 35 for the record:# ./server_dns --add -mx "" -mailexchanger "mail.<domain>" -priority 35or# ./server_dns -a -mx "" -mailexchanger "mail.<domain>" -priority 35

--set or -s

"<record 1>;<record 2>;...<record N>"where the <record > parameter is composed according to the following rules: for MX record:

MX,"<subdomain name>",<mail exchanger name>."<domain>",<priority>

for NS record:NS,"<subdomain name>",<name server name>."<domain>"

for A record:A,<subdomain name>,<IP address>|"<ip>"

for PTR record:PTR,<IP address/subnet mask>,<subdomain name>

for CNAME record:CNAME,<subdomain name>,<canonical domain name>|"<domain>"

for TXT record:TXT,<subdomain name>,<text>

For more details, consult descriptions of the options in the following table for adding resource records of respective types individually.

Adds specified resource records to and removes all pre-existing resource records from the Plesk server's domain DNS zone template.

To add the following two resource records to the domain DNS zone template, while removing all pre-existing resource records from the DNS zone: new MX resource record

<domain> specifying subdomain name mail.<domain> as the mail exchanger for the record, and setting the mail exchanger's priority to 15:

new NS resource record <domain> setting domain ns.<domain> as the name server:

# ./server_dns --set "MX,"",mail.<domain>,15;NS,"",ns.<domain>"or# ./server_dns -s "MX,"",<domain>,15;NS,"",ns.<domain>"

58

Page 59: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update-server or -u

Updates the Plesk server's domain DNS zone template.

To enable support for recursive DNS queries for hosts on the local network only:# ./server_dns -u -recursion localnets

--update-soa

Updates the SOA record settings the Plesk server's domain DNS zone template.

To set the TTL parameter to 5 hours for the SOA record for the domain DNS zone template:# ./server_dns --update-soa -soa-ttl 5H

--info Displays the list of resource records for the Plesk server's domain DNS zone template.

To display the list of resource records in the domain DNS zone template:# ./server_dns --info

--help or -h

Displays help on the use of the utility.

To display help on the use of the dns utility:# ./server_dns --helpor# ./server_dns –h

Options

Option Parameter Description Example-recursion

any|localnets|localhost

Sets the Plesk name server DNS zone preferences: any - will support recursive

DNS queries for any requesting host.

localnets - will support recursive DNS queries for any host on the local network only.

localhost - will support recursive DNS queries for the local host only

Used with the --update-server command only.

To enable support for recursive DNS queries for hosts on the local network only:# ./server_dns -u -recursion localnets

59

Page 60: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-status enabled|

disabledSets the status of a domain's DNS zone (Enabled or Disabled) when the domain DNS zone is created during domain creation. Only newly created domains will inherit the DNS zone status.

Used with the --update-server command only.

To disable domain DNS zones for newly created domains:# ./server_dns -u -status disabled

-add-acl <IP address 1>[[/<subnet mask>],<IP address 2>[/<subnet mask>], ... <IP address N>[/<subnet mask>]]

Adds host or network IP addresses to the Access Control list (ACL) (ACL records).

To add records 192.168.67.78 and 192.168.0.0/24 to the ACL:# ./server_dns -u -add-acl 192.168.67.78,192.168.0.0/24

-a <subdomain name>

Specifies the A type resource record for a subdomain in the Plesk server's domain DNS zone template.

Used with the --add.

Requires concomitant use of the -ip option.

-ip <IP address>|"<ip>"

Specifies an IP address or a placeholder for a domain's IP address for creating an A type resource record in the Plesk server's domain DNS zone template.

Used only with the --add command.

To add new A resource record subdom.<domain> (specifying a placeholder for a domain IP address for the record) to the domain DNS zone template:# ./server_dns -a -a subdom -ip "<ip>"

-ns <subdomain name>|""

Specifies the NS type resource record in the Plesk server's domain DNS zone template.

Used only with the --add command.

Requires concomitant use of the -nameserver option.

-nameserver

<domain name>|"[<subdomain name>.]<domain>"

Specifies the name of a nameserver or a placeholder for creating an NS type resource record in the Plesk server's domain DNS zone template.

To add a new NS resource record <domain> specifying domain name <domain> as the name server to the DNS zone template:# ./server_dns -a -ns "" -nameserver "ns.<domain>"

60

Page 61: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-mx <subdomain

name>|""Specifies the MX type resource record in the Plesk server's domain DNS zone template.

Used only with the --add command.

Requires concomitant use of the -mailexchanger option.

-mailexchanger

<domain name>|"[<subdomain name>.]<domain>"

Specifies the name of a mailexchanger or a placeholder for creating an MX type DNS record in the Plesk server's domain DNS zone template.

-priority

<number> Specifies the mail exchanger priority for creating an MX type DNS record in the Plesk server's domain DNS zone template.

To add new MX resource record <domain> specifying domain name mail.<domain> as the mail exchanger for the record, and setting the mail exchanger's priority to 15 to the domain DNS zone template:# ./server_dns -a -mx "" -mailexchanger "mail.<domain>" -priority 15

-cname <subdomain name>|""

Specifies the CNAME type resource record in the Plesk server's domain DNS zone template.

Used only with the --add command.

Requires concomitant use of the -canonical option.

-canonical

<domain name>|[<subdomain name>.]<domain>"

Specifies a canonical name or a placeholder for creating a CNAME type DNS record in the Plesk server's domain DNS zone template.

To add new CNAME type resource record subdom.<domain> for a canonical name <domain> to the domain DNS zone template: # ./server_dns -a -cname subdom -canonical "<domain>"

-ptr <subdomain name>|""

Specifies the PTR type resource record in the Plesk server's domain DNS zone template.

Used with the --add and --del commands only.

Requires concomitant use of the -subnet option.

-subnet <IP address>/<subnet mask>|"<ip>"/<subnet mask>

Specifies an IP address and a subnet mask or a placeholder for creating a PTR type DNS record in the Plesk server's domain DNS zone template.

To add new PTR type DNS record "<ip>"/16 for <domain> to the domain DNS zone template:# ./server_dns -a -ptr "" -subnet "<ip>"/16

61

Page 62: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-txt <text>|"" Specifies the TXT type

resource record in the Plesk server's domain DNS zone template.

Used only with the --add.

Requires concomitant use of the -domain option if the record is created for a specific subdomain name.

-domain <subdomain name>|""

Specifies a subdomain name for creating a TXT type resource record in the Plesk server's domain DNS zone template.

Used only with the --add command.

To specify the TXT type DNS record "This record is used to implement the Senders Policy Framework and DomainKeys specifications" for the specific subdomain name subdom in the domain DNS zone template:# ./server_dns -a -txt "This record is used to implement the Senders Policy Framework and DomainKeys specifications" -domain subdom

-soa-ttl <number>[S|M|H|D|W]

Sets the TTL parameter for the SOA record in the Plesk server's domain DNS zone template.

Used with the--update-soa command only.

-soa-refresh

<number>[S|M|H|D|W]

Sets the Refresh parameter for the SOA record in the Plesk server's domain DNS zone template.

Used with the --update-soa command only.

-soa-retry

<number>[S|M|H|D|W]

Sets the Retry parameter for the SOA record in the Plesk server's domain DNS zone template.

Used with the --update-soa command only.

-soa-expire

<number>[S|M|H|D|W]

Sets the Expire parameter for the SOA record in the Plesk server's domain DNS zone template.

Used with the --update-soa command only.

-soa-minimum

<number>[S|M|H|D|W]

Sets the Minimum parameter for the SOA record in the Plesk server's domain DNS zone template.

Used with the --update-soa command only.

To set the TTL parameter to 5 hours, the Refresh parameter to 4 hours, the Retry parameter to 10 seconds, the Expire parameter to 2 weeks, and the Minimum parameter to 2 days for the SOA record in the domain DNS zone template:# ./server_dns --update-soa -soa-ttl 5H -soa-refresh 4H -soa-retry 10S -soa-expire 2W -soa-minimum 2D

62

Page 63: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

DNS Zones on Domains: dns UtilityThe dns utility is used to manage DNS zones on domains and domain aliases through CLI. By using this utility, you can perform the following tasks:

Adding resource records to or deleting them from a domain's or domain alias' DNS zone

Enabling or disabling a local DNS service on a domain or domain alias Setting Plesk name server as the master or slave server for a DNS zone Assigning external master DNS servers for a DNS zone Enabling or disabling the www-prefixed alias (in the www.<domain name> form)

support for canonical domain names Updating the Start-of-Authority (SOA) record for a DNS zone

Syntaxdns <command> <domain name>|<domain alias> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line removes all pre-existing resource records from the DNS zone on domain example.com and adds the following two records to the DNS zone:

new MX resource record mail3.example.com specifying domain name mail.example.com as the mail exchanger and setting the mail exchanger's priority to 15

new NS resource record ns2.example.com setting domain ns.example.com as the name server

# ./dns --set example.com -list "MX,mail3,mail.example.com,15;NS,ns2,ns.example.com"

Commands

Command Parameter Description Example--add or -a

<domain name>| <domain alias>

Аdds a resource record to a domain's DNS zone. If a record already exists, the command returns code 2.

To add new MX resource record mail3.example.com to the DNS zone on domain example.com and specify mail exchanger mail.example.com for the record:# ./dns --add example.com -mx mail3 -mailexchanger mail.example.comor# ./dns -a example.com -mx mail3 -mailexchanger mail.example.com

63

Page 64: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--set or -s

<domain name>| <domain alias>

Adds specified resource records to and removes all pre-existing resource records from a domain's DNS zone.

Requires concomitant use of the -list option.

To add the following two resource records to the DNS zone of domain example.com, while removing all pre-existing resource records from the DNS zone: new MX resource record

mail3.example.com specifying domain name mail.example.com as the mail exchanger for the record, and setting the mail exchanger's priority to 15:

new NS resource record ns2.example.com setting domain ns.example.com as the name server:

# ./dns --set example.com -list "MX,mail3,example.com,15;NS,ns2,ns.example.com"or# ./dns -s example.com -list "MX,mail3,example.com,15;NS,ns2,ns.example.com"

--del or -d

<domain name>| <domain alias>

Deletes a resource record from a domain's DNS zone.

To delete an existing MX resource record mail3.example.com (for which mail exchanger mail.example.com is specified) from the DNS zone for domain example.com:# ./dns --del example.com -mx mail3 -mailexchanger mail.example.comor# ./dns -d example.com -mx mail3 -mailexchanger mail.example.com

--del-all or -da

<domain name>| <domain alias>

Deletes all resource records from a domain's DNS zone.

To delete all existing resource records from the DNS zone for domain example.com:# ./dns --del-all example.comor# ./dns -da example.com

--reset or -res

<domain name>| <domain alias>

Restores the default resource records for a domain's zone based on the Plesk server DNS zone template.

Requires concomitant use of the -ip option.

To restore the default resource records for a domain's zone based on the Plesk server DNS zone template:# ./dns --reset example.com -ip 81.1.204.9or# ./dns -res example.com -ip 81.1.204.9

--on <domain name>| <domain alias>

Enables DNS service on a domain or domain alias.

To enable DNS service on domain example.com:# ./dns --on example.com

64

Page 65: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--off <domain

name>| <domain alias>

Disables DNS service on a domain or domain alias.

To disable DNS service on domain example.com:# ./dns --off example.com

--set-master

<domain name>| <domain alias>

Sets the Plesk name server as the master server for domain's or domain alias' DNS zone.

To set the Plesk name server as the master server for DNS zone on domain example.com:# ./dns --set-master example.com

--set-slave

<domain name>| <domain alias>

Sets the Plesk name server as the slave server for domain's or domain alias' DNS zone.

To set the Plesk name server as the slave server for DNS zone on domain example.com:# ./dns --set-slave example.com

--update-soa

<domain name>| <domain alias>

Updates the SOA record settings for domain's or domain alias' DNS zone.

To set the TTL parameter to 5 hours for the SOA record for the DNS zone on domain example.com:# ./dns --update-soa example.com -soa-ttl 5H

--info <domain name>| <domain alias>

Displays the list of resource records for a domain's or domain alias' DNS zone.

To display the list of resource records in the DNS zone for domain example.com:# ./dns --info example.com

--help or -h

Displays help on the use of the utility.

To display help on the use of the dns utility:# ./dns --helpor# ./dns –h

Options

Option Parameter Description Example-a <subdomain name> Specifies the A type

resource record for a subdomain in a domain's DNS zone.

Used with the --add and --del commands only.

Requires concomitant use of the -ip option.

-ip <IP address> Specifies an IP address for creating an A type resource record in a domain's DNS zone.

Used with the --add and --del commands only.

To add new A resource record subdom.example.com specifying IP address 192.168.67.78 for the subdomain to the DNS zone on domain example.com:# ./dns -a example.com -a subdom -ip 192.168.67.78

65

Page 66: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

-ns <subdomain name> Specifies the NS type resource record in a domain's DNS zone.

Used with the --add and --del commands only.

Requires concomitant use of the -nameserver option.

-nameserver

<domain name> Specifies the name of a nameserver for creating an NS type resource record in a domain's DNS zone.

To add a new NS resource record ns2.example.com specifying domain name example.net as the name server to the DNS zone on domain name example.com:# ./dns -a example.com -ns ns2 -nameserver example.net

-mx <subdomain name> Specifies the MX type resource record in a domain's DNS zone.

Used with the --add and --del commands only.

Requires concomitant use of the -mailexchanger option.

-mailexchanger

<domain name> Specifies the name of a mail exchanger for creating an MX type DNS record in a domain's DNS zone.

-priority

<number> Specifies the mail exchanger priority for creating an MX type DNS record in a domain's DNS zone.

To add new MX resource record mail3.example.com specifying domain name mail.example.com as the mail exchanger for the record, and setting the mail exchanger's priority to 15 to the DNS zone on domain example.com:# ./dns -a example.com -mx mail3 -mailexchanger mail.example.com -priority 15

-cname <subdomain name> Specifies the CNAME type resource record in a domain's DNS zone.

Used with the --add and --del commands only.

Requires concomitant use of the -canonical option.

-canonical

<domain name> Specifies a canonical name for creating a CNAME type DNS record in a domain's DNS zone.

To add new CNAME type resource record subdom.example.com for a canonical name example.org to the DNS zone on domain example.com: # ./dns --add example.com -cname subdom -canonical example.org

66

Page 67: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

-ptr <subdomain name> Specifies the PTR type resource record in a domain's DNS zone.

Used with the --add and --del commands only.

Requires concomitant use of the -subnet option.

-subnet <IP address>/<subnet mask>

Specifies an IP address and a subnet mask for creating a PTR type DNS record in a domain's DNS zone.

To add new PTR type DNS record 192.168.12.1/16 for subdomain subdom in the DNS zone for domain example.com:# ./dns -a example.com -ptr subdom -subnet 192.168.12.1/16

-txt <text> Specifies the TXT type resource record in a domain's DNS zone.

Used with the --add and --del commands only.

Requires concomitant use of the -domain option if the record is created for a subdomain of the domain.

-domain <subdomain name> Specifies a subdomain name for creating a TXT type resource record in a domain's DNS zone.

Used with the --add and --del commands only.

To specify the TXT type DNS record "This record is used to implement the Senders Policy Framework and DomainKeys specifications" for subdomain name subdom in the DNS zone for domain example.com:# ./dns -a example.com -txt "This record is used to implement the Senders Policy Framework and DomainKeys specifications" -domain subdom

-www <true/false> Enables or disables support of the www-prefixed alias for a canonical domain name in a domain's DNS zone (the www parameter for a domain name under the Domain Administrator preferences).

Used with the --reset command only.

Creates or deletes a CNAME type resource record in the www.<domain name> form.

To enable support of the www-prefixed alias www.example.com (pointing to domain example.com) in the DNS zone on domain example.com:# ./dns -res example.com -www true

67

Page 68: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

-primary <IP address> Adds an IP address of a primary DNS server for a domain's DNS zone.

Used with the --add and --del and --reset commands only.

To add IP address 192.168.67.78 of the primary DNS server for DNS zone on domain example.com:# ./dns -a example.com -www true

-soa-ttl <number>[S|M|H|D|W]

Sets the TTL parameter for the SOA record for a domain' or domain alias' DNS zone.

Used with the--update-soa command only.

-soa-refresh

<number>[S|M|H|D|W]

Sets the Refresh parameter for the SOA record for a domain' or domain alias' DNS zone.

Used with the --update-soa command only.

-soa-retry

<number>[S|M|H|D|W]

Sets the Retry parameter for the SOA record for a domain' or domain alias' DNS zone.

Used with the --update-soa command only.

-soa-expire

<number>[S|M|H|D|W]

Sets the Expire parameter for the SOA record for a domain' or domain alias' DNS zone.

Used with the --update-soa command only.

-soa-minimum

<number>[S|M|H|D|W]

Sets the Minimum parameter for the SOA record for a domain' or domain alias' DNS zone.

Used with the --update-soa command only.

To set the TTL parameter to 5 hours, the Refresh parameter to 4 hours, the Retry parameter to 10 seconds, the Expire parameter to 2 weeks, and the Minimum parameter to 2 days for the SOA record in the DNS zone on domain example.com:# ./dns --update-soa example.com -soa-ttl 5H -soa-refresh 4H -soa-retry 10S -soa-expire 2W -soa-minimum 2D

68

Page 69: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

-list "<record 1>;<record 2>;...<record N>"where the <record > parameter is composed according to the following rules: for MX record:

MX,<subdomain name>,<mail exchanger name>,<priority>

for NS record:NS,<subdomain name>,<name server name>

for A record:A,<subdomain name>,<IP address>

for PTR record:PTR,<IP address/subnet mask>,<subdomain name>

for CNAME record:CNAME,<subdomain name>,<canonical domain name>

for TXT record:TXT,<subdomain name>,<text>

Consult descriptions of the options in this table for adding resource records of respective types individually.

Specifies resource records to be included in a domain's DNS zone.

Used with the --update-soa command only.

To add the following two resource records to the DNS zone of domain example.com, while removing all pre-existing resource records from the DNS zone: new MX resource record

mail3.example.com specifying domain name mail.example.com as the mail exchanger for the record, and setting the mail exchanger's priority to 15:

new NS resource record ns2.example.com setting domain ns.example.com as the name server:

# ./dns -s example.com -list "MX,mail3,mail.example.com,15;NS,ns2,ns.example.com"

69

Page 70: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Domain Accounts: domain UtilityThe domain utility is used to manage domains through CLI. By using this utility, you can perform the following tasks:

Creating, renaming, and removing domains Enabling/disabling the existing domains Managing domain user accounts Managing domain hosting parameters such as support of various scripting

languages, log settings, hard disk limits, etc.

Syntaxdomain <command> <domain name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

The following command line creates and enables domain example.com, assigns the ownership of the domain to an existing Plesk client with login clientlogin, assigns IP address 192.168.67.78 to the domain, enables physical hosting and DNS zone on the domain, sets login name ftpuserlogin and password ftpuserpass for the FTP user, and enables CGI and PHP support on the domain.# ./domain --create example.com -clogin clientlogin -ip 192.168.67.78 -status enabled -hosting true -hst_type phys -dns true -login ftpuserlogin -passwd ftpuserpass -cgi true -php true

Commands

Сommand Parameter Description Example--create or --c

<domain name>

Creates a new domain.

Requires concomitant use of the -clogin option.

To create new domain example.com for a client with login name clientlogin:# ./domain --create example.com -clogin clientlogin - ip 192.168.67.78or# ./domain -c example.com -clogin clientlogin

--update or --u

<domain name>

Updates configuration of an existing domain.

To enable domain example.com:# ./domain -u example.com -status enabled

70

Page 71: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Сommand Parameter Description Example--remove or --r

<domain name>

Deletes an existing domain.

To delete domain example.com:# ./domain --remove example.comor # ./domain -r example.com

--info or -i

<domain name>

Displays information about configuration of a domain.

To display configuration information about domain example.com:# ./domain --info example.comor# ./domain --i example.com

--on <domain name>

Enables a domain. To enable domain example.com:# ./domain --on example.com

--off <domain name>

Disables a domain. To disable domain example.com:# ./domain --off example.com

--change-owner

<domain_name>

Changes the owner of a domain.

Requires concomitant use of the -clogin option.

To make the client with login name clientlogin the owner of domain example.com:# ./domain --change-owner example.com -clogin clienlogin

--shells or -s

<domain name>

Displays the list of available shells on a domain.

To display the list of shells available on the Plesk server:# ./domain --shells

--help or -h

Displays help on the use of the utility.

To display help on the use of the domain utility:# ./domain --helpor# ./domain -h

71

Page 72: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Options

Option Parameter Description Example

-status enabled| disabled| admin,domadm, parent, client, expired

Enables or disables a domain (the enabled or disabled parameters, respectively). Disables domain and sets the domain status to Domain is disabled by administrator (admin), Domain is disabled by client (client) , Domain is expired (expired). Sets the domain status to the status of the client account that owns the domain (parent). The use of the domadm parameter is restricted; the parameter should not be used for changing the domain status.

To enable domain example.com:# ./domain -u example.com -status enabledTo assign the status of domain example.com to the status of the client account that owns it:# ./domain -u example.com -status parent

-new_name <domain name>

Renames a domain.

Used only with the -u command.

To change the name of the domain example.com to newname.org:# ./domain -u example.com -new_name newname.org

-dns true| false

Enables or disables DNS zone for a domain.

To enable DNS zone for domain example.com:# ./domain -u example.com -dns trueTo disable a DNS zone for domain example.com:# ./domain -u example.com -dns false

-www true| false

Enables the www prefix option for Domain name.

Set to true by default.

To disable the www prefix option for domain name example.com:# ./domain -u example.com -www false

-hosting true| false

Enables or disables hosting for a domain.

Set to false by default.

Requires concomitant use of the -ip option.

To enable hosting for domain example.com:# ./domain -u example.com -hosting true -ip 192.168.76.87

72

Page 73: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-hst_type phys| std| frm

Sets the type of hosting on a domain: phys - physical hosting, std - standard forwarding, frm - frame forwarding.

Set to phys by default.

Requires concomitant use of the -ip option.

When the std or frm parameters are specified, the -target_url option must also be used.

To set up the standard forwarding type of hosting (with forwarding to newname.org) for existing domain example.com:# ./domain -u example.com -hst_type std -target_url newname.org -ip 192.168.76.87

-target_url <URL> Sets a target URL for the Standard forwarding and Frame forwarding types of hosting.

Must be used concomitantly with the -ip option and the -hst_type option specifying the std or frm parameters.

To set up a target URL for domain example.com with the standard forwarding type of hosting (forwarding to newname.org):# ./domain -u example.com -target_url newname.org -hst_type std -ip 192.168.76.87

-ip <ip address>

Specifies the IP address of a domain that is created or updated. For domains with physical hosting, the option also specifies the IP address at which domain content is hosted.

Must be used concomitantly with options creating a domain or specifying hosting type for a domain (-hosting, -hst_type, -target_url).

To specify an IP address for domain example.com when creating it:# ./domain -c example.com -clogin clientlogin -ip 192.168.76.87To indicate IP address of the domain, where physical hosting configured:# ./domain -c example.com -hosting -hst_type -phys true -ip 192.168.76.87

-login <login name>

Specifies FTP user login name, for example, while creating a new domain with physical hosting or changing hosting type for an existing domain.

Updates current FTP user login name.

To create FTP user with login name ftplogin and password ftppass when creating domain example.com with physical hosting:# ./domain -c example.com -hosting true -hst_type phys -clogin clientlogin -login ftplogin -passwd ftppassTo change the FTP user login name to newftplogin on domain example.com with physical hosting:# ./domain -u example.com -login ftplogin

73

Page 74: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-passwd <password>

Specifies the FTP user password on a domain with physical hosting. No password is set by default.

To change the FTP user password to newftppass:# ./domain -update example.com -passwd newftppass

-passwd_type

plain| crypt

Specifies the type of the FTP user password - plain or cryptic.

Set to plain by default.

To set the type of FTP user password to cryptic for existing domain example.com with physical hosting:# ./domain -u example.com -passwd_type crypt

-shell <shell name>|forbidden

Enables or disables shell access for FTP user and sets the OS system shell for FTP user access. (You can use the --shells command to display the list of available shells).

To enable shell access and set the /bin/sh/ shell for FTP user on domain example.com:# ./domain -u example.com -shell /bin/sh

-hard_quota <number>[K|M|G]

Sets the Hard disk quota parameter for domain. Type 0 to set the parameter to Unlimited. A number without a letter is interpreted as the number of bytes.

To set a 10 Mb hard disk quota for domain example.com:# ./domain -u example.com -hard_quota 10Mor# ./domain -u example.com -hard_quota 10000K

-fp true|false

Enables or disables FrontPage support on a domain. Is set to false by default.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To enable Microsoft FrontPage support for domain example.com:# ./domain -u example.com -fp true

-fp_ssl true| false

Enables or disables FrontPage Over SSL support on a domain. Is set to false by default.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To enable Microsoft FrontPage Over SSL support on domain example.com:# ./domain -u example.com -fp_ssl true

-fpauth true| false

Enables or disables FrontPage authoring on a domain. Is set to false by default.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To enable Microsoft FrontPage authoring on domain example.com:# ./domain -u example.com -fpauth true

74

Page 75: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-fplogin <string> Sets the login name for the FrontPage user.Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To set the FrontPage user login name to fploginname on domain example.com:# ./domain -u example.com -fplogin fploginname

-fppasswd <string> Sets the password for the FrontPage user.Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To set the FrontPage user password to fpuserpass on domain example.com:# ./domain -u example.com -fppasswd fpuserpass

-creation-date

<YYYY-MM-DD>

Sets the domain creation date.

Used only with the --create command.

To set the creation date for domain example.com to 2006-12-30:# ./domain -c example.com -clogin clientlogin -creation-date 2006-12-30

-ssi true| false

Enables or disables SSI support on a domain.

Set to false by default.

To enable SSI support on domain example.com:# ./domain -u example.com -ssi true

-php true| false

Enables or disables PHP support on a domain.

Set to false by default.

To enable PHP support on domain example.com:# ./domain -u example.com -php true

-php_safe_mode

true| false

Enables or disables safe mode for PHP support on domain.

Set to true by default.

To disable safe mode for PHP support on domain example.com:# ./domain -u example.com -php true -php_safe_mode false

-cgi true| false

Enables or disables CGI support on a domain.

Set to false by default.

To enable CGI support on domain example.com:# ./domain -u example.com -cgi true

-perl true| false

Enables or disables Perl support on a domain.

Set to false by default.

To enable Perl support on domain example.com:# ./domain -u example.com -perl true

-asp true| false

Enables or disables Apache ASP support on a domain.

Set to false by default.

To enable Apache ASP support on domain example.com:# ./domain -u example.com -asp true

-python true| false

Enables or disables Python support on a domain.

Set to false by default.

To enable Python support on domain example.com:# ./domain -u example.com -python true

75

Page 76: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-fastcgi true| false

Enables or disables FastCGI support on a domain.

Set to false by default.

To enable FastCGI support on domain example.com:# ./domain -u example.com -fastcgi true

-coldfusion true| false

Enables or disables ColdFusion support on a domain.

Set to false by default.

To enable ColdFusion support on domain example.com:# ./domain -u example.com -coldfusion true

-ssl true| false

Enables or disables SSL support on a domain.

Set to false by default.

To enable SSL support on domain example.com:# ./domain -u example.com -ssl true

-same_ssl true| false

Enables or disables using a single directory for storing content accessible through SSL and non-SSL connection (the Use a single directory for housing SSL and non-SSL content parameter).Set to false by default.

To enable using a single directory for storing content accessible through SSL and non-SSL connection on domain example.com:# ./domain -u example.com -same_ssl true

-webstat none| awstats| webalizer

Enables or disables Web statistic support; selects Web statistics application (Awstats or Webalizer) on a domain.

To enable Webalizer support on domain example.com:# ./domain -u example.com -webstat webalizer

-webstat-protdir-access

true| false

Enables or disables access to web statistics data through password- protected directory /plesk-stat (the accessible via password protected directory '/plesk-stat/' parameter).Set to false by default.

To enable access to web statistics data through password- protected directory /plesk-stat on domain example.com:# ./domain -u example.com -webstat-protdir-access true

-err_docs true| false

Enables or disables custom server error messages on a domain ( the Custom Error Documents parameter).

Set to false by default.

To enable custom error messages support on domain example.com:# ./domain -u example.com -err_docs true

-log_rotate true| false

Enables or disables log rotation on a domain.

Set to false by default.

To enable log rotation on domain example.com:# ./domain -u example.com -log_rotate true

-log_bysize <KB> Enables or disables log rotation on a domain based on the current log file size (the Log rotation condition parameter).

To enable log rotation for domain example.com once the current log file reaches the 20 Kb size:# ./domain -u example.com -log_bysize 20

76

Page 77: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-log_bytime daily| weekly| monthly

Enables or disables log rotation on a domain based on the current log file size (the Log rotation condition parameter). Is set to daily by default.

To enable log rotation for domain example.com on a weekly basis:# ./domain -u example.com -log_bytime weekly

-log_max_num

<number> Sets the Maximum number of log files parameter.

Set to 3 by default.

To set the maximum number of log files (current and rotated) to 5 for domain example.com:# ./domain -u example.com -log_max_num 5

-log_compress

true| false

Enables or disables log file compression (the Compress log files parameter).

Set to true by default.

To disable log file compression for domain example.com:# ./domain -u example.com -log_compress false

-log_email <e-mail address>

Enables or disables automatic sending of rotated log files to the specified e-mail address (the Send processed log files to e-mail parameter).

To enable automatic sending of rotated log files on domain example.com to e-mail address [email protected]:# ./domain -u example.com -log_email [email protected]

-clogin <client login name>

Specifies the login name of an existing Plesk client who will own the domain.

Used only with the --create or --change-owner commands.

To create domain example.com and assign ownership of the domain to a Plesk client with the login name clientlogin:# ./domain -c example.com -clogin clientlogin

-mail_service

true| false

Enables or disables mail service for a domain.

Set to true by default.

To disable mail service for domain example.com:# ./domain -u example.com -mail_service false

-maillist_service

true| false

Enables or disables the mailing list service on a domain.

Set to false by default.

To enable mailing list service for domain example.com:# ./domain -u example.com -maillist_service true

-map_ip <IP address>

Sets a new IP address for a domain.

Used only with the --change-owner command.

Required for the --change-owner command.

To set the IP address 192.168.76.87 for domain example.com when changing the owner of the domain to Plesk client with login name clientlogin:# ./domain --change-owner example.com -clogin clientlogin -map_ip 192.168.76.87

77

Page 78: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-aftp true| false

Enables or disables the anonymous ftp service on a domain.

Set to false by default.

Deprecated starting with Plesk 8.1. Use the anonftp utility instead.

To enable the anonymous FTP service on domain example.com:# ./domain -u example.com -aftp trueor./anonftp -u example.com -status true

-aftp_inc true| false

Enables or disables uploading to the incoming directory (the Allow uploading to incoming directory parameter).

Set to false by default.

Deprecated starting with Plesk 8.1. Use the anonftp utility instead.

To allow uploading files to the incoming directory by users:# ./domain -u example.com -aftp_inc trueor./anonftp -u example.com -incoming true

-aftp_inc_disk_limit

<number>[K|M|G]

Sets disk space allocation for the incoming directory (the Limit disk space in the incoming directory parameter).

A number without a letter is interpreted as the number of bytes. Type "-1" to set the parameter to Unlimited.

Deprecated starting with Plesk 8.1. Use the anonftp utility instead.

To limit disk space in the incoming directory to 900 Kb:./anonftp -u example.com -aftp_inc_disk_limit 900K

78

Page 79: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-dom_user true| false

Enables or disables the domain administrator account.

Set to false by default.

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du_passwd_type

plain| encrypted

Sets the type of the user password for domain administrator. Deprecated starting with Plesk 8.1. Use the domadmin utility instead.

-du_passwd <string> Sets the user password for domain administrator.

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du_pname <string> Sets the Personal name parameter for domain administrator.

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du_email <string> Sets the Email address for domain administrator. Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du_language

<string> Sets the default interface language for domain administrator (the Domain administrator's language parameter). The argument of the command must be a valid two-letter country code as described in ISO-3166 (for example, "it" stands for Italian). Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du-multiple-sessions

true|false

Enables multiple simultaneous sessions on a domain (the Allow multiple sessions parameter). Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

To enable the domain administrator account on domain example.com, set the domain administrator's password to domadminpass, make the password encrypted, set the personal name as Michael Smith, set the e-mail address to [email protected], set the default Plesk interface language for domain administrator to Italian, and enable multiple simultaneous domain administrator sessions:# ./domain -u example.com -dom_user true -du_passwd_type encrypted -du_passwd domadminpass -du_pname "Michael Smith" -du_email [email protected] -du_language it -du-multiple-sessions true

79

Page 80: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example

-notify true|false

Allows or prevents standard e-mail notifications about the domain creation (Plesk domain administrators and clients).

Used only with the --create command.

To prevent e-mail notifications about domain creation:# ./domain --create example.com -notify false

80

Page 81: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Domain Administrator Accounts: domadmin Utility

The domadmin utility is used to manage domain administrator accounts through CLI. The utility allows the following operations:

Editing domain administrator's personal information Viewing the information about a domain Changing the domain management preferences (control panel access and interface

features) and permissions

Syntaxdomadmin <command> <domain name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

The following command line sets the Personal name Mary Jones for the administrator of domain example.com, allows the use of the standard user interface only for the administrator, sets the administrator's password to mypass, sets the interface language to Russian, and allows the domain content management by the domain administrator.# ./domadmin --update example.com -pname "Mary Jones" -dashboard false -stdgui true -passwd mypass -locale ru-RU -manage_phosting trueCommands

Command Parameter Description Example--update or -u

<domain name>

Updates configuration of an existing domain administrator's account with data specified in the options.

To change a password for the domain administrator's account on domain example.com:# ./domadmin --update example.com -passwd newpasswordor# ./domadmin -u example.com -passwd newpassword

--info or -i

<domain name>

Displays information about a domain administrator's account.

To view the information about the administrator's account on domain example.com:# ./domadmin --info example.comor# ./domadmin -i example.com

81

Page 82: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--help or -h

Displays help on the use of the utility.

To display help on the use of this utility:# ./domadmin –-helpor# ./domadmin -h

Options

Option Parameter Description Example-status true|

falseEnables or disables domain administrator's access to control panel (the Allow domain administrator access parameter).

To disable domain administrator access to control panel on domain example.com:# ./domadmin --update example.com -status false

-passwd <password> Sets the domain administrator's password.

See additional comments in the Note below the table.

To change the domain administrator's password to newpassword on domain example.com:# ./domadmin -u example.com -passwd newpassword

-passwd_type

plain| crypt

Specifies the type of the domain administrator's password - plain or cryptic. Is set to plain by default.

See additional comments in the Note below the table.

To set the type of the domain administrator's password to cryptic on domain example.com:# ./domadmin -u example.com -passwd_type crypt

-pname <string> Sets Personal name for a domain administrator.

To change the administrator's Personal name to Michael Smith on domain example.com:# ./domadmin -u example.com -pname "Michael Smith"

-company <string> Sets Company name for a domain administrator.

To change the administrator's Company name to Network Solutions on domain example.com:# ./domadmin -u example.com -company "Network Solutions"

-phone <number> Sets the phone number (the Phone parameter) for a domain administrator.

To change the domain administrator's phone number to (112)112-2211 on domain example.com:# ./domadmin -u example.com -phone "(112)112-2211"

82

Page 83: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-fax <number> Sets the Fax number

(the Fax parameter) for a domain administrator.

To change the domain administrator's fax number to (112)112-2211 on domain example.com:# ./domadmin -u example.com -fax "(112)112-2211"

-email <string> Sets the e-mail address (the E-mail parameter) for a domain administrator.

To change the domain administrator's E-mail to [email protected] on domain example.com:# ./domadmin -u example.com -email [email protected]

-address <string> Sets the street address for a domain administrator (the Address parameter).

To change the domain administrator's Address to 22 Drury lane on domain example.com:# ./domadmin -u example.com -address "22 Drury lane"

-city <string> Sets the city for the domain administrator (the City parameter).

To change the domain administrator's City to 'Anytown City' on domain example.com:# ./domadmin -u example.com -address "Anytown City"

-state <string> Sets the state or province for the domain administrator (the State/Province parameter).

To change the domain administrator's State/Province to Texas on domain example.com:# ./domadmin -u example.com -state Texas

-zip <string> sets ZIP/postal code for the domain administrator

To change the domain administrator's Postal/ZIP code to 64023-1920 on domain example.com:# ./domadmin -u example.com -zip 64023-1920

-country <country code>

Sets domain administrator's country address (the Country parameter). The option's argument must be a valid two-letter code as described in ISO-3166).

To change the domain administrator's Country to New Zeeland on domain example.com:# ./domadmin -u example.com -country NZ

83

Page 84: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-locale <language

code>Sets the default interface language for client's control panel (the Domain administrator's language parameter). The option's argument must be a valid four-letter language code derived from the language code described in ISO-639-2 and the corresponding country code described in ISO-3166. For example, the Plesk code for the Italian language code is it-IT; the Plesk code for the American variant of English is en-US; the Plesk code for the British variant of English is en-GB.

To set the default interface language to Russian for the domain administrator on domain example.com:# ./domadmin -u example.com -locale ru-RU

-multiple-sessions

true| false

Sets the Allow multiple sessions parameter for the domain administrator's control panel.

To allow multiple control panel sessions to run simultaneously on the domain administrator account:# ./domadmin -u example.com -multiple-sessions true

-max-button-length

<number> Sets the Button label length parameter for the domain administrator's control panel.

To change the button label length for the domain administrator's control panel to 15:# ./domadmin -u example.com -max-button-length 15

-skin <string> Sets the Domain administrator's interface skin for the domain administrator's control panel.

To change the domain administrator's control panel interface skin to "WinXP Reloaded":# ./domadmin -u example.com -skin "WinXP Reloaded"

-lock-screen

true| false

Sets the Prevent working with Plesk until page is completely loaded parameter for the domain administrator's control panel.

To prevent users from working with the control panel until control panel screens are completely loaded:# ./domadmin -u example.com -lock-screen true

-desktop-preset

<string> Sets the Desktop preset for the domain administrator's control panel.

To change the domain administrator's Desktop to the "Default Domain Owner Desktop" preset: on domain example.com# ./domadmin -u example.com -desktop-preset "Default Domain Owner Desktop"

84

Page 85: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage_phosting

true| false

Sets the Physical hosting management parameter for the domain administrator's account.

To allow physical hosting management on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_phosting true

-manage_ftp_password

true| false

Sets the Manage FTP password parameter for the domain administrator's account.

To allow changing the FTP user password by the administrator of domain example.com:# ./domadmin -u example.com -manage_ftp_password true

-manage_sh_access

true| false

Sets the Management of shell access to server parameter (the Client cannot allow or disallow shell access option) for the domain administrator's account (using the ftp user credentials).

To disable shell access to domain example.com by the domain administrator using the ftp user credentials:# ./domadmin -u example.com -manage_sh_access false

-manage_not_chroot_shell

true| false

Enables or disables management of server shell access to the chrooted environment by a domain administrator (the Management of shell access to server parameter, the Domain administrator can allow access only to a chrooted environment and Domain administrator can allow access to any type of shell options).

To enable access to shells of any type on domain example.com by the domain administrator using the ftp user credentials:# ./domadmin -u example.com -manage_not_chroot_shell true -manage_sh_access true

-manage_quota

true| false

Sets the Hard disk quota assignment parameter for the domain administrator's account.

To allow changing hard disk quota on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_quota true

-manage_subdomains

true| false

Sets the Subdomains management parameter for the domain administrator's account.

To allow managing subdomains on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_subdomains true

-manage_domain_aliases

true| false

Sets the Domain Aliases management parameter for the domain administrator's account.

To allow managing domain aliases on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_domain_aliases true

85

Page 86: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage_log

true| false

Sets the Log rotation management parameter for the domain administrator's account.

To allow managing log rotation on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_log true

-manage_anonftp

true| false

Sets the Anonymous FTP management parameter for the domain administrator's account.

To allow managing anonymous FTP access on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_anonftp true

-manage_crontab

true| false

Sets the Scheduler management parameter for the domain administrator's account.

To allow managing scheduler by the domain administrator:# ./domadmin -u example.com -manage_crontab true

-manage_dns

true| false

Sets the DNS zone management parameter for the domain administrator's account.

To allow managing DNS on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_crontab -manage_dns true

-manage_webapps

true| false

Sets the Tomcat applications management parameter for the domain administrator's account.

To allow managing Tomcat web applications on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_webapps true

-manage_maillists

true| false

Sets the Mailing lists management parameter for the domain administrator's account.

To allow managing mailing lists on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_maillists true

allow_local_backups

true| false

Enables or disables backing up data and restoring data from backups using the the control panel repository by a domain administrator (the Allow backing up and restoring data and use / control panel's repository parameter).

To enable the administrator of domain example.com to backup and restore data using the control panel's repository:# ./domadmin -u example.com -allow_local_backups true

-allow_ftp_backups

true| false

Enables or disables backing up data and restoring data from backups using the the FTP repository by a client (the Allow backing up and restoring data and use / FTP repository repository parameter).

To enable the administrator of domain example.com to backup and restore data using the FTP repository:# ./domadmin -u example.com -allow_ftp_backups true

86

Page 87: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage_virusfilter

true| false

Sets the Antivirus management parameter for the domain administrator's account.

To allow managing antivirus applications on domain example.com by the domain administrator:# ./domadmin -u example.com -manage_virusfilter true

-manage_dashboard

true| false

Sets the Desktop management parameter.

Can be set to true only if the -dashboard option is set to true.

To allow managing Desktop by the administrator of domain example.com:# ./domadmin -u example.com -manage_dashboard true

-dashboard

true| false

Enables or disables the use of the Desktop interface by a domain administrator.

Sets the User interface parameter (the Desktop and standard interface are allowed and Only Desktop interface is allowed options only).

Can be set to false only if the -stdgui option is set to true.

-stdgui true| false

Enables or disables the use of the standard interface by a domain administrator. Sets the User interface parameter (the Desktop and standard interface are allowed and Only standard interface is allowed options only).

Can be set to false only if the -dashboard option is set to true.

To allow the use of Desktop interface by the administrator of domain example.com:

# ./domadmin -u example.com -dashboard true To allow the use of standard

interface by the domain administrator of domain example.com:

# ./domadmin -u example.com -stdgui true To set the Desktop and

standard interface are allowed option for the User interface parameter:

# ./domadmin -u example.com -dashboard true -stdgui true To set the Only standard

interface is allowed option for the User interface parameter:

# ./domadmin -u example.com -dashboard false -stdgui true To set the Only Desktop interface

is allowed option for the User interface parameter:

# ./domadmin -u example.com -dashboard true -stdgui false

-manage_spamfilter

true| false

Enables or disables spam filter management by a client (the Spam filter management parameter).

To enable spam filter management the administrator of domain example.com:# ./domadmin -u example.com -manage_spamfilter true

87

Page 88: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

88

Page 89: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Domain Aliases: domalias UtilityThe domalias utility is used to manage domain aliases through CLI. By using this utility, you can perform the following tasks:

Creating or deleting domain aliases Viewing the information about domain aliases Enabling and disabling Web, Tomcat, and mail services on domain aliases

Syntaxdomalias <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates domain alias example.com for domain example.net, enables the domain alias, and enables mail service on the domain alias.# ./domalias --create example.com -domain example.net -status enabled -mail true

Commands

Command Parameter Description Example--create or -c

<alias name>

Creates a new domain alias.

Requires the use of the -domain option

To create a new domain alias example.com for domain example.net:# ./domalias --create example.com -domain example.netor# ./domalias -c example.com -domain example.net

--update or -u

<alias name>

Updates configuration of an existing domain alias with the data specified in the options.

To enable mail service on domain alias example.com:# ./domalias --update example.com -mail trueor# ./domalias -u example.com -mail true

--delete or -d

<alias name>

Deletes a domain alias.

To delete domain alias example.com:# ./domalias --delete example.com or# ./domalias -d example.com

89

Page 90: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--delete-all or -da

<domain name>

Deletes all domain aliases for the specified domain.

To delete all domain aliases for domain example.net:# ./domalias --delete-all example.netor# ./domalias -da example.net

--info or -i

<alias name>

Displays information about a domain alias.

To view information about domain alias example.com:# ./domalias --info example.comor# ./domalias --i example.com

--on <alias name>

Enables a domain alias

To enable domain alias example.com:# ./domalias --on example.com

--off <alias name>

Disables a domain alias

To disable domain alias example.com:# ./domalias --off example.com

--rename <alias name>

Renames a domain alias.

Requires the use of the -new-name option

To change the name of domain alias example.com to example.org:# ./domalias --rename example.com -new-name example.org

--help or –h

<alias name>

Displays help on the use of the utility.

To view help on the use of this utility:# ./domalias –helpor# ./domalias -h

Options

Option Parameter Description Example-new-name

<FQDN> Sets a new name for an existing domain alias. Required with the --rename command.

To change the name of domain alias example.com to example.org:# ./domalias -r example.com -new-name example.org

-mail true|false Enables or disables mail service on a domain alias

To enable mail service on domain alias example.com:# ./domalias -u example.com -mail true

-web true|false Enables or disables web service on a domain alias.

To enable Web service on domain alias example.com:# ./domalias -u example.com -web true

90

Page 91: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-domain <FQDN> Specifies the name

of the domain for which domain alias is to be created.

Required with the --create command.

To create a new domain alias example.com for domain example.net# ./domalias -c example.com -domain example.net

-status enabled|disabled

Enables or disables domain alias.

To enable domain alias example.com:# ./domalias -u example.com -status enabled

-tomcat true|false Enables or disables the Tomcat service on a domain alias.

To enable the Tomcat service on domain alias example.com:# ./domalias -u example.com -tomcat true

91

Page 92: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Domain Limits and Preferences: domain_pref Utility

The domain_pref utility is used to manage domains through CLI. By using this utility, you can edit individual domain limits and preferences for applications, scripting support, e-mail, and other services.

Syntaxdomain_pref <command> <domain name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

The following command line sets the following limits and preferences for domain example.com: the Disk space limit to 1GB, the Maximum traffic limit to 500 MB, the Maximum number of web users limit to 50, the Maximum number of subdomains limit to 10, and enables the WebMail service.# ./domain_pref --update example.com -disk_space 1G -max_traffic 500M -max_wu 50 -max_subdom 10 -webmail true

Commands

Command Parameter Description Example--update or -u

<domain name>

Updates preferences of an existing domain.

To set the Disk space limit for domain example.com to 1 GB:# ./domain_pref --update example.com -disk_space 1Gor# ./domain_pref -u example.com -disk_space 1G

--info or -i

<domain name>

Displays information about domain preferences.

To display information about preferences set on domain example.com:# ./domain_pref --info example.comor# ./domain_pref --i example.com

--set-default or -d

<domain name>

Sets a domain as the Default domain for the IP address that is assigned to the domain.

To set domain example.com as the default domain for the IP address to which it is assigned:# ./domain_pref --set-default example.comor# ./domain_pref -d example.com

92

Page 93: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--help or -h

Displays help on the use of the utility.

To display help on the use of the domain utility:# ./domain_pref --helpor# ./domain_pref -h

Options

Option Parameter Description Example-disk_space <number>[K

|M|G]Sets the Disk space limit. (type "-1" to set the parameter to Unlimited).

To set the Disk space limit for domain example.com to 1 GB:# ./domain_pref -u example.com -disk_space 1G

-max_traffic

<number>[K|M|G]

Sets the Maximum amount of traffic (per month) limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum amount of traffic limit for domain example.com to 500 MB/month:# ./domain_pref -u example.com -max_traffic 500M

-max_box <number> Sets the Maximum number of mailboxes limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mailboxes limit in domain template example.com domain to 50:# ./domain_pref -u example.com -max_box 50

-mbox_quota <number>[K|M|G]

Sets the Mailbox quota limit. (type "-1" to set the parameter to Unlimited).

To set the Mailbox quota limit for domain example.com domain to 100 MB:# ./domain_pref -u example.com -mbox_quota 100M

-max_redir <number> Sets the Maximum number of mail redirects limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mail redirects limit for domain example.com to 5:# ./domain_pref -u example.com -max_redir 5

-max_mg <number> Sets the Maximum number of mail groups limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mail groups limit for domain example.com to 7:# ./domain_pref -u example.com -max_mg 7

-max_resp <number> Sets the Maximum number of mail autoresponders limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mail autoresponders limit for domain example.com to 10:# ./domain_pref -u example.com -max_resp 10

93

Page 94: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max_wu <number> Sets the Maximum

number of web users limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of web users limit for domain example.com to 50:# ./domain_pref -u example.com -max_wu 50

-max_db <number> Sets the Maximum number of databases limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of databases limit for domain example.com to Unlimited: # ./domain_pref -u example.com -max_db -1

-max_maillists

<number> Sets the Maximum number of mailing lists limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mailing lists limit for domain example.com to 3:# ./domain_pref -u example.com -max_maillists 3

-max_webapps

<number> Sets the Maximum number of Java applications limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of Java applications limit for domain example.com to 10:# ./domain_pref -u example.com -max_webapps 10

-max_subdom <number> Sets the Maximum number of subdomains limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of subdomains limit for domain example.com to 10:# ./domain_pref -u example.com -max_subdom 10

-expiration <YYYY-MM-DD>

Sets the Validity period limit starting from domain creation date. (type "-1" to set the parameter to Unlimited).

To set the Validity period limit for domain example.com to 2008-11-30:# ./domain_pref -u example.com -expiration 2008-11-30

-www true| false Enables or disables the www prefix option for Domain name.

Set to true by default.

To disable the www prefix option for domain name example.com:# ./domain_pref -u example.com -www false

-wuscripts true| false Enables or disables scripting support for web users on a domain (the Allow the web users scripting parameter).

Set to false by default.

To enable scripting support for web users of domain example.com:# ./domain_pref -u example.com -wuscripts true

-webmail true| false Enables or disables the use of WebMail.

Set to false by default.

To enable WebMail support on domain example.com:# ./domain_pref -u example.com -webmail true

94

Page 95: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-no_usr bounce:<tx

t>|<e-mail address>|reject

Enables or disables message bouncing, forwarding to an e-mail address, or rejecting mail addressed to non-existing users. Sets the Mail to nonexistent user parameter (Bounce with message, Forward to address, and Reject options) and specifies the text added on top of the bounced messages.

To enable bouncing mail messages addressed to non-existing users on domain example.com and adding text mail service for this email address has been discontinued to the bounced messages:# ./domain_pref -u example.com -no_usr bounce:"mail service for this email address has been discontinued"To forward mail messages addressed to non-existing users on domain example.com to [email protected]:# ./domain_pref -u example.com -no_usr [email protected]

-max_dom_aliases

<number> Sets the Maximum number of domain aliases limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of domain aliases limit for domain example.com to 10:# ./domain_pref -u example.com -max_dom_aliases 10

-at-access true|false Sets the Enable [email protected] access format parameter for a domain.

To enable authorized webuser access to control panel using the <webuser>@<domain name> login name format on domain example.com:# ./domain_pref -u example.com -at-access true

-keep_traf_stat

<number> Sets the Retain traffic statistics parameter for a domain (Report > Traffic history > Traffic statistics retention preferences >). (type "0" if you want to retain all statistics).

To retain traffic statistics for domain example.com for the last 5 months only:# ./domain_pref -u example.com -keep_traf_stat 5

95

Page 96: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Domain Templates: domain_template UtilityThe domain_template utility is used to create and edit domain templates through CLI. The utility allows the following operations:

Creating, renaming, and deleting domain templates Managing domain limits and preferences Managing various domain hosting parameters: scripting languages support, ftp user

access, log file management, mail preferences, and other parameters.

Syntaxdomain_template <command> <domain template name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates new domain template named DomainTemplate; enables physical hosting and allocates 100 MB of disk space for domains to be created using this template; sets the domain validity period to one year starting from the domain creation date; sets the monthly domain traffic limit to 500 MB/month; enables Python, PHP, and Apache PHP support; enables forwarding of e-mail messages addressed to non-existing users to e-mail address [email protected].# ./domain_template -c DomainTemplate -hosting true -disk_space 100M -expiration 1Y -max_traffic 500 -python true -asp true -php true -no_usr [email protected]

Commands

Command Parameter Description Example

--create or -c

<domain template name>

Creates a new domain template.

To create a domain template named DomainTemplate:# ./domain_template --create DomainTemplateor# ./domain_template -c DomainTemplate

--update or -u

<domain template name>

Updates an existing domain template.

To update a domain template named DomainTemplate:# ./domain_template --update DomainTemplateor# ./domain_template -u DomainTemplate

96

Page 97: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example

--remove or -r

<domain template name>

Deletes a domain template.

To remove a domain template DomainTemplate:# ./domain_template --remove DomainTemplateor# ./domain_template -r DomainTemplate

--xml-info or -i

<domain template name>

Displays information about a domain template in the XML format.

To display information about domain template DomainTemplate in the XML format:# ./domain_template --xml-info DomainTemplateor# ./domain_template -x DomainTemplate

--help or -h Displays help on the use of the utility.

To view help on the use of the utility:# ./domain_template --helpor# ./domain_template -h

Options

Option Parameter Description Example-new-name <string> Sets a new name for an

existing domain template.To change the name of domain template DomainTemplate to NewDomainTemplate:# ./domain_template -u DomainTemplate -new-name NewDomainTemplate

-clogin <client login name>

Assigns a domain template to a client account

To assign domain template DomainTemplate to a client with Plesk login name Client:# ./domain_template -u DomainTemplate -clogin Client

97

Page 98: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-no_usr bounce:<txt>|

<e-mail address>|reject

Enables or disables message bouncing, forwarding to an e-mail address, or rejecting mail addressed to non-existing users. Sets the Mail to nonexistent user parameter (Bounce with message, Forward to address, and Reject options) and specifies the text added on top of the bounced messages.

To enable bouncing mail messages addressed to non-existing users and adding text mail service for this email address has been discontinued to the bounced messages in domain template DomainTemplate:# ./domain_template -u DomainTemplate -no_usr bounce:"mail service for this email address has been discontinued"To enable forwarding mail messages addressed to non-existing users to [email protected] in domain template DomainTemplate:# ./domain_template -u DomainTemplate -no_usr [email protected]

-webmail true|false Enables or disables the use of WebMail.

Set to false by default.

To enable WebMail support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -webmail true

-max_dom_aliases

<number> Sets the Maximum number of domain aliases limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of domain aliases limit in domain template DomainTemplate to 10:# ./domain_template -u DomainTemplate -max_dom_aliases 10

-disk_space <number>[K|M|G]

Sets the Disk space limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Disk space limit in domain template DomainTemplate to 50 MB:# ./domain_template -u DomainTemplate -disk_space 50M

-max_traffic

<number>[K|M|G]

Sets the Maximum amount of traffic (per month) limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum amount of traffic limit in domain template DomainTemplate to 500 MB/month:# ./domain_template -u DomainTemplate -max_traffic 500M

98

Page 99: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max_box <number> Sets the Maximum number

of mailboxes limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of mailboxes limit in domain template DomainTemplate to 50:# ./domain_template -u DomainTemplate -max_box 50

-mbox_quota <number>[K|M|G]

Sets the Mailbox quota limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Mailbox quota limit in domain template DomainTemplate to 50 MB:# ./domain_template -u DomainTemplate -mbox_quota 50M

-total_mboxes_quota

<number> Sets the Total mailboxes quota limit (in MB). (type "-1" to set the parameter to Unlimited).

To set the Total mailboxes quota limit in domain template DomainTemplate to 50 MB:# ./domain_template -u DomainTemplate -total_mboxes_quota 50

-max_redir <number> Sets the Maximum number of mail redirects limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of mail redirects limit in domain template DomainTemplate to Unlimited:# ./domain_template -u DomainTemplate -max_redir -1

-max_mg <number> Sets the Maximum number of mail groups limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of mail groups limit in domain template DomainTemplate to 100:# ./domain_template -u DomainTemplate -max_mg 100

-max_resp <number> Sets the Maximum number of mail autoresponders limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of mail autoresponders limit in domain template DomainTemplate to 50:# ./domain_template -u DomainTemplate -max_resp 50

-max_wu <number> Sets the Maximum number of web users limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of web users limit in domain template DomainTemplate to 100:# ./domain_template -u DomainTemplate -max_wu 100

99

Page 100: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max_db <number> Sets the Maximum number

of databases limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of databases limit in domain template DomainTemplate to 20:# ./domain_template -u DomainTemplate -max_db 20

-max_maillists

<number> Sets the Maximum number of mailing lists limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of mailing lists limit in domain template DomainTemplate to 50:# ./domain_template -u DomainTemplate -max_maillists 50

-max_webapps

<number> Sets the Maximum number of Java applications limit. (type "-1" to set the parameter to Unlimited). Is set to Unlimited by default.

To set the Maximum number of Java applications limit in domain template DomainTemplate to 100:# ./domain_template -u DomainTemplate -max_webapps 100

-max_subdom <number> Sets the Maximum number of subdomains limit. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Maximum number of subdomains limit in domain template DomainTemplate to 20:# ./domain_template -u DomainTemplate -max_subdom 20

-expiration <number>Y|M|D Sets the Validity period limit starting from creation date of a the domain account. (type "-1" to set the parameter to Unlimited).

Set to Unlimited by default.

To set the Validity period limit in domain template DomainTemplate to 20 days:# ./domain_template -u DomainTemplate -expiration 20DTo set the Validity period limit in domain template DomainTemplate to 1 year:# ./domain_template -u DomainTemplate -expiration 1Y

-log_rotate true|false Enables or disables log rotation on a domain. Is set to false by default.

To disable log rotation in domain template DomainTemplate:# ./domain_template -u DomainTemplate -log_rotate false

-log_bysize <KB> Enables or disables log rotation on domain based on the current log file size (the Log rotation condition parameter).

To enable log rotation once the current log file reaches the 20 KB size in domain template DomainTemplate:# ./domain_template -u DomainTemplate -log_bysize 20

100

Page 101: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-log_bytime daily|weekly|

monthlyEnables or disables log rotation on domain based on the current log file size (the Log rotation condition parameter).

Set to daily by default.

To set weekly log rotation in domain template DomainTemplate:# ./domain_template -u DomainTemplate -log_bytime weekly

-log_max_num

<number> Sets the Maximum number of log files parameter.

To set the maximum number of log files to 5 in domain template DomainTemplate:# ./domain_template -u DomainTemplate -log_max_num 5

-log_compress

true|false Enables or disables log file compression (the Compress log files parameter).

Set to false by default.

To enable log file compression in domain template DomainTemplate:# ./domain_template -u DomainTemplate -log_compress true

-log_email <e-mail address>

Enables or disables automatic sending of rotated log files to the specified e-mail address (the Send processed log files to e-mail parameter).

To enable automatic sending of rotated log files to [email protected] in domain template DomainTemplate:# ./domain_template -u DomainTemplate -log_email [email protected]

-keep_traf_stat

<number> Sets the Retain traffic statistics (in months) parameter for a domain (Report > Traffic history > Traffic statistics retention preferences >). (type "-1" if you want all statistics to be retained).

To set the Retain traffic statistics parameter in domain template DomainTemplate to 5 months:# ./domain_template -u DomainTemplate -keep_traf_stat 5

-maillist true|false Sets the Mailing lists parameter.

Set to false by default.

To enable mailing lists in domain template DomainTemplate:# ./domain_template -u DomainTemplate -maillist true

-dns_zone_type

master|slave Sets the Type of domain DNS zone parameter.

Set to master by default.

To set the Plesk DNS server to act as slave DNS server in domain template DomainTemplate:# ./domain_template -u DomainTemplate -dns_zone_type slave

101

Page 102: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-hosting true|false Enables or disables

physical hosting on domain (the Physical hosting parameter).

Set to false by default.

To enable physical hosting in domain template DomainTemplate:# ./domain_template -u DomainTemplate -hosting true

-quota <number>[K|M|G]

Sets the Hard disk quota parameter for domain. Type -1 to set the parameter to Unlimited. A number without a letter is interpreted as the number of bytes. This is a hard limit that cannot be exceeded.

Set to Unlimited by default.

To set the hard disk quota to 100 MB in domain template DomainTemplate:# ./domain_template -u DomainTemplate -quota 100M

-ssl true|false Enables or disables SSL support (the SSL support parameter).

Set to false by default.

To enable SSL support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -ssl true

-same_ssl true|false Enables or disables using a single directory for storing content accessible through SSL and non-SSL connection (the Use a single directory for housing SSL and non-SSL content parameter). Set to false by default.

To enable using a single directory for storing content accessible through SSL and non-SSL connection in domain template DomainTemplate:# ./domain_template -u DomainTemplate -same_ssl true

-ssi true|false Enables or disables the SSI support parameter.

Set to false by default.

To enable SSI support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -ssi true

-ssi_html true|false Sets the use SSI for *.htm, *.html files option for the SSI support parameter.

Set to false by default.

To enable SSI support for HTML and HTM files in domain template DomainTemplate:# ./domain_template -u DomainTemplate -ssi_html true

-php true|false Enables or disables PHP support (the PHP support parameter).

Set to false by default.

To enable PHP support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -php true

102

Page 103: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-cgi true|false Enables or disables CGI

support (the CGI support parameter).

Set to false by default.

To enable CGI support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -cgi true

-perl true|false Enables or disables the mod_perl support parameter.

Set to false by default.

To enable Perl support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -perl true

-asp true|false Enables or disables Apache ASP support (the Apache ASP support parameter).

Set to false by default.

To enable Apache ASP support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -asp true

-python true|false Enables or disables Python support (the mod_python support parameter).

Set to false by default.

To enable Python support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -python true

-coldfusion true|false Enables or disables ColdFusion support (the ColdFusion support parameter).

Set to false by default.

To enable ColdFusion support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -coldfusion true

-fastcgi true|false Enables or disables FastCGI support (the mod_fcgi support parameter).

Set to false by default.

To enable FastCGI support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -fastcgi true

-shell <shell name>|forbidden

Enables or disables shell access user and sets the OS system shell for FTP user access. (You can use the --shells command of the domain utility to display the list of available shells).

Set to forbidden by default.

To enable shell access and set the /bin/sh/ shell for domain FTP user in domain template DomainTemplate:# ./domain_template -u -shell /bin/shTo display the list of available shells:# ./domain --shells

103

Page 104: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-webstat none|

webalizer|awstats

Enables or disables Web statistic support; selects Web statistics application (Awstats or Webalizer) (the Web statistics parameter).

Set to none by default.

To enable Webalizer support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -webstat webalizer

-webstat_protdir

true|false Enables or disables the accessible via password protected directory '/plesk-stat/' option for the Web statistics parameter.

Set to false by default.

To enable remote user access to the Web statistics data at http://example.com/plesk-stat/ in domain template DomainTemplate:# ./domain_template -u DomainTemplate -webstat_protdir true

-err_docs true|false Enables or disables custom server error messages on a domain ( the Custom Error Documents parameter).

Set to false by default.

To enable custom error messages support in domain template DomainTemplate:# ./domain_template -u DomainTemplate -err_docs true

-wuscripts true|false Enables or disables scripting support for web users on a domain (the Allow the web users scripting parameter).

Set to false by default.

To enable scripting support for web users in domain template DomainTemplate:# ./domain_template -u DomainTemplate -wuscripts true

104

Page 105: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Interface and System Preferences: server_pref Utility

The server_pref utility is used to manage Plesk default interface preferences and Plesk server system preferences.

Syntax server_pref <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

The following command line sets the Plesk server host name to host.example.com, enables including databases in the disk space usage calculation, and enables including only outbound traffic in the traffic calculation. # ./server_pref --update -hostname host.example.com -include-databases true -traffic-direction outCommands

Сommand Parameter Description Example--set-default or -sd

Sets Plesk Default Interface Preferences.

To set Plesk servers Default locale to English(United States):# ./server_pref --set-default -locale en-USor# ./server_pref -sd -locale en-US

--locales-list or -ll

Displays the list of available supported interface languages (locales).

To display the list of available interface languages (locales):# ./server_pref --locales-listor# ./server_pref -ll

--skins-list or -sl

Displays the list of available Plesk control panel skins.

To display the list of available skins:# ./server_pref --skins-listor# ./server_pref -sl

--templates-list or -tl

Displays the list of available interface customization templates.

To display the list of available interface customization templates:# ./server_pref --templates-listor# ./server_pref -tl

105

Page 106: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Сommand Parameter Description Example-update or -u

Updates Plesk server preferences.

To set the WinXP Olivegreen skin as the default skin:# ./server_pref --update -skin "WinXP Olivegreen"or# ./server_pref -u -skin "WinXP Olivegreen"

--help or -h

Displays help on the use of the utility.

To display help on the use of the server_pref utility:# ./server_pref --helpor# ./server_pref -h

Options

Option Parameter Description Example-locale <language

code>Sets the default interface language for Plesk control panel (the Default locale parameter). The argument of the option must be a valid four-letter language code derived from the language code described in ISO-639-2 and the corresponding country code described in ISO-3166. For example, the Plesk code for the Italian language code is it-IT; the Plesk code for the American variant of English is en-US; the Plesk code for the British variant of English is en-GB.

Used only with the --set-default command.

To set the default interface language for Plesk administrator to Russian:# ./server_pref -sd -locale -ru-RU

-skin <skin name> Sets the default interface skin for Plesk control panel (the Default skin parameter).

Used only with the --set-default command.

To set the WinXP Olivegreen skin as the default skin:# ./server_pref -sd -skin "WinXP Olivegreen"

-template <template name>

Sets the default interface customization template to Plesk control panel (the Default interface customization template parameter).

Used only with the --set-default command.

To apply customization template CustomTemplate to administrator's control panel:# ./server_pref -sd -template CustomTemplate

106

Page 107: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-hostname <string> Changes the host name of

the Plesk server (the Full hostname parameter).

To change the hostname of the Plesk server to host.example.com:# ./server_pref -u-hostname host.example.com

-restart-apache

<number> Sets the Apache restart interval parameter (in seconds).

To set the Apache restart interval to 1000 seconds:# ./server_pref -u -restart-apache 1000

-include-logs

true|false Enables or disables including log files in the disk space usage calculation (the Include in the disk space usage calculation parameter, log files and statistic reports option).

To enable including log files in the disk space usage calculation:# ./server_pref -u -include-logs true

-include-databases

true|false Enables or disables including databases in the disk space usage calculation (the Include in the disk space usage calculation parameter, databases option).

To enable including databases in the disk space usage calculation:# ./server_pref -u -include-databases true

-include-mailboxes

true|false Enables or disables including mailboxes in the disk space usage calculation (the Include in the disk space usage calculation parameter, mailboxes option).

To enable including mailboxes in the disk space usage calculation:# ./server_pref -u -include-mailboxes true

-include-maillists

true|false Enables or disables including mailing lists in the disk space usage calculation (the Include in the disk space usage calculation parameter, mailing lists option).

To enable including mailing lists in the disk space usage calculation:# ./server_pref -u -include-maillists true

-include-domaindumps

true|false Enables or disables including domain backup files in the disk space usage calculation (the Include in the disk space usage calculation parameter, domain backup files option).

To enable including domain backup files in the disk space usage calculation:# ./server_pref -u -include-domaindumps true

-count-type byte|block Sets the When calculating disk space usage, count parameter (file size (byte) or amount of disk space used (block) options).

To enable counting disk space usage based on actual file sizes:# ./server_pref -u -count-type -byte

-stat-keep <number> Sets the Retain traffic statistics for parameter (in months).

Set to 4 by default.

To set the Retain traffic statistics for parameter to 3 months:/server_pref -u -stat-keep 3

107

Page 108: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-traffic-direction

both|in|out Sets the Include in the traffic calculation parameter (inbound and outbound traffic, only inbound traffic, or only outbound traffic options)

To include only outbound traffic in the traffic calculation:# ./server_pref -u -traffic-direction out

Interface Templates: interface_template UtilityThe interface_template utility is used to manage Plesk interface templates through CLI. By using this utility, you can perform the following tasks:

Exporting interface templates to files or standard output in the XML format Importing interface templates form files or standard input in the XML format Hiding unavailable ("grayed out") buttons from user control panels Hiding resource limit control elements that are not allowed to be operated by users Hiding buttons that forward users to external sites and extra services

Syntaxinterface_template <command> <template name>[<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line hides buttons that forward users to certificate retailer's or domain registration sites:# ./interface_template --preferences -domain_registration true -p -cert_purchasing true Commands

Command Parameter Description Example--export or -e

<template name> Exports interface

template as a file or to the standard output (STDOUT).

To export interface template InterfaceTemplate form Plesk to file /usr/local/templates/intemp:# ./interface_template --export InterfaceTemplate /usr/local/templates/intempor# ./interface_template -e InterfaceTemplate /usr/local/templates/intemp

108

Page 109: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--import or -i

<template name> Import interface

template from a file or the standard input (STDIN).

To import interface template InterfaceTemplate to Plesk from file /usr/local/templates/intemp:# ./interface_template --import InterfaceTemplate /usr/local/templates/intempor/interface_template -i InterfaceTemplate /usr/local/templates/intemp

-preferences or -p

Updates Plesk server interface preferences (Server > Interface Management > Interface templates >Preferences).

To enable hiding limit management controls that are not allowed to be managed by users for interface template InterfaceTemplate:# ./interface_template --preferences -hide_disabledor# ./interface_template -p -hide_disabled

--help or -h

Displays help on the use of the utility.

To view help on the use of the utility:# ./interface_template --helpor# ./interface_template -h

Options

Option Parameter Description Example-file <file path> Specifies the path to a

file to export an interface template tot or to import an interface template from.

Used with the --export and --import commands.

To export interface template InterfaceTemplate form Plesk to file /usr/local/templates/intemp:# ./interface_template -e InterfaceTemplate /usr/local/templates/intemp

-from-stdin Specifies the standard input in the XML format as the source to import an interface template from.

Used only with the --import command.

To import interface template InterfaceTemplate from the standard input in the XML format:# ./interface_template -i InterfaceTemplate -from-stdin

-to-stdin Specifies the standard output in the XML format as the export destination of an interface template.

Used only with the --export command.

To export interface template InterfaceTemplate to standard output in the XML format:# ./interface_template -e InterfaceTemplate -from-stdin

109

Page 110: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-hide_disabled

true|false Enables or disables hiding all buttons in the Plesk control panel that are displayed as unavailable (the Hide all grayed out buttons by default parameter).

Used only with the --preferences command.

To enable hiding all unavailable buttons in the Plesk control panel for interface template InterfaceTemplate:# ./interface_template -p -hide_disabled true

-hide_unavailable_limits

true|false Enables or disables hiding limit management controls that are not allowed to be managed by users (the Hide from users the limit management controls they are not allowed to operate parameter).

Used only with the --preferences command.

To enable hiding limit management controls that are not allowed to be managed by users for interface template InterfaceTemplate:# ./interface_template -p -hide_unavailable_limits true

-hide_unavailable_permissions

true|false Enables or disables hiding l control elements for resource limits that are not allowed to be managed by users (the Hide from users the limit management controls they are not allowed to operate parameter).

Used only with the --preferences command.

To enable hiding control elements for resource limits that are not allowed to be managed by users:# ./interface_template -p -hide_unavailable_permissions true

-domain_registration

true|false Enables or disables hiding buttons forwarding to a domain registration site. (the Hide buttons for domain registration parameter).

Used only with the --preferences command.

To enable hiding buttons forwarding to a domain registration site:# ./interface_template -p -domain_registration true

110

Page 111: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-cert_purchasing

true|false Enables or disables hiding buttons forwarding to a certificate retailer's site (the Hide buttons for certificate purchasing parameter).

Used only with the --preferences command.

To enable hiding buttons forwarding to a certificate retailer's site:# ./interface_template -p -cert_purchasing true

-extras true|false Enables or disables hiding buttons for extra services (the Hide buttons for extra services parameter).

Used only with the --preferences command.

To enable hiding buttons for extra services:# ./interface_template -p -extras true

-mail_bounce true|false Enables or disables hiding the bounce with message option for the Mail to nonexistent userparameter (the Hide controls for bounce messages for non-existent mail addresses parameter).

Used only with the --preferences command.

To enable hiding the bounce with message option for the Mail to nonexistent user parameter:# ./interface_template -p -mail_bounce true

111

Page 112: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

IP Addresses: ipmanage UtilityThe ipmanage utility is used to manage IP addresses in Plesk. By using this utility, you can perform the following tasks:

Creating and removing IP addresses Setting IP address type (exclusive or shared), subnet mask, and network interface Assigning SSL certificates Viewing the list of available IP addresses, SSL certificates, and network interfaces

Syntax ipmanage <command> [<IP address>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command creates IP address 192.168.67.78 with subnet mask 255.255.255.0, specifies physical network interface named Local Area Connection for the IP address, sets the type of the IP address to exclusive, and specifies the name of the SSL certificate (My site certificate) to be used for the IP address.# ./ipmanage --create 192.168.67.78 -mask 255.255.255.0 -interface "Local Area Connection" -type exclusive -ssl_certificate "My site certificate"

Commands

Command Parameter Description Example--create or -c

<IP address> Creates an IP address.

Requires concomitant use of the -type, -interface, and -mask options.

To create IP address 192.168.67.78, set its type to shared, network mask to 192.168.12.1/16, and physical network interface to Local Area Connection:# ./ipmanage --create 192.168.67.78 -type shared -mask 192.168.12.1/16 -interface "Local Area Connection"or# ./ipmanage -c 192.168.67.78 -type shared -mask 192.168.12.1/16 -interface "Local Area Connection"

112

Page 113: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update or -u

<IP address> Updates various parameters of an IP address such as its type, subnet mask, network interface, and associated SSL certificates.

To change the type of IP address 192.168.67.78 from shared to exclusive:# ./ipmanage --update 192.168.67.78 -type exclusiveor# ./ipmanage --update 192.168.67.78 -type exclusive

--remove or -r

<IP address> Deletes an IP address.

To remove IP address 192.168.67.78:# ./ipmanage --remove 192.168.67.78or# ./ipmanage -r 192.168.67.78

--ip_list or -l

Displays the list of available IP addresses.

To display the list of available IP addresses:# ./ipmanage --ip_listor# ./ipmanage -l

--ssl_list or -s

Displays the list of available SSL certificates.

To output the list of available SSL certificates:# ./ipmanage -ssl_listor# ./ipmanage -s

--inter_list or -f

Displays the list of available interfaces.

To display the list of available network interfaces:# ./ipmanage --inter_listor# ./ipmanage -f

--help or -h

Displays help on the use of the utility.

To display help on the use of the ipmanage utility:# ./ipmanage --helpor# ./ipmanage -h

113

Page 114: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Options

Option Parameter Description Example-type shared|

exclusiveSets the type of an IP address.

Required by the --create command.

To change the type of IP address 192.168.67.78 from shared to exclusive:# ./ipmanage -u 192.168.67.78 -type exclusive

-ssl_certificate

<certificate name>

Specifies the name of an SSL certificate to be used for the IP address.

To assign SSL certificate named New Certificate to IP address 192.168.67.78:# ./ipmanage -u 192.168.67.78 -ssl_certificate "New Certificate"

-mask <mask address>

Specifies the subnet mask for an IP address.

Required by the --create command.

Used only with the --create command.

-interface <string> Specifies the name of the physical network interface for an IP address.

Required by the --create command.

Used only with the --create command.

To create IP address 192.168.67.78, set its type to shared, network mask to 192.168.12.1/16, and physical network interface to Local Area Connection:# ./ipmanage -c 192.168.67.78 -type shared -mask 192.168.12.1/16 -interface "Local Area Connection"

114

Page 115: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Mail Accounts: mail UtilityThe mail utility is used to manage domain mail service and mail names (e-mail accounts) through CLI. By using this utility, you can perform the following tasks:

Enabling or disabling mail service on a domain Creating and deleting mail names Editing mail name settings Managing mail groups associated with mail names Managing mail user control panel access Managing mail user control panel display parameters

Syntaxmail <command> [<mail name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates mail name [email protected], enables Plesk control panel access for the mail user with login name [email protected], sets password userpass for the mail user to access the control panel, sets the size of the e-mail box to 50 MB, and enables the Dr.Web antivirus screening of both incoming and outgoing e-mail messages for the mail name.# ./mail --create [email protected] -cp-access true -passwd userpass -mbox_quota 50MB -drweb inoutCommands

Command Parameter Description Example--create or -c

<e-mail address>

Creates a Plesk mail name (an e-mail account).

To create a Plesk mail name example.com:# ./mail -create [email protected] or# ./mail -c [email protected]

--update or -u

<e-mail address>

Updates mail name settings.

To set the size of the e-mail box to 50 MB for mail name [email protected]:# ./mail --update [email protected] -mbox_quota 500or# ./mail -u [email protected] -mbox_quota 50M

115

Page 116: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update-service

<domain name>

Updates mail service status on a domain.

Requires concomitant use of the -status option.

To enable mail service on domain example.com:# ./mail --update-service example.com -status enabled

--remove or -r

<e-mail address>

Deletes a mail name from Plesk.

To delete mail name [email protected] from Plesk:# ./mail --remove [email protected]# ./mail -r [email protected]

--on <domain name>

Enables e-mail service on a domain.

To enable e-mail service on domain example.com:# ./mail --on example.com

--off <domain name>

Disables e-mail service on a domain.

To disable e-mail service on domain example.com:# ./mail --off example.com

--info or -i

<e-mail address>

Displays information about a mail name.

To display information about Plesk mail name [email protected]:# ./mail --info [email protected] # ./mail –i [email protected]

--help or -h

Displays help on the use of the utility.

To display help on the use of the autoresponder utility:# ./mail --help or # ./mail --h

Options

Option Parameter Description Example-cp_access true |

falseEnables or disables mail name user to Plesk control panel (the Control panel access parameter).

Set to true by default.

To enable access to control panel for user of mail name [email protected]:# ./mail -u [email protected] -cp_access true

-mailbox true | false

Creates or deletes mail box for a mail name.

To delete mail box for a mail name [email protected]:# ./mail -u [email protected] -mailbox false

116

Page 117: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-passwd <password> Sets the user password

for a mail name.

For additional comments, see the Note below the table.

To change user password to userpass for mail name [email protected]:# ./mail -u [email protected] -passwd userpass

-passwd_type

plain|encrypted

Specifies the type of user password. Ignored if no password is specified.

For additional comments, see the Note below the table.

To set the type of user password to encrypted for mail name [email protected]:# ./mail -u [email protected] -passwd_type encrypted

-mbox_quota

<number>[K|M|G]

Sets the size of the mail box for a mail name. Type -1 to set the parameter to the default mail box size value set for the domain to which the mail name belongs (the Default for the domain parameter).

Set to the Default for the domain value by default.

To set the size of the mail box for a mail name [email protected] to 50 MB:# ./mail -u [email protected] -mbox_quota 50M

-aliases add|del:<alias>[,<alias 1>,...,<alias N>

Adds to or deletes e-mail aliases from a mail name.

To add e-mail aliases serveradmin and webadmin mail aliases to mail name [email protected]:# ./mail -u [email protected] -aliases add:webadmin,serveradmin

-mgroups add|del:<mail group>[,<mail group 1>,...,<mail group N>

Adds to or removes a mail name from Plesk mail groups (Groups).

To remove [email protected] from mail groups Partners and VIPs:# ./mail -u [email protected] -mgroups del:Partners,VIPs

-redirect true | false

Enables or disables redirecting mail messages for a mail name (Redirect). If set to true, requires concomitant use of the -rediraddr option.

To enable redirecting e-mail messages for mail name [email protected] to e-mail address [email protected]:# ./mail -u [email protected] -redirect true -rediaddr [email protected]@redirect.com

117

Page 118: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-rediraddr <e-mail

address>Specifies an e-mail address to which incoming mail for a mail name will be forwarded upon receipt.

To set up redirecting mail for mail name [email protected] to e-mail address [email protected]:# ./mail -u [email protected] -redirect true -rediaddr [email protected]

-group true | false

Enables or disables a mail group associated with a mail name.

To enable mail group associated with mail name [email protected]:# ./mail -u [email protected] -group enable

-groupmem add|del:<e-mail address>[,<e-mail address 1>,...,<e-mail address N>

Adds to or removes e-mail addresses from a mail group associated with a mail name.

To add e-mail addresses [email protected] and [email protected] to the mail group associated with mail name [email protected]:# ./mail -u [email protected] -groupmem add:[email protected],[email protected]

-multiple-sessions

true | false

Allows multiple simultaneous sessions under mail user's login (the Allow multiple sessions parameter).

To allow multiple sessions to run simultaneously under mail user login [email protected]:# ./mail -u [email protected] -multiple-sessions true

-locale <language code>

Sets the default interface language for mail user's control panel (the Interface language parameter). The argument of the command must be a valid four-letter language code derived from the language code described in ISO-639-2 and the corresponding country code described in ISO-3166. For example, the Plesk code for the Italian language code is it-IT; the Plesk code for the American variant of English is en-US; the Plesk code for the British variant of English is en-GB.

To set the default interface language for mail user with login name [email protected] to Russian:# ./mail -u [email protected] -locale -ru-RU

118

Page 119: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-max-button-length

<number> Sets the maximum allowed button length (in symbols) for mail user's control panel (the Button label length parameter).

To change the button label length to 20 for the control panel for the mail user with login name [email protected]:# ./mail -u [email protected] -max-button-length 20

-lock-screen

true | false

Sets the Prevent users from working with the control panel until interface screens are completely loaded parameter.

To prevent mail user with login [email protected] from working with the control panel until control panel screens are completely loaded:# ./mail -u [email protected] -lock-screen true

-skin <skin name>

Sets the default interface skin for mail user's control panel (the Interface skin parameter).

To set the WinXP Olivegreen skin as the default interface skin for the mail user with login name [email protected]:# ./mail -u [email protected] -skin "WinXP Olivegreen"

-status enabled | disabled | admin, domadm, parent, client

Enables or disables mail service on a domain (the enabled or disabled parameters, respectively). Disables domain mail service and sets the domain mail service status to Domain mail service is disabled by administrator (admin) or Domain mail service is disabled by client (client). Sets the domain mail service status to the status of the domain (parent). The use of the domadm parameter is restricted; the parameter should not be used for changing the domain mail service status.

To enable mail service on domain example.com:# ./mail --update-service example.com -status enabledTo set the status of mail service on domain example.com to the status of the domain:./domain --update-service example.com -status parent

-manage-drweb

true | false

Enables or disables Dr.Web antivirus application management by a mail user (the Dr.Web antivirus management permission).

To enable management of the Dr.Web antivirus application by the mail user with login name [email protected]:# ./mail -u [email protected] -manage-drweb true

119

Page 120: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-manage-spamfilter

true | false

Enables or disables spam filter management by a mail user (the Spam filter management permission).

To enable spam filter management by the mail user with login name [email protected]:# ./mail -u [email protected] -manage-spamfilter true

-drweb off | inout | in | out

Disables (off) or enables (in, out, inout) antivirus screening of e-mail messages for a mail name. Sets the mode of antivirus screening by Dr.Web:

in - only incoming messages are screened

out - only outgoing messages are screened

inout - both incoming and outgoing messages are screened

To enable the Dr.Web antivirus screening for all incoming e-mail messages addressed to mail name [email protected]:# ./mail -u [email protected] -antivirus in

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

120

Page 121: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Mail Autoresponders: autoresponder UtilityThe autoresponder utility is used to manage mail autoresponders through CLI. By using this utility, you can perform the following tasks:

Creating or deleting autoresponders Enabling or disabling autoresponders Editing autoresponder settings Managing autoresponder attachment files Managing automatic reply message parameters

Syntaxautoresponder <command> <autoresponder name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates and enables autoresponder named AutoReply for Plesk mail name [email protected], sets the text "Thank you for your inquiry. The application form is attached." and the subject line "application form" for the automatic reply message, attaches to the message file applicationform.txt from the autoresponders attachment file repository.# ./autoresponder --create Autoreply -mail [email protected] -status -true -attach applicationform.txt -subject "application form" -text "Thank you for your inquiry. The application form is attached."Commands

Command Parameter Description Example--create or -c

<autoresponder name>

Creates a mail autoresponder.

To create mail autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder --create Autoreply -mail [email protected]# ./autoresponder -c AutoReply -mail [email protected]

121

Page 122: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update or -u

<autoresponder name>

Updates autoresponder settings.

To specify subject line "An autoreply message" for existing mail autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder --update AutoReply -mail -subject "An autoreply message"or# ./autoresponder -u AutoReply -mail [email protected] -subject "An autoreply message"

--remove or -r

<autoresponder name>

Deletes a mail autoresponder.

To delete mail autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder --remove Autoreply -mail [email protected]# ./autoresponder -r AutoReply -mail [email protected]

--on <domain name> Enables all autoresponders on a specified Plesk mail name.

To enable all existing autoresponders for Plesk mail name [email protected]:# ./autoresponder --on example.com

--off <domain name> Disables all autoresponders on a specified Plesk mail name.

To disable all existing autoresponders for Plesk mail name [email protected]:# ./autoresponder --off example.com

--attachments or -a

Adds ot deletes files from a mail name's autoresponder attachment files repository (Autoresponders > Attachment Files).

Used in conjunction with the -files option.

To add files /usr/local/sampleschedule.txt and /usr/local/applicationform.txt to the autoresponder attachment files repository for Plesk mail name [email protected]:# ./autoresponder --attachments -mail [email protected] -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txtor# ./autoresponder -a -mail [email protected] -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txt

122

Page 123: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--info or -i

<autoresponder name>

Displays information about a mail autoresponder.

Used in conjunction with the -mail option.

To display information about autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder --info AutoReply -mail [email protected] # ./autoresponder -i AutoReply -mail [email protected]

--help or -h

Displays help on the use of the utility.

To display help on the use of the autoresponder utility:# ./autoresponder --help or# ./autoresponder -h

Options

Option Parameter Description Example-mail <mail name> Sets the name of an

autoresponder (the Autoresponder name parameter) for a specified Plesk mail name.

To create mail autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder -c AutoReply -mail [email protected]

-redirect

<e-mail address>

Specifies an e-mail address for an autoresponder to which incoming mail will be forwarded to upon automatic reply using the autoresponder (the Upon automatic response, forward the original message to the specified e-mail parameter).

To set up forwarding to e-mail address [email protected] for incoming messages for Plesk mail name [email protected] that are automatically replied to by using autoresponder AutoReply:# ./autoresponder -u AutoReply -mail [email protected] -redirect [email protected]

-status true | false

Enables or disables an autoresponder. Is set to false by default.

To enable autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder -u AutoReply -mail [email protected] status true

123

Page 124: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-requires

alwaysorsubj|body:<string>

Specifies the condition under which an autoresponder will act (the Specify the condition for this automatic reply parameter):

always - the always respond option; when enabled, the autoresponder will always be used to reply to incoming messages.

subj:<string> - the when specified words are found in message subject option; when enabled, the autoresponder will be used to reply to an incoming message only if the message subject line contains the <string> pattern.

body:<string> - the when specified words are found in the message body option; when enabled, the autoresponder will be used to reply to an incoming message only if the message body line contains the <string> pattern.

To set up automatic replying to messages delivered to Plesk mail name [email protected] using autoresponder AutoReply only when an incoming message subject line contains the "information request" pattern:# ./autoresponder -u AutoReply -mail - [email protected] -requires subj:"information request"

subject <string> Specifies the subject line of the automatic reply message for an autoresponder (the Reply subject parameter). Is set to Re: <request_subject> by default. In the reply message, the <request_subject> portion will be replaced with the incoming message subject line.

To set the subject line of the automatic reply message to Administration policy manual for autoresponder Autoreply for Plesk mail name [email protected]:# ./autoresponder -u AutoReply -mail [email protected] -subject "Administration policy manual"

-replyto <string> Specifies the reply-to address in an autoresponder's automatic reply message (the Return address parameter).

To set the reply-to address of the automatic reply message to [email protected] for autoresponder Autoreply for Plesk mail name [email protected]:# ./autoresponder -u AutoReply -mail [email protected] -replyto [email protected]

124

Page 125: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-text <string> Specifies an

autoresponder's automatic reply message body text (the Reply with text parameter).

To set the automatic reply message body text to "Thank you for your inquiry. Administrator will contact you shortly." for autoresponder Autoreply for Plesk mail name [email protected]:# ./autoresponder -u AutoReply -mail [email protected] -text "Thank you for your inquiry. Administrator will contact you shortly."

-format plain | html

Specifies the format (Plain or HTML) of an autoresponder's automatic reply message (the Mail sending format parameter).

To send automatic reply messages in the HTML format by using autoresponder Autoreply for Plesk mail name [email protected]:# ./autoresponder -u AutoReply -mail [email protected] -format html

-charset <string> Specifies the charset used to encode autoresponder's automatic reply messages (the Encoding parameter).

To use the UTF-8 charset to encode automatic reply messages of autoresponder Autoreply for Plesk mail name [email protected]:# ./autoresponder -u AutoReply -mail [email protected] -charset UTF-8

-store <number> Sets the maximum number of unique e-mail addresses for which the daily reply quota (set by the -frq option, the Reply to the unique e-mail address not more than / times a day parameter) is enforced by an autoresponder (the Store up to / unique e-mail addresses parameter).

To set up enforcing the daily reply quota for up to 200 of unique e-mail addresses for autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder -u AutoReply -mail [email protected] -store 200

-attach add|del:<file name>[,<file name 1>,...,<file name N>]

Adds or removes files to be attached to an autoresponder's automatic reply message (Attachments). Only files that are already added to the Plesk mail name's attachment files repository can be added to the autoresponder's attachments.

Used only with the --create and --update commands.

To add files sampleschedule.txt and applicationform.txt from the attachment files repository to the autoresponder AutoReply for Plesk mail name [email protected]:# ./autoresponder -u -mail [email protected] -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txt

125

Page 126: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-frq <number> Sets the maximum number

of replies that can be sent to a specific e-mail address on a given day (the Reply to the unique e-mail address not more than / times a day parameter).

Sets the maximum number of replies that can be sent to a specific e-mail address on a given day by using autoresponder AutoReply for Plesk mail name [email protected] to 5:# ./autoresponder -u AutoReply -mail [email protected] -frg 5

-files add|del:<file name>[,<file name 1>,...,<file name N>]

Specifies files to be added or deleted from mail name's autoresponder attachment files repository. Is to be used only with the --attachments command. Is required by the --attachments command.

When adding files to the repository, <file name> in the option argument must include the full path to the file.

When deleting files from the repository, <file name> must include only the file name.

To add files /usr/local/sampleschedule.txt and /usr/local/applicationform.txt to the autoresponder attachment files repository for Plesk mail name [email protected]:# ./autoresponder -a -mail [email protected] -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txt

126

Page 127: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Mail Server Settings: mailserver UtilityThe mailserver utility is used to manage Plesk mail server settings through CLI. By using this utility, you can perform the following tasks:

Setting the relaying mode for the mail server Setting the maximum message size that can be accepted by the mail server Enable, disable, and configure the Trend Micro RBL+ antispam protection service Enable, disable, and configure the SPF (Sender Policy Framework) spam

protection service Manage mail server black and white lists Display the mail server settings

Syntaxmailserver <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line sets the relaying mode that requires authorization, specifies the POP3 authorization type for mail users, and set the lock time to 10 min:# ./mailserver --set-relay auth -auth-type pop3 -lock-time 10Commands

Command Parameter Description Example--set-relay

closed | auth

Sets the relaying mode for the mail server (the Relaying parameter). closed - the closed

option auth - the authorization is

required optionSet to closed by default.

To set the Plesk mail server relaying mode requiring authorization (authorization is required), specify the POP3 authorization, and set the lock time of 20 min:# ./mailserver --set-relay auth -auth-type pop3 -lock-time 20

--set-max-letter-size

<number>[K|M|G]

Sets the maximum message size that can be accepted by the mail server (the Maximum letter size parameter).

To set the maximum message size that can be accepted by the mail server to 500 KB:# ./mailserver --set-max-letter-size 500K

127

Page 128: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--set-maps-status

true | false

Enables or disables the Trend Micro RBL+ Service (formerly Mail Abuse Prevention System, MAPS).(the Enable support for Trend Micro RBL+ Service parameter). At least one DNS server of the Trend Micro RBL+ Service must already be specified.

To enable Trend Micro RBL+ Service on the mail server:# ./mailserver --set-maps-status true

--add-maps-zone

<domain name 1>[,<domain name 2>, ... <domain name N>]

Adds one or more Trend Micro RBL+ Service (formerly Mail Abuse Prevention System, MAPS) zones to the mail server (the DNS zones for RBL+ Service parameter).

To add host names maps1.example.com and maps2.example.com to the list of Trend Micro RBL+ servers to be queried by the Trend Micro RBL+ Service:# ./mailserver --add-maps-zone maps1.example.com,maps2.example.com

--remove-maps-zone

<domain name 1>[,<domain name 2>, ... <domain name N>]

Removes one or more Trend Micro RBL+ Service (formerly Mail Abuse Prevention System, MAPS) to the mail server (the DNS zones for RBL+ Service parameter).

To remove host names maps1.example.com and maps2.example.com from the list of Trend Micro RBL+ servers to be queried by the Trend Micro RBL+ Service:# ./mailserver --remove-maps-zone maps1.example.com,maps2.example.com

--set-account-type

full | both

Specifies the mail user login name format for accessing mail accounts by means of the POP3 or IMAP protocols (the Names for POP3/IMAP mail accounts parameter). full - only login names

in the <[email protected]> (the "full" format) are allowed

both - login names in both <user> (the "short" format) and <[email protected]> (the "full" format) are allowed

Is set to full by default.

To allow using both the "short" and "full" login name formats for mail users to access their mail accounts by means of the POP3 or IMAP protocols on the mail server:# ./mailserver --set-account-type both

128

Page 129: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--use-vocabulary

true | false

Enables or disables checking mail user passwords against the dictionary of simple passwords to prevent dictionary attacks (the Check the passwords for mailboxes in the dictionary parameter).

To enable preventive checking of mail user passwords against the password dictionary to prevent use of simple passwords by users:# ./mailserver --use-vocabulary true

--add-to-black-list

<domain name 1>[,<domain name 2>, ... <domain name N>]

Adds one or more domain names to the mail server's Black list.

To add domains commerce.example.org and commerce.example.net to the mail server's black list: # ./mailserver --add-to-black-list commerce.example.org,commerce.example.net

--remove-from-black-list

<domain name 1>[,<domain name 2>, ... <domain name N>]

Removes one or more domain names from the mail server's Black list.

To remove domains commerce.example.org and commerce.example.net from the black list: # ./mailserver --remove-from-black-list commerce.example.org,commerce.example.net

--add-to-white-list

<IP address/subnet mask 1>[,<IP address/subnet mask 2>, ... <IP address/subnet mask N>]

Adds one or more subnet masks to the mail server's White list.

To add subnets 192.168.64.0/24 and 192.168.0.0/16 to the mail server's white list:# ./mailserver --add-to-white-list 192.168.64.0/24,192.168.0.0/16

--remove-from-white-list

<IP address/subnet mask 1>[,<IP address/subnet mask 2>, ... <IP address/subnet mask N>]

Removes one or more subnet masks from the mail server's White list.

To add subnets 192.168.64.0/24 and 192.168.0.0/16 to the mail server's white list:# ./mailserver --add-to-white-list 192.168.64.0/24,192.168.0.0/16

--update-spf

Updates the SPF (Sender Policy Framework) settings.

To enable the SPF spam protection on the mail server:# ./mailserver --update-spf -spf-status true

129

Page 130: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--info or -i

options | black-list | white-list | spf

Displays mail server settings: options - displays

various mail server settings except for the mail server black and white lists contents and the the SPF (Sender Policy Framework) settings.

black-list - displays the mail server black list content

white-list - displays the mail server white list content

spf - displays the SPF (Sender Policy Framework) settings.

To display the SPF (Sender Policy Framework) settings:# ./mailserver --info spfor# ./mailserver -i spf

--help or -h

Displays help on the use of the utility.

To display help on the use of the mailserver utility:# ./mailserver --helpor # ./mailserver -h

Options

Option Parameter Description Example-auth-type

pop3|smtp|both

Specifies mail user authorization type during mail relaying.

-lock-time

<number> Sets the lock time for POP3 authorization (in minutes).

Required for pop3 and both authorization types.

To set the relaying mode that requires authorization, specify the POP3 authorization type, and set the lock time to 10 min:# ./mailserver --set-relay auth -auth-type pop3 -lock-time 10

-spf-status

true|false

Enables or disables the SPF (Sender Policy Framework) spam protection on the mail server.

Used only with the --update-spf command.

To enable the SPF (Sender Policy Framework) spam protection on the mail server:# ./mailserver --update-spf -spf-status true

130

Page 131: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-spf-behavior

<number> Sets the SPF behavior (the SPF checking mode parameter).

1 - Only create Received-SPF headers, never block

2 - Use temporary error notices when you have DNS lookup problems

3 - Reject mails when SPF resolves to "fail" (deny)

4 - Reject mails when SPF resolves to "softfail"

5 - Reject mails when SPF resolves to "neutral"

6 - Reject mails when SPF does not resolve to "pass"

Used only with the --update-spf command.

To set SPF behavior to Reject mails when SPF resolves to "fail" (deny):# ./mailserver --update-spf -spf-behavior 3

-spf-rules

<string> Sets SPF rules that will be applied for domains that do not conform to the SPF policies (are not publishing SPF records)(the SPF local rules parameter).

Used only with the --update-spf command.

To set the following SPF rule include:spf.trusted-forwarder.org:# ./mailserver --update-spf -spf-rules "include:spf.trusted-forwarder.org"

-spf-guess

<string> Sets SPF rules that will be applied if SPF checks return "fail", "softfail", or "neutral" (the SPF guess parameter).

Used only with the --update-spf command.

To set the following SPF rule include:spf.trusted-forwarder.org:# ./mailserver --update-spf -spf-guess "include:spf.trusted-forwarder.org"

-spf-exp <string> Sets the message text that will be received by the sender (SMTP client) of a message rejected as a result of SPF check (the SPF explanation text parameter).

Used only with the --update-spf command.

To set the SPF explanation text "You message does not conform to the SPF policies" to be included in the automatically generated replies to to senders of messages rejected as a result of SPF check:# ./mailserver --update-exp -spf-guess "include:spf.trusted-forwarder.org"

131

Page 132: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Mailing Lists: maillist UtilityThe maillist utility is used to manage mailing lists through CLI. By using this utility, you can perform the following tasks:

Creating or removing mailing lists Adding to or deleting e-mail addresses from mailing lists Editing e-mail and notification settings for the mailing list administrator Enabling or disabling mailing lists Setting mailing list status

Syntaxmaillist <command> [<maillist name>] [<domain name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates mailing list MailList on domain example.com domain, sets password userpass for the mailing list administrator, orders not to send the ‘mailing list created’ notification to this administrator, and sets the [email protected] email address for this administrator.# ./maillist --create MailList -domain example.com -passwd MyPass -notify false -email [email protected]

Command Parameter Description Example--create or -c

<mailing list name>

Creates a mailing list. Requires concomitant use of the -domain, -passwd, -passwd_type, and -email options.

To create mailing list MailList on domain example.com, set the mailing list administrator's password to userpass, set the password's type to encrypted, and set the mailing list administrator's e-mail address to [email protected]:# ./maillist --create MailList -domain example.com -email [email protected] -passwd user pass -passwd_type plainor# ./maillist -c MailList -domain example.com -email [email protected] -passwd user pass -passwd_type plain

132

Page 133: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update or -u

<mailing list name>

Updates mailing list settings.

To add e-mail address admin@example to mailing list MailList :# ./maillist --update MailList -members add:[email protected]# ./maillist -u MailList -members add:[email protected]

--update-service

<domain name>

Updates mail service status on a domain.

Requires concomitant use of the -status option.

To enable mailing list service on domain example.com:# ./maillist --update-service example.com -status enabled

--remove or -r

<mailing list name>

Deletes a mailing list from domain.

To remove mailing list MailList from domain example.com:# ./maillist --remove MailList -domain example.comor# ./maillist –r MailList -domain example.com

--on <domain name>

Enables mailing list service on a domain.

To enable mailing list service on domain example.com:# ./maillist --on example.com

--off <domain name>

Disables mailing list service on a domain.

To disable mailing list service on domain example.com:# ./maillist --off example.com

--info or -i

<mailing list name>

Displays the mailing list members.

To display the list of members of mailing list MailList on domain example.com:# ./maillist --info MailList -domain example.comor# ./maillist -i MailList -domain example.com

--help or -h

Displays help on the use of the utility.

To display help on the use of the maillist utility:# ./maillist –-helpor# ./maillist –h

133

Page 134: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Options

Option Parameter Description Example-domain <domain

name>Specifies the name of a domain to which a mailing list belongs.

Used with all commands, except the --help command.

To remove mailing list MailList from domain example.com:# ./maillist --remove MailList -domain example.com

-passwd <password> Sets the mailing list administrator’s password.

Used only with the --create command.

For additional comments, see the Note below the table.

-passwd_type

plain | encrypted

Specifies the type of the mailing list administrator's password.

Ignored if no password is specified.

Used only with the --create command.

For additional comments, see the Note below the table.

-email <e-mail address>

Sets an e-mail address for a mailing list administrator.

Used with the --create command only.

-notify true|false Allows or prevents e-mail notification of the mailing list administrator about the mailing list creation.

Set to true by default.

Used only with the --create command.

To create mailing list MailList on domain example.com, set the mailing list administrator's password to userpass, set the password's type to encrypted, set the mailing list administrator's e-mail address to [email protected], and disable e-mail notification of the mailing list administrator about the mailing list creation:# ./maillist -c MailList -domain example.com -email [email protected] -passwd user pass -passwd_type plain -notify false

-status true|false Enables or disables a mailing list. Is set to true by default.

To disable mailing list MailList on domain example.com:# ./maillist -u MailList -domain example.com -status false

134

Page 135: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-members add|

del:<e-mail address>[,<e-mail address 1>,...,<e-mail address N>

Adds to or deletes e-mail addresses from a mailing list.

To add e-mail addresses jane@example and [email protected] to mailing list MailList :# ./maillist -u MailList -members -domain example.com add:[email protected],[email protected]

Note: Use of this option is not recommended. For security reasons, you can transfer non-encrypted passwords by using environment variable PSA_PASSWORD. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

135

Page 136: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Plesk Services: service UtilityThe service utility is used to manage services on the Plesk server through CLI. By using this utility, you can perform the following tasks:

Displaying a list of available services Starting, stopping, or restarting a service Querying the current running status of a service Specifying the information to be included in the list of available services and format

its display parameters

Syntaxservice <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line displays detailed information about the dns, mail, tomcat,and coldfusion services as a table:# ./service --list -include dns,mail,tomcat,coldfusion -format "\n\t%k,\t%N,\t%S\t%I\t%p\n"

Commands

Command Parameter Description Example--start or -s

<service key>

Starts a service. To start the service named dns:# ./service --start dnsor# ./service -s dns

--stop or -p

<service key>

Stops a service. To stop the service named dns:# ./service --stop dnsor# ./service -p dns

--restart or -r

<service key>

Restarts a service. To restart the service named dns:# ./service --restart dnsor# ./service -r dns

--status or -t

<service key>

Displays the current status of a service.

To display the current status of the service named dns:# ./service --status dnsor# ./service -t dns

136

Page 137: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--list or -l

Displays information about available services.

Can be used with the -detail and -format options to display detailed information about services.

To display the list of available services:# ./service --listor# ./service -l

--help or -h

Displays help on the use of the utility.

To view help on the use of the utility:# ./service --helpor# ./service -h

Options

Option Parameter Description Example-include

<service key 1>[,<service key 2>,... <service key N>]

Specifies the list of services to be included in the --list command output.

To display detailed information about dns, mail, tomcat,and coldfusion services only:# ./service -l -include dns,mail,tomcat,coldfusion -detail

-exclude

<service key 1>[,<service key 2>,... <service key N>]

Specifies the list of services to be excluded from the --list command output.

-detail Set the detailed format for the --list command output (equivalent to -format "%k\t%N\t%S\t%I\t%p\n").

To display detailed information about all services excluding dns, mail, tomcat,and coldfusion services:# ./service -l -exclude dns,mail,tomcat,coldfusion -detail

137

Page 138: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-format "%<output

parameter 1>[%<output parameter 2> ...%<output parameter N>"use \n, \t, or a comma to format the output display as needed.

Specifies the information to be included in the detailed output and the display parameters of the --list command. %k - service key %N - service name %s - service status

code %S - service status %i - available code %I - information

about available code

%p - package name

%% - % \n - new line \t - tab

Is set to"%k" by default.

To display detailed information about dns, mail, tomcat,and coldfusion services as a table:# ./service -l -include dns,mail,tomcat,coldfusion -format "\n\t%k,\t%N,\t%S\t%I\t%p\n"

138

Page 139: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Server Configuration: init_conf UtilityThe init_conf utility is used to perform the initial configuration of Plesk through CLI. By using this utility, you can also edit certain parameters configured during the initial configuration of the Plesk server. By using this utility, you can perform the following tasks:

setting host name for the Plesk server setting the default IP address for the Plesk server configuring Plesk server networking parameters adding IP addresses to the list of shared IP addresses specifying and editing Plesk administrator's personal information creating the default client account for the Plesk administrator

Syntax init_conf <command> [<option1> [<param>][<option2> [<param>]]…[<option_N> [<param>]]]

Example

The following command sets the default IP address to 192.0.2.14 and sets its type to shared; sets the network mask to 255.255.255.0 and the network interface name to eth0 for the default IP address; adds shared IP addresses 192.0.2.46 and 192.0.2.47 to Plesk; sets the Plesk administrator’s name to Michael Smith and the administrator’s password to adminpass; sets the administrator's phone number to 555-5555, fax number to 333-3333, and e-mail address to [email protected]; sets the administrator's street address to 45 Trail street, city to Anytown, ZIP code to 77568, and country to Australia.# ./init_conf --init -default-ip 192.0.2.14 -netmask 255.255.255.0 -iface eth0 -ip-type shared -hostname example.com shared_ips add:192.0.2.46,192.0.2.47 -company "Company, Inc" -name "Michael Smith" -passwd adminpass -phone 555-5555 -fax 333-3333 -email [email protected] -addr "45 Trail street" -city "Anytown" -pcode 77568 -country AU

139

Page 140: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Commands

Command Parameter Description Example--init It is used to initialize a

non-configured Plesk server. By using the applicable options, you can set the server's host name, add administrator's personal information. It can be applied to a non-configured Plesk server only.

Requires concomitant use of the following options used to specify administrator's personal information: -name, -passwd, -phone, -fax, -email, -addr, -city, -state, -pcode.

To set the Plesk default IP address to 192.168.12.14, make the address shared, set the network mask to 255.255.0.0, network interface name to eth0, create a default client account My Domains, and specify the Plesk administrator's personal information:# ./init_conf --init -default-ip 192.168.12.14 -netmask 255.255.0.0 -iface eth0 -ip-type shared -def_client -name <string> -passwd <string> -phone <number> -fax <number> -email <string> -addr <string> -city <string> -state <string> -pcode <string>For more details on the options, consult the following table.

--update or -u

Updates the Plesk administrator’s personal information.

To set or change the Plesk administrator's e-mail to [email protected]:# ./init_conf --update -email [email protected]# ./init_conf. -u -email [email protected]

--help or -h

Displays help on the use of the utility.

To display help on the use of the init_conf utility:# ./init_conf --helpor# ./init_conf -h

140

Page 141: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Options

Option Parameter Description Example

-company

<string> Adds the Plesk administrator's Company name.

Required with the --init command.

-name <string> Specifies the Plesk administrator’s Contact name.

Required with the --init command.

-passwd

<password> Specifies the Plesk administrator’s password for access to Plesk control panel.

Required with the --init command.

-phone

<number> Sets the administrator's phone number (Phone).

Required with the --init command.

-fax <number> Sets the administrator's fax number (Fax).

Required with the --init command.

-email

<string> Sets the administrator's e-mail address (E-mail). Required with the --init command.

-addr <string> Sets the administrator’s street address (Address).

Required with the --init command.

-city <string> Sets the administrator’s city (City).

Required with the --init command.

-state

<string> Sets the administrator’s State/Province.

Required with the --init command.

-pcode

<string> Sets the administrator’s Postal/ZIP code.

Required with the --init

To set the Plesk administrator's company name to Company, Inc, contact name as Michael Smith, password to adminpass, phone number to 555-5555, fax number to 333-3333, e-mail address to [email protected], street address to 45 Trail street, administrator's city to Anytown, state to New York, ZIP code to 77568, and country to Australia:# ./init_conf --init -company "Company, Inc" -name "Michael Smith" -passwd adminpass -phone 555-5555 -fax 333-3333 -email [email protected] -addr "45 Trail street" -city "Anytown" -state "New York" -pcode 77568 -country AU

141

Page 142: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

command.

-country

<string> Sets the administrator’s Country. The argument of the command must be a valid two-letter country code as described in ISO-3166 (for example, "AU" stands for Australia).

Required with the --init command.

-hostname

<domain name>

Sets the Plesk server's host name.

Used only with the --init command.

To set the server's host name as example.com:# ./init_conf --init -hostname example.com -name <..> -passwd <..> -phone <..> -fax <..> -email <..> -addr <..> -city <..> -state <..> -pcode <..>

-shared_ips

add:<ip_1>,<ip_2>, ...,<ip_n>

Sets the IP addresses specified by the <ip_n> parameters as shared IP addresses. The IP addresses must be added to the server IP address pool before they can be assigned the shared status.

Used only with the --init command.

To set IP addresses 192.168.123.46 and 192.168.123.47 as shared IP addresses:# ./init_conf --init -shared_ips add:192.168.123.46,192.168.123.47 -name <..> -passwd <..> -phone <..> -fax <..> -email <..> -addr <..> -city <..> -state <..> -pcode <..>

-send_announce

true|false Sets the I would like to receive periodic e-mails from SWsoft. announcing new products, discounts and more option.

If set to true, the administrator will receive e-mail notifications on new products and promotions from SWsoft.

To subscribe the Plesk administrator to SWsoft notifications about new products and promotions lists of SWsoft:# ./init_conf -u -send_announce true

-def_client

Creates the default client account My Domains for the Plesk administrator.

Used only with the --init command.

To create the default client account for the Plesk administrator:# ./init_conf --init -def_client -name <..> -passwd <..> -phone <..> -fax <..> -email <..> -addr <..> -city <..> -state <..> -pcode <..>

-default-ip

<IP address> Sets the Default IP Address during initial Plesk configuration. This option is to be used only with the --init command. If this address has not yet been

To set the Plesk default IP address to 192.168.12.14, make the address shared, set the network mask to 255.255.0.0, and network interface name to eth0:# ./init_conf --init

142

Page 143: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

added to the server IP address pool, the option requires the concomitant use of the -netmask, -iface, and -ip-type options.

-netmask

<IP address|nn>

Sets a network mask for the default IP address in Plesk during initial Plesk configuration.

Used only with the --init command.

-iface <dev> Sets a name for the network interface for the default IP address during initial Plesk configuration.

Used only with the --init command.

-ip-type

shared|exclusive

Sets the type of the default IP address during initial Plesk configuration.

Used only with the --init command.

-default-ip 192.168.12.14 -netmask 255.255.0.0 -iface eth0 -ip-type shared -name <..> -passwd <..> -phone <..> -fax <..> -email <..> -addr <..> -city <..> -state <..> -pcode <..>

143

Page 144: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Site Applications: sitapp UtilityThe siteapp utility is used to add site application packages to a Plesk client account's Application pool from the Plesk server Application vault. By using this utility, you can perform the following tasks:

Viewing information about site application packages available to clients in the Plesk server Application vault.

Adding site application packages to a Plesk client account's Application pool from the Plesk server Application vault.

Syntaxsiteapp <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line adds the WebApp application package version 5.02, release number 7 to the application pool of the client account with client login name clientlogin:# ./siteapp --add-to-vault -sapp WebApp -version 5.02 -release 7

Commands

Command Parameter Description Example-add-to-vault or -a

<client login name>

Adds a site application package to a Plesk client account's Application pool from the Plesk server Application vault.

To add the WebApp application package version 5.02, release number 7 to the application pool of the client account with client login name clientlogin:# ./siteapp --add-to-vault -sapp WebApp -version 5.02 -release 7or# ./siteapp -a -sapp WebApp -version 5.02 -release 7

--info-packages-xml or -x

Displays information in the XML format about site application packages available to clients in the Plesk server Application vault.

To display information in the XML format about site application packages available to clients in the Plesk server application vault:# ./siteapp --info-packages-xmlor# ./siteapp -x

144

Page 145: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--help or -h

Displays help on the use of the utility.

To display help on the use of the siteapp utility:./mail --help or ./mail --h

Options

Option Parameter Description Example-sapp <site

application name>

Specifies the name of a site application package to be added to a client account Application pool.

-version <number> Specifies the version number of a site application package to be added to a client account Application pool.

-release <number> Specifies the release number of a site application package to be added to a client account Application pool.

To add the WebApp application package version 5.02, release number 7 to the application pool of the client account with client login name clientlogin:# ./siteapp -a -sapp WebApp -version 5.02 -release 7

145

Page 146: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Site Directories Protection: protdir UtilityThe protdir utility is used to manage password protection of Web directories on domains through CLI. By using this utility, you can perform the following tasks:

Creating, renaming, and removing protected web directories Adding and removing users authorized to access password-protected web

directories Editing login information of users authorized to access password-protected web

directories

Syntaxprotdir <command> [<directory name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates password-protected directory Protected_Dir in the /httpdocs directory on domain example.com, adds the password-protected directory user authorizeduser, and sets the user password to userpass.# ./protdir --create Protected_Dir -domain example.com -add_user authorizeduser -passwd userpass

Commands

Command Parameter Description Example--create or -c

<directory name>

Creates a password protected directory on a domain. If the directory already exist on the domain, the command enables password protection of the directory.

Requires concomitant use of the -type option.

To create password-protected directory Protected_Dir in the /httpdocs directory on domain example.com:# ./protdir --create Protected_Dir -domain example.com -type nonsslor # ./protdir -c Protected_Dir -domain example.com -type nonssl

146

Page 147: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update or -u

<directory name>

Updates settings of a password-protected directory.

To set title "This directory is password protected" for the login dialog box to be displayed when users attempt to access password-protected directory /httpdocs/Protected_Dir:# ./protdir --update Protected_Dir -domain example.com -title "This directory is password protected"or# ./protdir -u Protected_Dir -domain example.com -title "This directory is password protected"

--remove or -r

<directory name>

Deletes a password-protected directory.

To delete password-protected directory /httpdocs/Protected_Dir from domain example.com:# ./protdir --remove Protected_Dir -domain example.com -type nonsslor# ./protdir -r Protected_Dir -domain example.com -type nonssl

--help or -h

Displays help on the use of the utility.

To see help on the use of the protdir utility:# ./protdir -–helpor# ./protdir -h

Options

Option Parameter Description Example-domain <domain

name>Specifies the name of a domain to which a password-protected directory belongs.

Used with all commands, except the --help command.

To create the Protected_Sample protected URL on example.com:# ./protdir -c Protected_Dir -domain example.com

-title <string> Specifies the title for the login dialog box to be displayed when users attempt to access a password-protected directory.

To set title "This directory is password protected" for the login dialog box to be displayed when users attempt to access password-protected directory /httpdocs/Protected_Dir:# ./protdir -u Protected_Dir -domain example.com -title "This directory is password protected"

147

Page 148: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-type nonssl |

ssl | cgiSpecifies the location of a password directory in the domain root catalog: nonssl - the

/httpdocs directory

ssl - the /httpsdocs directory

cgi- the /cgi-bin directory

To create password-protected directory Protected_Dir in the /httpdocs/Protected directory on domain example.com:# ./protdir -c Protected/Protected_Dir -domain example.com -type nonssl

-passwd <password>

Specifies the password for accessing contents of a password-protected directory by a user.

See additional comments in the Note below the table.

-passwd_type

plain | encrypted

Specifies the type of the password for accessing contents of a password-protected directory by users.

See additional comments in the Note below the table.

-add_user <login name>

Creates a password-protected directory user with the specified login name.

To create user authorizeduser authorized to access contents of password-protected directory /httpdocs/Protected_Dir on domain example.com, set the user password to userpass and the password type to plain:# ./protdir -u Protected_Dir -type nonssl -domain example.com -add_user authorizeduser -passwd userpass -passwd_type plain

-update_user

<login name>

Updates settings of a password-protected directory user with the specified login name.

-user_name <login name>

Sets a password-protected directory login name.

Used in conjunction with the -update_user option.

To change the user login name from authorizeduser to admin for the password-protected directory /httpdocs/Protected_Dir on domain example.com:# ./protdir -u Protected_Dir -type nonssl -domain example.com -update_user authorizeduser -user_name admin

-remove_user

<login name>

Deletes a password-protected directory user with the specified login name.

To delete the user with login name authorizeduser for a password-protected directory /httpdocs/Protected_Dir on domain example.com:# ./protdir -u Protected_Dir -type nonssl -domain example.com -remove_user authorizeduser

148

Page 149: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-dir_name <director

y name>Sets a new name for a password-protected directory.

Used in conjunction with the -update_user option.

To set a new name /httpdocs/Protected_Archive for a password-protected directory /httpdocs/Protected_Dir on domain example.com:# ./protdir -u Protected_Dir -type nonssl -domain example.com -dir_name Protected_Archive

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

149

Page 150: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Site Skeletons: skeleton UtilityThe skeleton utility is used to manage site directory structure skeletons through CLI. By using this utility, you can perform the following tasks:

Installing a site skeleton on a client account from a site skeleton archive file Resetting site skeleton on a client account to the Plesk default site skeleton

Syntaxskeleton <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line installs a site skeleton from the skeleton file /usr/local/skeletons/siteskeleton (in the ZIP format) for the client with client login name clientlogin:# ./skeleton --install clientlogin -filename /usr/local/skeletons/siteskeleton -force-type zip

Commands

Command Parameter Description Example--install or -i

<client login name>

Installs a skeleton from a file for a client account.

Requires concomitant use of the --filename option.

To install a site skeleton from the skeleton file /usr/local/skeletons/siteskeleton.zip for the client with client login name clientlogin:# ./skeleton --install clientlogin -filename /usr/local/skeletons/siteskeleton -force-type zipor# ./skeleton -i clientlogin -filename siteskeleton -force-type zip

--reset or -r

<client login name>

Installs the Plesk default skeleton for a client account.

To install the default site skeleton for the client with client login name clientlogin:# ./skeleton --reset clientloginor# ./skeleton -r clientlogin

--help or -h

Displays help on the use of the utility.

To view help on the use of the utility:# ./skeleton --helpor# ./skeleton -h

150

Page 151: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Options

Option Parameter Description Example-filename <file path> Specifies a site

skeleton file.

Used only with the --install command.

-force-type zip|tgz|tar.gz|tar

Forces specification of a site skeleton file format.

Used only with the --install command.

To install a site skeleton from the skeleton file /usr/local/skeletons/siteskeleton (in the ZIP format) for the client with client login name clientlogin:# ./skeleton -i clientlogin -filename /usr/local/skeletons/siteskeleton -force-type zip

151

Page 152: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Spam Filtering: spamassassin UtilityThe spamassassin utility is used to manage the Spamassassin spam filter through CLI. By using this utility, you can perform the following tasks:

Enabling or disabling server-wide spam filtering Setting the criteria for automatic labeling of incoming messages as spam Enabling or disabling use of mail-name specific spam filtering criteria Adding e-mail messages to the Spamassassin's black and white lists Mark e-mail subjects as spam Deleting spam automatically Inserting custom text into spam message subject lines automatically

Syntaxspamassassin <command> [<mail name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line enables Spamassassin filter on mail name [email protected], enable the use of mail name-specific Spamassassin filter settings, set the minimum score of 3 for marking e-mail messages as spam and enables deleting spam messages automatically from the mail box:# ./spamassassin --update [email protected] -status true -personal-conf true -reject-spam true -hits 3

Commands

Command Parameter Description Example--update or -u

<mail name>

Updates the Spamassassin spam filter settings for a Plesk mail name.

To set the minimum score of 3 for marking e-mail messages as spam and deleting them automatically for Plesk mail name [email protected]:# ./spamassassin --update [email protected] -hits 3 -reject-spam trueor# ./spamassassin -u [email protected] -hits 3 -reject-spam true

152

Page 153: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update-server

Updates the Spamassassin spam filter settings for the Plesk server.

To set the minimum score of 5 for marking e-mail messages as spam as the default Plesk server setting:# ./spamassassin --update-server -hits 5

--info or -i

<mail name>

Displays the Spamassassin spam filter settings for a Plesk mail name.

To display the Spamassassin spam filter settings for [email protected]:# ./spamassassin --info [email protected]# ./spamassassin -i [email protected]

--info-server

Displays the Spamassassin spam filter settings for the Plesk server.

To display the Spamassassin spam filter settings for the Plesk server:# ./spamassassin --info

--help or -h

Displays help on the use of this utility.

To see the help info on the use of the spamassassin utility:# ./spamassassin -–help

Options

Option Parameter Description Example-status true |

falseEnables or disable the Spamassassin filter for a Plesk mail name.

To enable the Spamassassin filter for mail name [email protected]:# ./spamassassin -u [email protected] -status true

-personal-conf

true | false

Enables or disables the use of mail name-specific (rather than server- wide) antispam filter settings for a mail name.

To enable the use of mail name-specific Spamassassin filter settings for mail name [email protected]:# ./spamassassin -u [email protected] -personal-conf true

-hits <float number>

Specifies the minimum score for an e-mail message to be marked as spam (the The score that a message must receive to qualify as spam parameter).

To set the minimum score of 3 for marking e-mail messages as spam for Plesk mail name [email protected]:# ./spamassassin --update [email protected] -hits 3

-max-proc <1|2|3|4|5>

The maximum number of simultaneously running spamd processes on server (the The maximum number of worker spamd processes to run (1-5) parameter).

To set the maximum number of simultaneously running spamd processes on server to 4:# ./spamassassin --update-server -max-proc 4

153

Page 154: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-modify-subj

true | false

Enables or disables automatic modification of subject lines of messages marked as spam.

-modify-subj-text

<string> Specifies the text to be inserted in the beginning of a subject line of every message marked as spam. Type _SCORE_ if you want to include the message's spam score in the message subject line.

To enable automatic modification of subject lines of messages marked as spam and to specify the text to be inserted in the beginning of a subject line of each spam message as "***SPAM*** Score: _SCORE_ :":# ./spamassassin -u [email protected] -modify-subj true -modify-subj-text "***SPAM*** Score: _SCORE_ :"

-reject-spam

true | false

Enables or disables deleting spam messages automatically (the Delete spam mail when it comes to mailbox parameter):

To enable deleting spam messages automatically:# ./spamassassin --update [email protected] -reject-spam true

-blacklist add| del| enable| disable:<pattern 1>[,<pattern 2>,... [pattern N] *

Adds e-mail patterns to or deletes them from the Spamassassin's Black list. Enables or disables e-mail patterns in the Spamassassin's Black list. The enable and disable parameters are used only with the --update command.

To add e-mail patterns *[email protected] and ???user@*.example.net to the Spamassassin's black list:# ./spamassassin --update [email protected] -blacklist add:*[email protected],???user@*.example.net

-whitelist add| del| enable| disable:<pattern 1>[,<pattern 2>,... [pattern N] *

Adds e-mail patterns to or deletes them from the Spamassassin's White list. Enables or disables e-mail patterns in the Spamassassin's White list. The enable and disable parameters are used only with the --update command.

To add e-mail patterns *[email protected] and ???user@*.example.net to the Spamassassin's white list:# ./spamassassin --update [email protected] -blacklist add:*[email protected],???user@*.example.net

* Non-ASCII characters are not allowed on the left of the @ sign in the e-mail pattern. E-mail patterns can include the "*" and "?" wildcard characters (for example, *@domain.com, user?@*.com). Non-ASCII parts of domain names must not contain wildcard characters.

154

Page 155: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

SSL Certificates: certificate UtilityThe certificate utility is used to manage SSL certificates through CLI. By using this utility, you can perform the following tasks:

Creating and removing SSL certificates Assigning certificates to IP addresses Editing certain certificate parameters

Syntaxcertificate <command> <certificate name> [<domain name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates the SSL certificate named Site Certificate in domain's certificate repository for domain example.com by using private key file /usr/local/keys/keyfile.key, corresponding certificate file /usr/local/cert/certfile.cert, CA certificate file /usr/local/cert/cacert.cert, and associates the corresponding certificate signing request file usr/local/requests/csreq.csr with the certificate in Plesk:# ./certificate -c "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file.cert -cacert-file /usr/local/cert/cacert.cert -csr-file usr/local/requests/csreq

Commands

Command Parameter Description Example--create or -c

<certificate name>

Creates an SSL certificate in the specified certificate repository (administrator's or domain's repository) by using a private key file and a corresponding certificate file.

For information on the options required by the command, refer to the Note below the table.

To create the SSL certificate named Site Certificate in domain's certificate repository for domain example.com by using private key file /usr/local/keys/keyfile.key and certificate file usr/local/cert/certfile.cert:# ./certificate --create "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file.certor# ./certificate -c "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file.cert

155

Page 156: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--update or -u

<certificate name>

Updates an existing SSL certificate's parameters.

To change the name of SSL certificate named Site Certificate on domain example.com: to New Certificate# ./certificate --update "Site Certificate" -domain example.com -new-name "New Certificate"or# ./certificate -u "Site Certificate" -domain example.com -new-name "New Certificate"

--remove or -r

<certificate name>

Deletes an SSL certificate from administrator's or domain's repository.

To delete the SSL certificate named Site Certificate from domain example.com:# ./certificate --remove "Site Certificate" -domain example.comor# ./certificate -r "Site Certificate" -domain example.com

--assign-cert or -ac

<certificate name>

Assigns an SSL certificate in administrator's repository for use with a specific IP address.

Requires concomitant use of the -ip option.

To assign the SSL certificate named Site Certificate (from the administrator's repository) example.com for use with IP address 192.168.67.78:# ./certificate --assign-cert "Site Certificate" -domain example.com -ip 192.168.67.78or# ./certificate -ac "Site Certificate" -domain example.com -ip 192.168.67.78

--list or -l

<login name> Displays the list of SSL certificates stored in the specified certificate repository (administrator's or domain's repository).

To display the list of SSL certificates existing in the certificates repository on domain example.com:# ./certificate --list -domain example.comor# ./certificate -l -domain example.com

--help or -h

Displays help on the use of the utility.

To view help on the use of the certificate utility:# ./certificate –helpor# ./certificate -h

156

Page 157: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Note: The --create command requires concomitant use of one of the following combinations of options:

* -csr-file <file name> -key-file <file name>

* -csr-file <file name> -key-file <file name> -cert-file <file name>

* -csr-file <file name> -key-file <file name> -cert-file <file name> -cacert-file <file name>

* -key-file <file name> -cert-file <file name> -cacert-file <file name>

* -key-file <file name> -cert-file <file name>

Options

Option Parameter Description Example-domain <domain

name>Specifies a particular domain's certificate repository in Plesk as the location of a certificate.

To delete the SSL certificate named Site Certificate from domain's certificate repository on domain example.com:# ./certificate -r "Site Certificate" -domain example.com

-admin Specifies the administrator's certificate repository in Plesk as the location of a certificate.

To delete the SSL certificate named Site Certificate from # ./certificate -r "Site Certificate" -admin

-default Sets an SSL certificate as the default certificate. Is used to set administrator's default certificate only.

Used only concomitantly with the -admin option.

To set the SSL certificate named Site Certificate in the administrator's certificate repository in Plesk as the administrator's default certificate:# ./certificate -u "Site Certificate" -admin -default

-new-name <certificate name>

Changes the name of an existing SSL certificate.

To change the name of the SSL certificate named Site Certificate in the administrator's certificate repository in Plesk to Old Site Certificate:# ./certificate -u "Site Certificate" -admin -new-name "Old Site Certificate"

157

Page 158: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-key-file <path> Specifies the path to a

private key file on the Plesk server to be used for certificate creation (the Private key component).

Used with the --create command only.

Required by the --create command.

-cert-file <path> Specifies the path to an SSL certificate file on the Plesk server to be used for certificate creation (the Certificate component).

Used with the --create command only.

Required by the --create command.

-cacert-file

<path> Specifies the path to the CA certificate file on the Plesk server to be used for an SSL certificate creation in Plesk (the CA Certificate component).

Used with the --create command only.

-csr-file <path> Specifies the path to a certificate signing request file on the Plesk server and associates the certificate signing request with the certificate to be created in Plesk (the CSR component).

To create the SSL certificate named Site Certificate in domain's certificate repository for domain example.com by using private key file /usr/local/keys/keyfile.key, corresponding certificate file /usr/local/cert/certfile.cert, CA certificate file /usr/local/cert/cacert.cert, and to associate the corresponding certificate signing request file /usr/local/requests/csreq.csr:# ./certificate -c "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file.cert -cacert-file /usr/local/cert/cacert.cert -csr-file usr/local/requests/csreq

158

Page 159: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-ip <IP address> Specifies an IP

address to which an SSL certificate is to be assigned.

Used with the --assign-cert command only.

Required by the --assign-cert command.

To assign the SSL certificate named Site Certificate on domain example.com for use with IP address 192.168.67.78:# ./certificate --assign-cert "Site Certificate" -domain example.com -ip 192.168.67.78or

# ./certificate -ac "Site Certificate" -domain example.com -ip 192.168.67.78

159

Page 160: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Subdomains: subdomain UtilityThe subdomain utility is used to manage subdomains through CLI. By using this utility, you can perform the following tasks:

Creating, renaming, and removing subdomains Displaying information about subdomain configuration Managing domain hosting parameters such as support of various scripting

languages, log settings, hard disk limits, and SSL support Managing FTP user account for subdomains

Syntaxsubdomain <command> <subdomain name> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]

Example

The following command line creates subdomain subdom.example.com on domain example.com domain, sets the disk space quota for the subdomain to 1 GB, enables SSI and PHP and SSL support, and creates a separate FTP account with user login name subdomftp and password ftppass for the subdomain.# ./subdomain --create subdomain -domain example.com -hard_quota 1G -ssi true -php true -ftp_user native -login subdomftp -passwd ftppass -ssl true

Commands

Command Parameter Description Example--create or -c

<subdomain name>

Creates a subdomain on the domain specified by the -domain option.

To create subdomain subdom on domain example.com:# ./subdomain --create subdom -domain example.com or# ./subdomain -c subdom -domain example.com

--update or -u

<subdomain name>

Updates an existing subdomain on a domain specified by the -domain option.

To change the name of subdomain subdom.example.com to subdomnew.example.com:# ./subdomain --update subdom -domain example.com -new_name subdomnewor# ./subdomain -u subdom -domain example.com -new_name subdomnew

160

Page 161: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--remove or -r

Removes one or more subdomains specified by the -subdomains option from a domain specified by the -domain option.

To remove subdomains subdom1.example.com and subdom2.example.com from domain example.com:# ./subdomain --remove -subdomains subdom1,subdom2 -domain example.comor # ./subdomain -r -subdomains subdom1,subdom2 -domain example.com

--info or -i

Displays information about configurations of subdomains that exist on a specified domain.

By default, displays info on all subdomains on a domain. Use the -subdomains option, to display information only about subdomains specified by the option.

To display information about all subdomains on domain example.com:# ./subdomain --info -domain example.comor# ./subdomain -i -domain example.com

--help or -h

Displays help on the use of the utility.

To see the help info on the use of this utility:# ./subdomain -–helpor# ./subdomain -h

Options

Option Parameter Description Example-domain or -d

<domain name>

Specifies the parent domain that the subdomain belongs to.

To create a subdomain on example.com:# ./subdomain -c subdom -domain example.com

-new_name <subdomain name>

Changes the name of a subdomain.

Used only with the --update command.

To change the name of subdomain subdom.example.com to subdomnew.example.com:# ./subdomain -u subdom -domain example.com -new_name subdomnew

161

Page 162: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-ftp_user native|

mainSpecifies the FTP account to be used on a subdomain. If set to native, specifies that the subdomain will use its own separate FTP user account (the FTP user parameter, the Create a separate FTP user account for this subdomain option); if set to main, specifies that the subdomain domain will use the the FTP user account of the parent domain (the FTP user parameter, the Use the FTP user account of the main domain option).

Set to main by default.

When used with the native argument, requires concomitant use of the -login option.

To set subdomain subdom.example.com to use a separate FTP account with FTP user login name ftplogin:# ./subdomain -u subdom -domain example.com -ftp_user native -login ftplogin

-login <login name>

Sets the user login name for subdomain's own separate FTP account (the FTP Login parameter). The login name can only be specified if the subdomain uses its own, separate FTP account.

To change the user login name for the separate FTP account on subdomain subdom.example.com to ftplogin:# ./subdomain -u subdom -domain example.com -login ftplogin

-passwd <password> Sets the user password for subdomain's own separate FTP account (the Password parameter). The password can only be specified if the subdomain uses its own, separate FTP account.

See additional comments in the Note below the table.

To set the user password for the separate FTP account on subdomain subdom.example.com to ftppass:# ./subdomain -u subdom -domain example.com -passwd ftppass

-passwd_type

plain|crypt

Specifies the type of the FTP user password - plain or cryptic. Is set to plain by default. The password type can only be specified if the subdomain uses its own, separate FTP account.

See additional comments in the Note below the table.

To set the type of the FTP user password to cryptic on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -passwd_type crypt

162

Page 163: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-hard_quota <number>[K

|M|G]Sets the Hard disk quota limit for a subdomain. (type "0" to set the parameter to Unlimited).

Set to Unlimited by default.

The hard disk quota limit can only be set if the subdomain uses its own, separate FTP account.

To set the hard disk quota limit to 10 GB:# ./subdomain -u subdom -domain example.com -ftp_user native -hard_quota 10G

-ssi true|false Enables or disables SSI support on a subdomain (the SSI support parameter).

Set to false by default.

To enable SSI support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -ssi true

-php true|false Enables or disables PHP support on the subdomain (the PHP support parameter).

Set to false by default.

To enable PHP support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -php true

-cgi true|false Enables or disables CGI support on a subdomain (the CGI support parameter).

Set to false by default.

To enable CGI support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -cgi true

-fastcgi true|false Enables or disables FastCGI support on a subdomain (the mod_fcgid support parameter).

Set to false by default.

To enable FastCGI support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -fastcgi true

-perl true|false Enables or disables Perl support on a subdomain (the mod_perl support parameter).

Set to false by default.

To enable Perl support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -perl true

-asp true|false Enables or disables ASP support on a subdomain (the ASP support parameter).

Set to false by default.

To enable ASP support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -asp true

163

Page 164: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-python true|false Enables or disables Python

support on a subdomain (the mod_python support parameter).

Set to false by default.

To enable Python support on subdomain subdom.example.com:./# ./subdomain -u subdom -domain example.com -python true

-coldfusion true|false Enables or disables ColdFusion support on a subdomain (the ColdFusion support support parameter).

Set to false by default.

To enable ColdFusion support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -coldfusion true

-subdomains or -s

<subdomain name>[,<subdomain name>,...]>

Specifies the subdomains to remove or to display information about. Is used in combination with --remove and --info commands, respectively. If the --info command is used without the option, information about all subdomains existing on the parent domain will be displayed.

To remove subdomains subdom1.example.com and subdom2.example.com from domain example.com:# ./subdomain --remove -subdomains subdom1,subdom2 -domain example.com

-ssl true|false Enables or disables SSL support on a subdomain domain.

Set to false by default.

To enable SSL support on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -ssl true

-same_ssl true|false Enables or disables using a single directory for storing content accessible through SSL and non-SSL connection (the Use a single directory for housing SSL and non-SSL content parameter).

Set to false by default.

To enable using a single directory for storing content accessible through SSL and non-SSL connection on subdomain subdom.example.com:# ./subdomain -u subdom -domain example.com -same_ssl true

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

164

Page 165: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Tomcat Service and Java Applications on Domains: tomcat Utility

The tomcat utility is used to manage the Tomcat service and the Java-based Web applications on domains through CLI. By using this utility, you can perform the following tasks:

Installing Java-based Web applications on domains Changing status of the Tomcat service on a domain Changing statuses of Java-based Web applications on a domain

Syntaxtomcat <command> [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line installs a new Java-based Web application from file /usr/local/siteapps/webapp1.war on domain example.com:# ./tomcat --install /usr/local/siteapps/webapp1.war -domain example.com

Commands

Command Parameter Description Example--install or -i

<file name>

Installs a Java-based Web application on a domain.

Requires concomitant use of the -domain option.

To install a Web application from file /usr/local/siteapps/webapp1.war on domain example.com:# ./tomcat --install /usr/local/siteapps/webapp1.war -domain example.comor# ./tomcat -i /usr/local/siteapps/webapp1.war -domain example.com

--remove or -r

<webapp name>

Deletes a Java-based web application from a domain.

Requires concomitant use of the -domain option.

To delete Web application WebApp1 from domain example.com:# ./tomcat --remove webapp1 -domain example.comor# ./tomcat -r webapp1 -domain example.com

165

Page 166: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example-update-service

<domain name>

Updates a domain's Tomcat service status.

To enable Tomcat service on domain example.com:# ./tomcat --update-service example.com -status enabled

--update <webapp name>

Updates a Java-based web application status.

Requires concomitant use of the -domain option.

To start Web application WebApp1 on domain example.com:# ./tomcat --update webapp1 -domain example.com -status enabledor# ./tomcat -r webapp1 -domain example.com -status enabled

--help or -h

Displays help on the use of the utility.

To view help on the use of the utility:# ./tomcat --helpor# ./tomcat -h

Options

Option Parameter Description Example-domain <domain

name>Specifies a domain on which a Java application is to be installed or updated.

To install a Web application from file /usr/local/siteapps/webapp1.war on domain example.com:# ./tomcat -i /usr/local/siteapps/webapp1.war -domain example.com

-status enabled| disabled| admin, domadm, parent, client

Enables or disables Tomcat service or a Java application on a domain (the enabled or disabled parameters, respectively). Disables Tomcat service or a Java application and sets the Tomcat service or a Java application status to disabled by administrator (admin) or disabled by client (client). Sets the Tomcat service or a Java application status to the status of the domain (parent). The use of the domadm parameter is restricted; the parameter should not be used for changing the service or application status.

To enable the webapp application on domain example.com:# ./tomcat --update webapp -status enabled -domain example.com

To set the status of the Tomcat service on domain example.com to the status of the domain:# ./tomcat --update-service example.com -status parent

166

Page 167: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Web Statistics: webstat UtilityThe webstat utility is used to manage Webalizer preferences through CLI. By using this utility, you can perform the following tasks:

Adding direct request or referrer records to or removing them from Webalizer preferences on a domain

Displaying the list of existing direct request or referrer records in Webalizer preferences on a domain

Syntaxwebstat <command> [<domain name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line adds hidden referrer record *example.net/ to Webalizer preferences on domain example.com:# ./webstat --add example.com -type hidden -url *example.net/

Commands

Command Parameter Description Example--add or -a

<domain name>

Adds a record to Webalizer preferences on a domain.

To add hidden referrer record *example.net/ to Webalizer preferences on domain example.com:# ./webstat --add example.com -type hidden -url *example.net/or# ./webstat --add example.com -type hidden -url *example.net/

--remove or -r

<domain name>

Deletes a record from Webalizer preferences on a domain.

To remove hidden referrer record *example.net/ from Webalizer preferences on domain example.com:# ./webstat --remove example.com -type hidden -url *example.net/or# ./webstat -r example.com -type hidden -url *example.net/

167

Page 168: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--list or -l

<domain name>

Displays the list of records in Webalizer preferences on a domain.

To display the list of existing Webalizer records on domain example.com:# ./webstat --remove example.com -type hidden -url *example.net/or# ./webstat -r example.com -type hidden -url *example.net/

--del-all or -da

<domain name>

Deletes all records from Webalizer preferences on a domain.

# ./webstat --del-all example.comor# ./webstat -da example.com

--help or -h

Displays help on the use of this utility.

To see the help info on the use of the webstat utility:# ./webstat -–helpor# ./webstat -h

Options

Option Parameter Description Example-type group|

hidden| hidden_direct

Specifies the type of a record in Webalizer preferences. Is to be used in conjunction with the -url option.

group - grouped referrer hidden - hidden referrer hidden_direct - hidden

direct request-url <string> Specifies an URL or an URL

pattern for a Webalizer record.

To add hidden referrer record *example.net/ to Webalizer preferences on domain example.com:# ./webstat --add example.com -type hidden -url *example.net/

-group <string> Specifies name of a grouped referrer record in Webalizer preferences.

To add grouped referrer record *example.net/ named example.net to Webalizer preferences on domain example.com:# ./webstat --add example.com -type group -group example.net -url *example.net/

168

Page 169: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Web Users: webuser UtilityThe webuser utility is used to manage web users through CLI. By using this utility, you can perform the following tasks:

Creating and removing web user accounts Viewing the information about web user accounts Changing the web user account limits and preferences such as disk space limit,

scripting languages support, and login data.

Syntaxwebuser <command> [<login name>] [<option_1> [<param>][<option_2> [<param>]]…[<option_N> [<param>]]]

Example

The following command line creates the web user account with login name Michael on domain example.com and password userpass, enables the PHP support for the web user, and sets the disk space limit for the web user to 100 Mbytes.# ./webuser --create Michael -domain example.com -passwd userpass -php true -quota 100M

Commands

Command Parameter Description Example--create or -c

<login name>

Creates a web user account.

To create a web user with login name Michael and password userpass on domain example.com:# ./webuser --create Michael -domain example.com -passwd userpassor# ./webuser -c Michael -domain example.com -passwd userpass

--update or -u

<login name>

Updates an existing web user account with data specified by the options.

To enable PHP support for the web user with login name Michael on domain example.com:# ./webuser --update Michael -domain example.com -php true or# ./webuser -u Michael -domain example.com -php true

169

Page 170: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Command Parameter Description Example--remove or -r

<login name>

Deletes a web user account.

To delete the web user with login name Michael from domain example.com:# ./webuser --remove Michael -domain example.comor# ./webuser -r Michael -domain example.com

--info or -i

<login name>

Displays information about a web user account.

To display information about the web user with login name Michael on domain example.com:# ./webuser --info Michael -domain example.comor# ./webuser -i Michael -domain example.com

--help or -h

Displays help on the use of the utility.

To view the help info on the use of this utility:# ./webuser –helpor# ./webuser -h

Options

Option Parameter Description Example-domain <domain

name>Specifies name of the domain to which the web user account belongs.

Required for all commands, except --help.

To create a web user with login name Michael and password userpass on domain example.com:# ./webuser -c Michael -domain example.com -passwd userpass

-passwd <password> Sets the web user password. Is required when creating the web user account with the --create command.

See additional comments in the Note below the table.

To change the password for the web user with login name Michael to userpass on domain example.com:# ./webuser -u Michael -domain example.com -passwd somepass

-passwd_type

plain| encrypted

Specifies the type of web user password - plain or cryptic. Is set to plain by default.

See additional comments in the Note below the table.

To set the type of web user password to cryptic for the web user with login name Michael on domain example.com:./domain -u example.com -passwd_type encrypted

170

Page 171: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-quota <number>[K

|M|G]Sets the Hard disk quota parameter for a web user. Type 0 to set the parameter to Unlimited.

A number without a letter is interpreted as the number of bytes.

To set 50 MB hard disk quota for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -quota 50Mor# ./webuser -u Michael -domain example.com -quota 50000K

-ssi true|false Enables or disables SSI support on a web user account (the SSI support parameter).

Set to false by default.

To enable SSI support for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -ssi true

-php true|false Enables or disables PHP support on a web user account (the PHP support parameter).

Set to false by default.

To enable PHP support for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -php true

-cgi true|false Enables or disables CGI support on a web user account (the CGI support parameter).

Set to false by default.

To enable CGI support for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -cgi true

-perl true|false Enables or disables Perl support on a web user account (the mod_perl support parameter).

Set to false by default.

To enable Perl support for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -perl true

-asp true|false Enables or disables Apache ASP support on a web user account (the Apache ASP support parameter).

Set to false by default.

To enable Apache ASP support for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -asp true

-python true|false Enables or disables Python support on a web user account (the mod_python support parameter).

Set to false by default.

To enable Python support for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -python true

171

Page 172: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-cli.pdf · Plesk Command Line Interface (CLI) is designed for integration

Option Parameter Description Example-fastcgi true|false Enables or disables FastCGI

support on a web user account (the mod_fcgid support parameter).

Set to false by default.

To enable FastCGI support for the web user with login name Michael on domain example.com:# ./webuser -u Michael -domain example.com -fastcgi true

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.

172


Recommended