Plesk Command Line Interface

Transcription

Plesk Command Line Interface
2
Plesk for UNIX Copyright Notice
ISBN: N/A
SWsoft.
13755 Sunrise Valley Drive
Suite 325
Herndon
VA 20171 USA
Phone: +1 (703) 815 5670
Fax: +1 (703) 815 5675
© Copyright 1999-2007,
SWsoft Holdings, Ltd.
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.
Patented hosting technology protected by U.S.Patents 7,099,948; 7,076,633.
Patents pending in the U.S.
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, LLC
All other trademarks and copyrights referred to are the property of their respective owners.
3
Contents
Plesk for UNIX Copyright Notice
2
Preface
5
About This Guide ...................................................................................................................... 5
Typographical Conventions ....................................................................................................... 5
Feedback .................................................................................................................................. 6
Overview
7
Getting Started with Command-Line Utilities
10
Using Command-Line Utilities
11
Administrator's Server Preferences: admin Utility..................................................................... 12
Anonymous FTP Access: anonftp Utility .................................................................................. 14
Client Accounts: client Utility ................................................................................................... 17
Client Limits, Permissions, and Interface Settings: client_pref Utility ........................................ 22
Client Templates: client_template Utility .................................................................................. 30
ColdFusion Service on Plesk Server: cfsetting Utility ............................................................... 38
Custom Buttons: custombutton Utility ...................................................................................... 39
Database Servers: database-server Utility ............................................................................... 46
Databases: database Utility ..................................................................................................... 49
Desktop Presets: desktop Utility .............................................................................................. 54
DNS Zone Template: server_dns Utility ................................................................................... 57
DNS Zones on Domains: dns Utility......................................................................................... 63
Domain Accounts: domain Utility ............................................................................................. 70
Domain Administrator Accounts: domadmin Utility ................................................................... 80
Domain Aliases: domalias Utility .............................................................................................. 87
Domain Limits and Preferences: domain_pref Utility ................................................................ 90
Domain Templates: domain_template Utility ............................................................................ 94
Interface and System Preferences: server_pref Utility ............................................................ 103
Interface Templates: interface_template Utility ...................................................................... 106
IP Addresses: ipmanage Utility .............................................................................................. 110
Mail Accounts: mail Utility ...................................................................................................... 113
Mail Autoresponders: autoresponder Utility ........................................................................... 119
Mail Server Settings: mailserver Utility................................................................................... 125
Mailing Lists: maillist Utility .................................................................................................... 130
OS Update Sources: ai_prefs Utility ...................................................................................... 134
Plesk Services: service Utility ................................................................................................ 136
Server Configuration: init_conf Utility ..................................................................................... 139
Site Applications: sitapp Utility ............................................................................................... 144
Site Directories Protection: protdir Utility................................................................................ 146
Site Skeletons: skeleton Utility............................................................................................... 150
Spam Filtering: spamassassin Utility ..................................................................................... 152
SSL Certificates: certificate Utility .......................................................................................... 155
Subdomains: subdomain Utility ............................................................................................. 159
Plesk for UNIX Copyright Notice
Tomcat Service and Java Applications on Domains: tomcat Utility ......................................... 165
Web Statistics: webstat Utility ................................................................................................ 167
Web Users: webuser Utility ................................................................................................... 169
4
5
CHAP
TER
1
Preface
About This Guide
This document contains a complete description of command line utilities, commands,
and options for Plesk for Linux/Unix.
Typographical Conventions
The following kinds of formatting in the text identify special information.
Formatting convention
Type of Information
Example
Special Bold
Items you must select, such as Go to the QoS tab.
menu options, command
buttons, or items in a list.
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.
Moonscape
The names of style sheet
The license file is located in the
selectors, files and directories, httpdocs/common/license
and CSS fragments.
directory.
On-screen computer output in # ls –al /files
your command-line sessions; total 14470
source code in XML, C++, or
other programming languages.
What you type, contrasted with # cd /root/rpms/php
Preformatted
Preformatted Bold
on-screen computer output.
Preface
6
Feedback
If 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.
7
CHAP
TER
2
Overview
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 12)
Plesk administrator control panel interface
preferences and personal information.
ai_prefs (on page 134)
Operating System update sources.
anonftp (on page 14)
Anonymous FTP access on domains with
physical hosting on a Plesk server.
autoresponder (on page 119)
Mail autoresponders.
certificate (on page 155)
SSL certificates.
cfsetting (on page 38)
ColdFusion service on the Plesk server.
client (on page 17)
Client accounts.
client_pref (on page 22)
Client limits and permissions, IP pool, and
Plesk interface preferences (for example,
the default language and skin) for Plesk
clients.
Overview
8
Utility
Affected Object(s)
client_template (on page 30)
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.
domadmin (on page 80)
Domain administrator accounts.
domain (on page 70)
Domain accounts.
domain_pref (on page 90)
Domain limits and preferences for
applications, scripting support, e-mail, and
other services.
domain_template (on page 94)
Domain templates.
domalias (on page 87)
Domain aliases.
init_conf (on page 139)
Initial configuration of the Plesk server;
Plesk administrator personal info.
interface_template (on page
106)
Control panel interface templates.
ipmanage (on page 110)
IP addresses on Plesk server.
mail (on page 113)
Domain-level mail service, and mail names
(e-mail accounts).
maillist (on page 130)
Mailing lists.
mailserver (on page 125)
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 103)
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.
Overview
Utility
Affected Object(s)
skeleton (on page 150)
Site skeletons (directory structure).
spamassassin (on page 152)
Spamassassin spam filter.
subdomain (on page 159)
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 10) section.
9
10
CHAP
TER
3
Getting Started with Command-Line
Utilities
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:
# /usr/local/psa/bin/<utility name> [parameters] [options]

To run a utility when the /usr/local/psa/bin/ is your current directory, use
the following format:
# ./<utility name> [parameters] [options]
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 11)".
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.
11
CHAP
TER
4
Using Command-Line Utilities
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.
In this chapter:
Administrator's Server Preferences: admin Utility.......................................................... 12
Anonymous FTP Access: anonftp Utility ....................................................................... 14
Client Accounts: client Utility ........................................................................................ 17
Client Limits, Permissions, and Interface Settings: client_pref Utility ............................. 22
Managing Client Limits, Permissions, and Interface Settings Using client_pref Utility .... 30
ColdFusion Service on Plesk Server: cfsetting Utility .................................................... 38
Custom Buttons: custombutton Utility ........................................................................... 39
Database Servers: database-server Utility .................................................................... 46
Databases: database Utility .......................................................................................... 49
Desktop Presets: desktop Utility ................................................................................... 54
DNS Zone Template: server_dns Utility ........................................................................ 57
DNS Zones on Domains: dns Utility.............................................................................. 63
Domain Accounts: domain Utility .................................................................................. 70
Domain Administrator Accounts: domadmin Utility ........................................................ 80
Domain Aliases: domalias Utility ................................................................................... 87
Domain Limits and Preferences: domain_pref Utility ..................................................... 90
Domain Templates: domain_template Utility ................................................................. 94
Interface and System Preferences: server_pref Utility ................................................... 103
Interface Templates: interface_template Utility ............................................................. 106
IP Addresses: ipmanage Utility ..................................................................................... 110
Mail Accounts: mail Utility ............................................................................................. 113
Mail Autoresponders: autoresponder Utility .................................................................. 119
Mail Server Settings: mailserver Utility.......................................................................... 125
Mailing Lists: maillist Utility ........................................................................................... 130
OS Update Sources: ai_prefs Utility ............................................................................. 134
Plesk Services: service Utility ....................................................................................... 136
Server Configuration: init_conf Utility ............................................................................ 139
Single Sign-On Configuration: sso Utility ...................................................................... 144
Site Applications: sitapp Utility ...................................................................................... 144
Site Directories Protection: protdir Utility....................................................................... 146
Site Skeletons: skeleton Utility...................................................................................... 150
Spam Filtering: spamassassin Utility ............................................................................ 152
SSL Certificates: certificate Utility ................................................................................. 155
Subdomains: subdomain Utility .................................................................................... 159
Tomcat Service and Java Applications on Domains: tomcat Utility ................................ 165
Web Statistics: webstat Utility ....................................................................................... 167
Web Users: webuser Utility .......................................................................................... 169
Using Command-Line Utilities
12
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.
Syntax
admin <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
CustomTemplate
Commands
Command
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"
--info
or -i
Displays Plesk
To display Plesk administrator’s personal
administrator’s
information and preferences:
personal information # ./admin --info
and preferences.
or
# ./admin -i
--xmlinfo or
-xi
Displays Plesk
administrator’s
personal information
and preferences in
the XML format.
--help
or -h
Parameter
To display Plesk administrator’s personal
information and preferences in the XML format:
# ./admin --xml-info
or
# ./admin -xi
Displays help on the To display help on the use of the admin utility:
use of the utility.
# ./admin --help
or
# ./admin -h
Using Command-Line Utilities
13
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
-multiplesessions
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
-maxbuttonlength
<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 -maxbutton-length 20
-lockscreen
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 -lockscreen true
Using Command-Line Utilities
14
Anonymous FTP Access: anonftp Utility
The 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
Syntax
anonftp <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 -messagetext "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
true
or
# ./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.com
or
# ./anonftp -i example.com
Using Command-Line Utilities
Command
Parameter
--help
or -h
Description
Example
Displays help on
the use of the
utility.
To display help on the use of the anonftp utility:
# ./anonftp --help
or
# ./anonftp -h
Options
Option
Parameter
Description
Example
-status
true |
false
Enables 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
messagetext
<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).
To allow uploading files to the
incoming directory by users:
# ./anonftp -u
example.com -status
true -incoming true
Set to false by default.
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
download
s
true |
false
Enables or disables downloading
from the incoming directory (the
Allow downloading from the incoming
directory parameter).
To enable downloading files
from the incoming directory by
users:
# ./anonftp -u
example.com -status
true -incomingdownloads true
Set to false by default.
15
Using Command-Line Utilities
Option
Parameter
Description
incoming
-limit
<KB>
Sets disk space allocation for the
incoming directory (the Limit disk
space in the incoming directory
parameter).
-maxconnects
<number>
Sets the maximum number of
simultaneous FTP connections
(the Limit number of simultaneous
connections parameter).
bandwidt
h
<KB>
Sets the maximum download
bandwidth (the Limit download
bandwidth for this virtual FTP domain
parameter).
16
Example
To limit disk space in the
incoming directory to 900 Kb:
# ./anonftp -u
example.com -status
true -incoming-limit
Type "-1" to set the parameter to
900
Unlimited.
To set the maximum number of
simultaneous FTP connections
to 4:
# ./anonftp -u
Type "-1" to set the parameter to example.com -status
true -max-connects 4
Unlimited.
To limit the maximum download
bandwidth to 50 Kb:
# ./anonftp -u
example.com -status
Type "-1" to set the parameter to true -bandwidth 50
Unlimited.
Using Command-Line Utilities
17
Client Accounts: client Utility
The 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
Syntax
client <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 false
Commands
Command
Parameter
Description
--create
or -c
<login name> Creates a new
client account.
The argument of
the command
must begin with
an alphabetic
symbol.
Example
To create a client account named Michael
Smith with client login name clientlogin and
password clientpass:
# ./client --create clientlogin
-name "Michael Smith" -passwd
clientpass
or
# ./client -c clientlogin -name
"Michael Smith" -passwd
clientpass
Using Command-Line Utilities
Command
Parameter
Description
--update
or -u
<login name> Updates settings
of an existing
client account.
18
Example
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 newpass
or
# ./client -u clientlogin login newlogin -passwd newpass
--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
--on
--off
<login name> Displays
Displays information about the client
information about account with login name clientlogin:
client account
# ./client --info clientlogin
settings.
or
# ./client -i clientlogin
<login name> Enables a client To enable the client account with login
account.
name clientlogin:
# ./client --on clientlogin
<login name> Disables a client
account.
--help
or -h
Displays help on
the use of the
utility.
To the client account with login name
clientlogin:
# ./client --off clientlogin
To display help on the client utility:
# ./client --help
or
# ./client -h
Options
Option
Parameter
Description
Example
-status
enabled|di
sabled|adm
in|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 enabled
To disable client account with login
name clientlogin and assign
status Account is disabled by
administrator to the account:
# ./client -u clientlogin status admin
Using Command-Line Utilities
19
Option
Parameter
Description
Example
-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."
-name
<string>
Sets the client's Contact To create a client account named
name.
Michael Smith (also the contact
name for the client) with client login
Required for the -name clientlogin and password
create command.
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.
-passwd
<password>
Sets the client's
password for logging in
to Plesk control panel
(the Password
parameter).
Required for the -create command.
To change client login name to
newlogin for the client with current
login name clientlogin:
# ./client -u clientlogin login newlogin
To create a client account named
Michael Smith with client login
name clientlogin and password
clientpass:
# ./client -c clientlogin name "Michael Smith" passwd clientpass
For additional
comments, see the
Note below.
passwd_typ
e
plain|
crypt
Specifies the type of
client password - plain
or cryptic.
Set to plain by
default.
To set the type of the client's
password to cryptic for the client
with login name clientlogin:
# ./client -u clientlogin passwd_type crypt
For additional
comments, see the
Note below.
-phone
<number>
Sets the client's phone
number (the Phone
parameter).
To set the phone number to 5552345 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
Using Command-Line Utilities
20
Option
Parameter
Description
Example
-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]
-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 To set the postal code to 52345 for
code (the Postal/ZIP code the client with login name
parameter).
clientlogin:
# ./client -u clientlogin zip 52345
-country
<country
code>
Sets the client's country To set the country to United
address (the Country
States for the client with login
parameter).
name clientlogin:
The option's argument # ./client -u clientlogin country US
must be a valid twoletter code as described
in ISO-3166).
-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
Using Command-Line Utilities
21
Option
Parameter
Description
Example
-template
<template
name>
Specifies client
template to be used for
client creation.
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
Used only with the -create command.
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).
-force
Used only with the -create command.
-creationdate
<YYYY-MMDD>
Sets the client account
creation date (can be
arbitrary).
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
To set the creation date to 200612-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.
Using Command-Line Utilities
22
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.
Syntax
client_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 true
Commands
Command
Parameter
--update
or -u
<login name> Updates
preferences
and limits for
an existing
client
account.
--skinlist or sl
--info or
-i
Description
Displays the
list of
available
control panel
interface
skins.
<login name> Displays
information
about client
account
preferences
and limits.
Example
To disabling the option of changing domain
limits:
# ./client_pref --update
clientlogin -change_limits
false
or
# ./client_pref -u clientlogin
-change_limits false
To display the list of available interface
skins:
# ./client_pref --skin-list
or
# ./client_pref -sl
To display information about preferences
and limits set on client account with login
name clientlogin:
# ./client_pref --info
clientlogin
or
# ./client_pref -i clientlogin
Using Command-Line Utilities
Command
Parameter
--help or
-h
Description
Example
Displays help To display help on the use of the
on the use of client_pref utility:
the utility.
# ./client_pref --help
or
# ./client_pref -h
Options
Option
Parameter
Description
Example
create_do
mains
true|fal
se
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_ph
osting
true|fal
se
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_ph
p_safe_mo
de
true|fal
se
Allows/Prohibits a client to
turn PHP safe mode off and
on. (The PHP safe mode
management parameter.)
To allow he client with login
name clientlogin to
manage PHP safe mode:
Default value is false.
# ./client_pref -u
clientlogin manage_php_safe_mode_tru
e
Available since Plesk 8.1.1.
change_li
mits
true|fal
se
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_dn
s
true|fal
se
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_lo
g
true|fal
se
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
23
Using Command-Line Utilities
Option
Parameter
Description
Example
manage_cr
ontab
true|fal
se
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_an
onftp
true|fal
se
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_we
bapps
true|fal
se
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_ma
illists
true|fal
se
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|fal
se
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_no
t_chroot_
shell
true|fal
se
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_su
bdomains
true|fal
se
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
24
Using Command-Line Utilities
Option
Parameter
Description
Example
manage_qu
ota
true|fal
se
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_loc
al_backup
s
true|fal
se
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|fal
se
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_dr
web
true|fal
se
Enables or disables Dr.Web
antivirus application
management by a client (the
Dr.Web antivirus management
parameter).
manage_vi
rusfilter
true|fal
se
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_ac
cess_inte
rface
true|fal
se
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
manage_do
main_alia
ses
true|fal
se
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
To enable management of the
Dr.Web antivirus application by
the client with login name
clientlogin:
# ./client_pref -u
Deprecated since Plesk 8.1.1. clientlogin manage_drweb true
Use the manage_virusfilter
option instead.
25
Using Command-Line Utilities
Option
Parameter
Description
Example
cp_access
true|fal
se
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_da
shboard
true|fal
se
Enables or disables desktop
(dashboard) management by
a client (the Desktop
management parameter).
dashboard
true|fal
se
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).
To enable desktop (dashboard)
management for the client with
login name clientlogin:
# ./client_pref -u
Can be set to true only if the clientlogin manage_dashboard true
-dashboard option is set to
true.
Can be set to false only if
the -stdgui option is set to
true.
-stdgui
true|fal
se
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.
manage_sp
amfilter
true|fal
se
Enables or disables spam
filter management by a client
(the Spam filter management
parameter).
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
 To set the Only Desktop
interface is allowed option
for the User interface
parameter:
# ./client_pref -u
clientlogin -dashboard
true -stdgui false

To enable spam filter
management by the client with
login name clientlogin:
# ./client_pref -u
clientlogin manage_spamfilter true
26
Using Command-Line Utilities
Option
Parameter
Description
Example
-max_dom
<number>
Sets the Maximum number of
domains limit for a client.
To set the Maximum number of
domains limit for the client with
login name clientlogin to 10:
# ./client_pref -u
clientlogin -max_dom 10
Type "-1" to set the
parameter to the Unlimited
value.
max_dom_a
liases
<number>
Sets the Maximum number of
To set the Maximum number of
domain aliases limit for a client. domain aliases limit for the client
with login name clientlogin
Type "-1" to set the
to 10:
parameter to Unlimited.
# ./client_pref -u max_dom_aliases 10
disk_spac
e
<number>
[K|M|G]
Sets the Disk space limit for a
client.
max_traff
ic
<number>
[K|M|G]
Type "-1" to set the
parameter to Unlimited.
Sets the Maximum amount of
traffic limit (per month) for a
client.
Type "-1" to set the
parameter to Unlimited.
-max_box
<number>
Sets the Maximum number of
mailboxes limit (per month) for
a client.
Type "-1" to set the
parameter to Unlimited.
mbox_quot
a
<number>
[K|M|G]
max_redir
<number>
Sets the Set the mailbox quota
limit for a client.
Type "-1" to set the
parameter to Unlimited.
Sets the Maximum number of
mail redirects limit for a client.
Type "-1" to set the
parameter to Unlimited.
-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 Disk space limit for
the client with login name
clientlogin to 100 MB:
# ./client_pref -u
clientlogin -disk_space
100M
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
To set he Maximum number of
mailboxes limit for the client with
login name clientlogin to 10:
# ./client_pref -u
clientlogin -max_box 10
To set the mailbox quota for the
client with login name
clientlogin to 10 MB:
# ./client_pref -u
clientlogin -mbox_quota
10M
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
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
27
Using Command-Line Utilities
Option
Parameter
Description
Example
-max_resp
<number>
Sets the Maximum number of
mail autoresponders limit for a
client.
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
Type "-1" to set the
parameter to Unlimited.
-max_wu
<number>
Sets the Maximum number of
web users limit for a client.
Type "-1" to set the
parameter to Unlimited.
max_maill
ists
<number>
-max_db
<number>
Sets the Maximum number of
mailing lists limit for a client.
Type "-1" to set the
parameter to Unlimited.
Sets the Maximum number of
databases limit for a client.
Type "-1" to set the
parameter to Unlimited.
max_webap
ps
<number>
Sets the Maximum number of
Java applications limit for a
client.
Type "-1" to set the
parameter to Unlimited.
max_subdo
m
<number>
expiratio
n
<YYYYMM-DD>
-ip_pool
add|del:
<ip1>,
<ip2>,..
,<ipN>
Sets the Maximum number of
subdomains limit for a client.
Type "-1" to set the
parameter to Unlimited.
Sets Validity period for for a
client account.
Type "-1" to set the
parameter to Unlimited.
Adds IP addresses to or
deletes IP addresses from
from a client's IP address
pool.
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
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
To set the Maximum number of
databases limit for the client with
login name clientlogin to 20:
# ./client_pref -u
clientlogin -max_db 2
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
To set the maximum number of
subdomains for client with login
name clientlogin to 40:
# ./client_pref -u
clientlogin -max_subdom
40
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
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.16
8.78.89
28
Using Command-Line Utilities
Option
Parameter
Description
Example
-locale
<languag
e 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 ruRU
-skin
<skin
name>
Sets the default interface skin To set the WinXP Olivegreen
for client's control panel (the skin as the default interface skin
Interface skin parameter).
for the client with login name
clientlogin:
# ./client_pref -u
[email protected] -skin
"WinXP Olivegreen"
multiplesessions
true|fal
se
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 -multiplesessions true
-maxbuttonlength
<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-buttonlength 20
-lockscreen
true|fal
se
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
-desktoppreset
<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"
29
Using Command-Line Utilities
30
Client Templates: client_template 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
Syntax
client_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 -maxsubdom 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
ClientTemplate
or
# ./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
ClientTemplate
or
# ./client_template -u
ClientTemplate
Using Command-Line Utilities
Command
Parameter
Description
Example
--remove
or -r
<client
template name>
Deletes a client
template.
To remove a client template
ClientTemplate:
# ./client_template --remove
ClientTemplate
or
# ./client_template -r
ClientTemplate
--xml<client
info or -i template name>
--help or
-h
Displays
information
about a client
template in the
XML format.
To display information about client
template ClientTemplate:
# ./client_template --xmlinfo ClientTemplate
or
# ./client_template -x
ClientTemplate
Displays help on To view help on the use of the utility:
the use of the
# ./client_template --help
utility.
or
# ./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 -newname 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 -cpaccess false
-createdomains
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
-managephosting
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
31
Using Command-Line Utilities
Option
Parameter
Description
manage_php_
safe_mode
true|false Allows/Prohibits a client to To allow he client with
turn PHP safe mode off and
login name clientlogin
on. (The PHP safe mode
to manage PHP safe
management parameter.)
Default value is false.
Example
mode:
# ./client_pref -u
Available since Plesk 8.1.1. clientlogin manage_php_safe_mode_t
rue
-managequota
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
-changelimits
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
-managecrontab
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
-manageanonftp
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
-managewebapps
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
32
Using Command-Line Utilities
Option
Parameter
Description
Example
-managemaillists
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-shaccess
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
-managenot-chrootshell
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-chrootshell false
-managesubdomains
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
-allowlocalbackups
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-ftpbackups
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 -allowftp-backups true
33
Using Command-Line Utilities
Option
Parameter
Description
-managedrweb
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.
Example
To enable management of the
Dr.Web antivirus application
in client template
ClientTemplate:
# ./client_template -u
ClientTemplate manage-drweb true
manage_viru
sfilter
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
-remoteaccessinterface
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-accessinterface true
-managedomainaliases
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
-managedashboard
true|false Enables or disables
desktop (dashboard)
management by a client
(the Desktop management
parameter).
To enable desktop
(dashboard) management in
client template
ClientTemplate:
# ./client_template -u
ClientTemplate manage-dashboard true
Can be set to true only if
the -dashboard option is
set to true.
-dashboard
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
Can be set to false only if
client template
the -stdgui option is set
ClientTemplate:
to true.
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).

34
Using Command-Line Utilities
Option
Parameter
Description
-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.
-managespamfilter
true|false Enables or disables spam
filter management by a
client (the Spam filter
management parameter).
-max-dom
<number>
Sets the Maximum number of
domains limit for a client.
Type "-1" to set the
parameter to Unlimited.
-max-domaliases
<number>
Sets the Maximum number of
domain aliases limit for a
client.
Type "-1" to set the
parameter to Unlimited.
-disk-space
<number>[K Sets the Disk space limit for
|M|G]
a client.
Type "-1" to set the
parameter to Unlimited.
Example
# ./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
To enable spam filter
management in client
template ClientTemplate:
# ./client_template -u
ClientTemplate manage-spamfilter true
To set the Maximum number
of domains limit in client
template ClientTemplate to
10:
# ./client_template -u
ClientTemplate -maxdom 10
To set the Maximum number
of domain aliases limit in
client template
ClientTemplate to 10:
# ./client_template -u
-max-dom-aliases 10
To set the Disk space limit in
client template
ClientTemplate to 100 MB:
# ./client_template -u
ClientTemplate -diskspace 100M
35
Using Command-Line Utilities
Option
Parameter
Description
-maxtraffic
<number>[K Sets the Maximum amount of To set the Maximum amount
|M|G]
traffic limit (per month) for a of traffic limit in client
template ClientTemplate to 10
client.
GB/month:
Type "-1" to set the
# ./client_template -u
parameter to Unlimited.
ClientTemplate -maxtraffic 10G
-max-box
<number>
Sets the Maximum number of
mailboxes limit (per month)
for a client.
Type "-1" to set the
parameter to Unlimited.
-mbox-quota
<number>[K Sets the Set the mailbox
|M|G]
quota limit for a client.
Type "-1" to set the
parameter to Unlimited.
-max-redir
<number>
Sets the Maximum number of
mail redirects limit for a
client.
Type "-1" to set the
parameter to Unlimited.
-max-mg
<number>
Sets the Maximum number of
mail groups limit for a client.
Type "-1" to set the
parameter to Unlimited.
Example
To set the Maximum number
of mailboxes limit in client
template ClientTemplate to
10:
# ./client_template -u
ClientTemplate -maxbox 10
To set the Set the mailbox
quota limit in client template
ClientTemplate to 10 MB:
# ./client_template -u
ClientTemplate -mboxquota 10M
To set the Maximum number
of mail redirects limit in client
template ClientTemplate to
10:
# ./client_template -u
ClientTemplate -maxredir 10
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 To set the Maximum number
mail autoresponders limit for a of mail autoresponders limit in
client template
client.
ClientTemplate to 5:
Type "-1" to set the
# ./client_template -u
parameter to Unlimited.
ClientTemplate -maxresp 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 in client
template ClientTemplate to
50:
# ./client_template -u
ClientTemplate -max-wu
50
36
Using Command-Line Utilities
Option
Parameter
Description
Example
-maxmaillists
<number>
Sets the Maximum number of
mailing lists limit for a client.
To set the Maximum number
of mailing lists limit in client
template ClientTemplate to
30:
# ./client_template -u
ClientTemplate -maxmaillists 30
Type "-1" to set the
parameter to Unlimited.
-max-db
<number>
Sets the Maximum number of
databases limit for a client.
Type "-1" to set the
parameter to Unlimited.
-maxwebapps
<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 databases limit in client
template ClientTemplate to
20:
# ./client_template -u
ClientTemplate -max-db
2
To set the Maximum number
of Java applications limit in
client template
ClientTemplate to 50:
# ./client_template -u
ClientTemplate -maxwebapps 50
-max-subdom
<number>
Sets the Maximum number of To set the Maximum number
subdomains limit for a client. of subdomains limit t in client
template ClientTemplate to
Type "-1" to set the
Unlimited:
parameter to Unlimited.
# ./client_template -u
ClientTemplate -maxsubdom -1
-expiration
<YYYY-MMDD>
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:<i
p1>,
<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 -ippool
add:192.168.67.78,192.
168.78.89
-excl-ipnum
<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 -exclip-num 5
37
Using Command-Line Utilities
38
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.
Syntax
cfsetting <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 To enable the ColdFusion software
application to work in
installed in the
/usr/local/software/coldfusion directory on
the server mode.
the Plesk server to work in the server
<path> is the
mode:
ColdFusion installation
# ./cfsetting --server
path parameter.
/usr/local/software/coldfusion
or
# ./cfsetting -s
/usr/local/software/coldfusion
--j2ee or
-j
<path>
Enables the ColdFusion To enable the ColdFusion software
application to work in
installed in the
/usr/local/software/coldfusion directory on
the J2EE mode.
the Plesk server to work in the server
mode:
# ./cfsetting --j2ee
/usr/local/software/coldfusion
or
# ./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 --help
or
# ./cfsetting -h
Using Command-Line Utilities
39
Custom Buttons: custombutton Utility
The 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
Syntax
custombutton <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
true
Example 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"
Using Command-Line Utilities
40
Commands
Command
Parameter
--create
or -m
Description
Example
Creates new
custom button.
To create a new custom button CustomButton
(pointing to URL http://example.com) and print its
database ID number:
Requires the use
of the -text and # ./custombutton --create -text
CustomButton -url http://example.com
-url options.
-print-id
or
# ./custombutton -c -text
CustomButton -url http://example.com
-print-id
--info or
-i
<id#>
--remove
or -r
Deletes one or
*<id#,id more custom
#,...>
buttons with the
specified ID
numbers.
--help or
-h
--man or
-m
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 14
or
# ./custombutton -i 14
To delete custom buttons with ID# 14 and ID#
56:
# ./custombutton --remove 14,56
or
# ./custombutton -r 14,56
Displays help on
the use of the
utility
To view help on the use of the utility:
# ./custombutton --help
Displays detailed
help on the use
of the utility with
examples
To view detailed help with examples on the use
of the utility:
# ./custombutton --man
or
# ./custombutton -h
or
# ./custombutton -m
Options
Option
Parameter
Description
-owner
admin|<us Assigns ownership of a custom
er login button to a Plesk client. Is set to
name>|<do admin by default.
main
name>
Example
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
Using Command-Line Utilities
Option
Parameter
<int>
sort_ke
y
Description
Example
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 |
navigatio
n
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).
To set Button Label for the
custom button to be created to
CustomButton:
# ./custombutton -c text CustomButton -url
http://example.com
Required with the --create
command
-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.
dom_id |
url_com dom_name
p
|
ftp_user
|
ftp_pass
| cl_id |
cname |
pname |
email
41
To set the URL parameter to
example.com for custom button
CustomButton :
# ./custombutton -c text CustomButton -url
http://example.com
Specifies various parameters to
To include domain ID, domain
be included with the custom
name, and client ID in the
button's URL in browser requests. browser requests generated by
using custom button
The following parameters can be
CustomButton:
included:
# ./custombutton -c dom_id - Include domain ID
text CustomButton -url
http://example.com dom_name - Include domain name
url_comp
ftp_user - Include FTP user name dom_id,dom_name,cl_id
ftp_pass - Include FTP user
password
cl_id - Include client ID
cname - Include client's company
name
pname - Include client's contact
name
email - Include client's e-mail
Using Command-Line Utilities
Option
Parameter
42
Description
Example
<text>
conhelp
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
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"
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).
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
<path>
-public true |
false
Set to false by default.
true |
interna false
l
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.
-printid
Prints the database ID number of
a created custom button.
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
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
Using Command-Line Utilities
Option
Parameter
siteapp
-link
Description
43
Example
Links a custom button with a site To create a custom button
application installed on a domain. CustomButton linked to a site
application (if there is only a
Requires concomitant use of the
single application installed on a
-siteapp-domain option.
domain) that is accessible at
URL
http://example.com/SiteApplicati
on:
# ./custombutton -c text CustomButton -url
http://example.com/SiteA
pplication -siteapp-link
-siteapp-domain
example.com
If there are more than one
application installed on a
domain, you need to specify
more options to identify the site
application of interest.
<domain>
siteapp
-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.
<int>
siteapp
-id
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 SiteApplication
installed on domain
example.com and accessible at
URL
http://example.com/SiteApplicati
on:
# ./custombutton -c text CustomButton -url
http://example.com/SiteA
pplication -siteapp-link
-siteapp-domain
example.com -siteappname SiteApplication
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/SiteApplicati
on:
# ./custombutton -c text CustomButton -url
http://example.com/SiteA
pplication -siteapp-link
-siteapp-domain
example.com -siteapp-id
12
Using Command-Line Utilities
Option
Parameter
44
Description
Example
<name>
siteapp
-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/SiteApplicati
on:
# ./custombutton -c text CustomButton -url
http://example.com/SiteA
pplication -siteapp-link
-siteapp-domain
example.com -siteappname SiteApplication
<string>
siteapp
version
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/SiteApplicati
on:
# ./custombutton -c text CustomButton -url
http://example.com/SiteA
pplication -siteapp-link
-siteapp-domain
example.com -siteappname SiteApplication siteapp-version 13.44.1
<string>
siteapp
release
Specifies the release number of a To create a custom button
site application to be linked to a
CustomButton linked to a site
application SiteApplication with
custom button.
release number 1312.121
installed on domain
example.com and accessible at
URL
http://example.com/SiteApplicati
on:
# ./custombutton -c text CustomButton -url
http://example.com/SiteA
pplication -siteapp-link
-siteapp-domain
example.com -siteappname SiteApplication siteapp-version 1312.121
Using Command-Line Utilities
Option
Parameter
Description
45
Example
<director Specifies the path (the Destination
siteapp y>
directory parameter) to the
-prefix
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/SiteApplicati
on:
# ./custombutton -c text CustomButton -url
http://example.com/SiteA
pplication -siteapp-link
-siteapp-domain
example.com -siteappname SiteApplication siteapp-prefix
siteapplication/123
true |
siteapp false
-ssl
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/SiteApplicat
ion:
# ./custombutton -c text CustomButton -url
https://example.com/Site
Application -siteapplink -siteapp-domain
example.com -siteappname SiteApplication siteapp-ssl true
<name>
siteapp
subdoma
in
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.co
m/SiteApplication:
# ./custombutton -c text CustomButton -url
http://appsubdomain.exam
ple.com/SiteApplication
-sitepp-link -siteappdomain example.com siteapp-name
SiteApplication siteapp-subdomain
appsubdomain
Using Command-Line Utilities
Database Servers: database-server Utility
The 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
Syntax
database-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 newdbadminpass
Commands
5Command
Parameter
--create- <host
server
name or
IP
address>:
<port
number>
Description
Example
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
Using Command-Line Utilities
5Command
Parameter
--update- <host
server
name or
IP
address>:
<port
number>
Description
Example
Updates database server
connection settings - type,
host address, port number in the database server entry
in Plesk.
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
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.
--remove- <host
server
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
--setdefaultserver
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
<host
name or
IP
address>:
<port
number>
--setdefaultserverlocal
Assigns a local database
server as the default server
for the database type.
--help or
-h
Displays help on the use of
the utility.
To set the local MySQL server as
the default server for MySQL
databases:
Requires concomitant use of # ./database-server -set-default-server-local
the -type option.
-type mysql
To view help on the use of the
utility:
# ./database-server -help
or
# ./database-server -h
47
Using Command-Line Utilities
48
Options
Option
Parameter
Description
Example
-set
<host
name or
IP
address>:
<port
number>
Specifies the database server To change the IP address and port
number to 192.168.78.89:3636 for
host and port number.
the remote database server
Used only with the -previously available at
update-server command. 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|pos Specifies the type of a
tgresql
database server.
-admin
<login
name>
To create a database server entry in
Plesk for a MySQL server available
at 192.168.67.78:3838 and set the
Used with --createserver administrator's login name
server, --update-server dbadmin and password
and --set-defaultdbadminpass:
server-local commands. # ./database-server -create-server
192.168.67.78:3838 -type
Specifies database server
mysql -admin dbadmin administrator's login name.
passwd dbadminpass
Used with the --createserver and --updateserver commands.
-passwd <password Specifies database server
>
administrator's password.
Used with the --createserver and --updateserver commands.
For additional comments, see
the Note below the table.
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.
Using Command-Line Utilities
49
Databases: database Utility
The 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
Syntax
database <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
--create
or -c
<database Creates a database on a
name>
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.
Example
To create database DataStoreDB on
a the local MySQL server for domain
example.com:
# ./database --create
DataStoreDB -domain
example.com -type mysql
or
# ./database -c DataStoreDB
-domain example.com -type
mysql
Using Command-Line Utilities
Command
Parameter
Description
--update
or -u
<database Updates database settings. To add user db_user to database
name>
Adds, edits, or removes a
DataStoreDB:
database user.
# ./database --update
DataStoreDB -add_user
db_user
50
Example
or
# ./database –u DataStoreDB
-add_user db_user
--remove
or -r
<database Deletes a database.
name>
To delete database DataStoreDB
from the database server:
# ./database --remove
DataStoreDB
or
# ./database -r DataStoreDB
-removedbs
<id#,id#,...>
-removedbus
<id#,id#,...>
--help
or -h
id# is the
unique
Plesk
database ID
for a
database.
id# is the
unique
Plesk
database ID
for a
database
user.
Deletes multiple databases
from their respective
databases servers.
To delete databases with with Plesk
ID# 14 and ID# 56:
# ./database --remove-dbs
14,56
Deletes multiple database
users.
To delete database users with Plesk
ID# 22 and ID# 34:
# ./database --remove-dbus
22,34
Displays help on the use of
the utility.
To see the help info on the use of
this utility:
# ./database -–help
or
# ./database –h
Options
Option
Parameter
Description
Example
-domain
<domain
name>
Specifies a domain name.
To create database
DataStoreDB on domain
example.com on the local
MySQL server:
# ./database -c
Used with the --create
command.
Using Command-Line Utilities
Option
Parameter
Description
-type
postgresql Specifies the type of the
| mysql
database.
Used only with the -create command.
51
Example
DataStoreDB -domain
example.com -type
mysql
-passwd
<passwd>
Sets the database user
To set the password to
password for accessing the dbuserpass for user db_user
to access database
database.
DataStoreDB:
Used in conjunction with
the -update_user option. # ./database -u
DataStoreDB For additional comments,
update_user db_user see the Note below the
passwd dbuserpass
table.
-passwd_type
plain |
encrypted
Specifies the type of a
database user password plain or encrypted.
-add_user
<database Adds a database user to
user login the database.
name>
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.
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
To set the type of the client's
password to encrypted for the
database user with login
name db_user:
Set to plain by default.
# ./database -u
DataStoreDB Used in conjunction with
the -update_user option. update_user db_user passwd_type dbuserpass
For additional comments,
see the Note below the
table.
Used with the update_user option.
Using Command-Line Utilities
Option
Parameter
Description
-add-access
<host name Adds an access record for
or IP
a database user: IP
address>
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/re
fman/5.0/en/connectionaccess.html).
-removeaccess
<host name Removes an access record
or IP
for a database user: IP
address>
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/re
fman/5.0/en/connectionaccess.html).
-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.
52
Example
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
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
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
Using Command-Line Utilities
Option
Parameter
Description
-charset
<charset>
Sets a character set for a
To create database
PostgreSQL database to be DataStoreDB on domain
example.com on the
created.
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
53
Example
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.
Using Command-Line Utilities
Desktop Presets: desktop Utility
The 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
Syntax
desktop <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
--set-admin or
-sa
Parameter
Description
Example
Changes type
of an existing
desktop preset
to the
Administrator's
desktop preset
type.
To set existing desktop preset named
AdminDesktop as an administrator's
desktop preset:
# ./desktop --set-admin desktop-preset AdminDesktop
or
# ./desktop -sa -desktoppreset AdminDesktop
Requires
concomitant
use of the desktoppreset option.
54
Using Command-Line Utilities
Command
Parameter
Description
--updatepreset or -up
**
<preset
name>
Updates
To change the type of desktop preset
properties of a named AdminDesktop to Domain
desktop preset. owner's desktop preset:
# ./desktop --update-preset
Requires
-desktop-preset AdminDesktop
concomitant
-type domain
use of the type option.
--preset-lists
or -pl
--add-preset
or -ap
Example
or
# ./desktop -up AdminDesktop
-type domain
Displays the list To display the list of available
of existing
desktops:
desktop
# ./desktop --preset-lists
presets.
or
# ./desktop -pl
<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/AdminDesk
top.xml
or
# ./desktop -ap
/usr/local/presets/AdminDesk
top.xml
--removepreset or -rp
--help or -h
<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
AdminDesktop
or
# ./desktop -rp AdminDesktop
Displays help
on the use of
the utility.
To view help on the use of the utility:
# ./desktop --help
or
# ./desktop -h
55
Using Command-Line Utilities
Options
Option
Parameter
Description
desktoppreset
<preset name> Sets desktop preset
To set existing desktop preset named
AdminDesktop as an administrator's
desktop preset:
# ./desktop -sa -desktoppreset AdminDesktop
-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
overwrit
e
true|false
Allows overwriting of a
desktop preset with
another desktop with
the same name.
To add a desktop preset
AdminDesktop to the administrator's
repository of desktop presets from
desktop preset file
/usr/local/presets/AdminDesk
top.xml and replace existing
desktop with the same name in Plesk:
# ./desktop -ap
/usr/local/presets/AdminDesk
top.xml -overwrite true
Used only with the -add-preset
command.
-type
admin|clien
t|domain
Sets desktop preset
type:
admin - Default
Administrator's
desktop, domain Default domain owner
desktop, client Default client desktop.
Example
To change the type of desktop preset
named AdminDesktop to Domain
owner's desktop preset:
# ./desktop -up -desktoppreset AdminDesktop -type
domain
56
Using Command-Line Utilities
57
DNS Zone Template: server_dns Utility
The 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)
Syntax
server_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>"
Using Command-Line Utilities
58
Commands
Command
Parameter
--add or a
Description
Example
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
35
or
# ./server_dns -a -mx ""
-mailexchanger
"mail.<domain>" -priority
35
--set or - “<record(1)>;<re Adds specified
cord(2)>;…<recor resource records to
s
d(N)>”
and removes all preWhere <record> = existing resource
records from the Plesk
MX,"<subdomain
server's domain DNS
name>",<mail
zone template.
exchanger
name>."<domain>"
,<priority> |
NS,"<subdomain
name>",<name
server
name>."<domain>"
|
To add the following two resource
records to the domain DNS zone
template, while removing all preexisting 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;N
S,"",ns.<domain>"

A,<subdomain
name>,<IP
address>|"<ip>" |
PTR,<IP
address/subnet
mask>,<subdomain
name> |
or
# ./server_dns -s
"MX,"",<domain>,15;NS,"",
ns.<domain>"
CNAME,<subdomain
name>,<canonical
domain
name>|"<domain>" |
TXT,<subdomain
name>,<text>
-updateserver 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
Using Command-Line Utilities
Command
Parameter
59
Description
Example
-updatesoa
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 --updatesoa -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 --help
or
# ./server_dns –h
Options
Option
Parameter
Description
recursio
n
any|localnets Sets the Plesk name server
|localhost
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
Example
To enable support for
recursive DNS queries for
hosts on the local network
only:
# ./server_dns -u recursion localnets
Used with the --updateserver command only.
-status
enabled|disab Sets the status of a domain's
led
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 --updateserver command only.
To disable domain DNS
zones for newly created
domains:
# ./server_dns -u status disabled
Using Command-Line Utilities
Option
Parameter
Description
Example
-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.16
8.0.0/24
-a
<subdomain
name>
Specifies the A type resource
record for a subdomain in the
Plesk server's domain DNS
zone template.
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>"
Used with the --add.
Requires concomitant use of
the -ip option.
-ip
<IP
Specifies an IP address or a
address>|"<ip 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.
-ns
<subdomain
name>|""
Specifies the NS type resource To add a new NS resource
record <domain> specifying
record in the Plesk server's
domain name <domain> as
domain DNS zone template.
the name server to the DNS
Used only with the --add
zone template:
command.
# ./server_dns -a ns "" -nameserver
Requires concomitant use of
"ns.<domain>"
the -nameserver option.
nameserv
er
<domain
name>|"[<subd
omain
name>.]<domai
n>"
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.
-mx
<subdomain
name>|""
Specifies the MX type resource To add new MX resource
record <domain> specifying
record in the Plesk server's
domain name
domain DNS zone template.
mail.<domain> as the mail
Used only with the --add
exchanger for the record,
command.
and setting the mail
exchanger's priority to 15 to
Requires concomitant use of
the -mailexchanger option. the domain DNS zone
60
Using Command-Line Utilities
Option
Parameter
Description
priority
<number>
Specifies the mail exchanger
priority for creating an MX type
DNS record in the Plesk
server's domain DNS zone
template.
-cname
<subdomain
name>|""
Specifies the CNAME type
resource record in the Plesk
server's domain DNS zone
template.
mailexch
anger
Example
template:
<domain
Specifies the name of a
name>|"[<subd mailexchanger or a
# ./server_dns -a omain
placeholder for creating an MX mx "" -mailexchanger
name>.]<domai type DNS record in the Plesk
"mail.<domain>" n>"
priority 15
server's domain DNS zone
template.
Used only with the --add
command.
Requires concomitant use of
the -canonical option.
canonica
l
<domain
name>|[<subdo
main
name>.]<domai
n>"
Specifies a canonical name or
a placeholder for creating a
CNAME type DNS record in
the Plesk server's domain
DNS zone template.
-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.
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>"
To add new PTR type DNS
record "<ip>"/16 for
<domain> to the domain
DNS zone template:
# ./server_dns -a ptr "" -subnet
"<ip>"/16
Requires concomitant use of
the -subnet option.
-subnet
<IP
address>/<sub
net
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.
-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.
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 -
61
Using Command-Line Utilities
Option
Parameter
Description
-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.
-soa-ttl
-soarefresh
-soaretry
<number>[S|M| Sets the TTL parameter for the
H|D|W]
SOA record in the Plesk
server's domain DNS zone
template.
To set the TTL parameter to
5 hours, the Refresh
parameter to 4 hours, the
Retry parameter to 10
seconds, the Expire
Used with the--update-soa
parameter to 2 weeks, and
command only.
the Minimum parameter to
<number>[S|M| Sets the Refresh parameter for 2 days for the SOA record
in the domain DNS zone
H|D|W]
the SOA record in the Plesk
template:
server's domain DNS zone
# ./server_dns -template.
update-soa -soa-ttl
Used with the --update-soa 5H -soa-refresh 4H command only.
soa-retry 10S -soaexpire 2W -soa<number>[S|M| Sets the Retry parameter for
minimum 2D
H|D|W]
the SOA record in the Plesk
server's domain DNS zone
template.
Used with the --update-soa
command only.
-soaexpire
<number>[S|M| Sets the Expire parameter for
H|D|W]
the SOA record in the Plesk
server's domain DNS zone
template.
Used with the --update-soa
command only.
-soaminimum
Example
txt "This record is
used to implement
the Senders Policy
Framework and
DomainKeys
specifications" domain subdom
<number>[S|M| Sets the Minimum parameter
H|D|W]
for the SOA record in the Plesk
server's domain DNS zone
template.
Used with the --update-soa
command only.
62
Using Command-Line Utilities
63
DNS Zones on Domains: dns Utility
The 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
Syntax
dns <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.com
or
# ./dns -a example.com -mx mail3 mailexchanger mail.example.com
Using Command-Line Utilities
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.
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:
Requires
concomitant
use of the list option.

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.com
--del or <domain
-d
name>|
<domain
alias>

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"
or
# ./dns -d example.com -mx mail3 mailexchanger mail.example.com
--delall or da
--reset
or -res
<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.com
<domain
name>|
<domain
alias>
Restores the
default
resource
records for a
domain's zone
based on the
Plesk server
DNS zone
template.
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.9
or
# ./dns -res example.com -ip
81.1.204.9
or
# ./dns -da example.com
Requires
concomitant
use of the -ip
option.
--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
Using Command-Line Utilities
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
--setmaster
<domain
name>|
<domain
alias>
Sets the Plesk To set the Plesk name server as the master
name server as server for DNS zone on domain example.com:
the master
# ./dns --set-master example.com
server for
domain's or
domain alias'
DNS zone.
--setslave
<domain
name>|
<domain
alias>
Sets the Plesk To set the Plesk name server as the slave
name server as server for DNS zone on domain example.com:
the slave
# ./dns --set-slave example.com
server for
domain's or
domain alias'
DNS zone.
-updatesoa
<domain
name>|
<domain
alias>
Updates the
SOA record
settings for
domain's or
domain alias'
DNS zone.
--info
<domain
name>|
<domain
alias>
Displays the list To display the list of resource records in the
of resource
DNS zone for domain example.com:
records for a
# ./dns --info example.com
domain's or
domain alias'
DNS zone.
--help
or -h
Displays help
on the use of
the utility.
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
To display help on the use of the dns utility:
# ./dns --help
or
# ./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.
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
Used with the --add
and --del commands
only.
Requires concomitant
use of the -ip option.
65
Using Command-Line Utilities
-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.
-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.
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
nameserv
er
<domain name>
Specifies the name of a
nameserver for creating
an NS type resource
record in a domain's
DNS zone.
-mx
<subdomain name>
Specifies the MX type
resource record in a
domain's DNS zone.
mailexch
anger
<domain name>
priority
<number>
Specifies the mail
exchanger priority for
creating an MX type
DNS record in a
domain's DNS zone.
-cname
<subdomain name>
Specifies the CNAME
To add new CNAME type
type resource record in a resource record
subdom.example.com for a
domain's DNS zone.
canonical name example.org
Used with the --add
to the DNS zone on domain
and --del commands
example.com:
only.
# ./dns --add
example.com -cname
Requires concomitant
use of the -canonical subdom -canonical
example.org
option.
To add new MX resource
record mail3.example.com
specifying domain name
mail.example.com as the
Used with the --add
mail exchanger for the
and --del commands
record, and setting the mail
only.
exchanger's priority to 15 to
the DNS zone on domain
Requires concomitant
example.com:
use of the mailexchanger option. # ./dns -a
example.com -mx mail3
Specifies the name of a -mailexchanger
mail exchanger for
mail.example.com creating an MX type
priority 15
DNS record in a
domain's DNS zone.
66
Using Command-Line Utilities
canonica
l
<domain name>
Specifies a canonical
name for creating a
CNAME type DNS
record in a domain's
DNS zone.
-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.
-txt
<text>
Specifies the TXT type
resource record in a
domain's DNS zone.
-domain
<subdomain name>
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
To specify the TXT type
DNS record "This record is
used to implement the
Senders Policy Framework
Used with the --add
and DomainKeys
and --del commands
specifications" for
only.
subdomain name subdom in
the DNS zone for domain
Requires concomitant
example.com:
use of the -domain
# ./dns -a
option if the record is
created for a subdomain example.com -txt
"This record is used
of the domain.
to implement the
Specifies a subdomain
Senders Policy
name for creating a TXT Framework and
type resource record in a DomainKeys
domain's DNS zone.
specifications" domain subdom
Used with the --add
and --del commands
only.
67
Using Command-Line Utilities
-www
<true/false>
Enables or disables
support of the wwwprefixed alias for a
canonical domain name
in a domain's DNS zone
(the www parameter for a
domain name under the
Domain Administrator
preferences).
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
Used with the --reset
command only.
Creates or deletes a
CNAME type resource
record in the
www.<domain name>
form.
-primary
<IP address>
Adds an IP address of a To add IP address
primary DNS server for a 192.168.67.78 of the primary
DNS server for DNS zone on
domain's DNS zone.
domain example.com:
Used with the --add
# ./dns -a
and --del and -reset commands only. 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.
-soarefresh
<number>[S|M|H|D
|W]
-soaretry
<number>[S|M|H|D
|W]
To set the TTL parameter to
5 hours, the Refresh
parameter to 4 hours, the
Retry parameter to 10
seconds, the Expire
Used with the-parameter to 2 weeks, and
update-soa command the Minimum parameter to 2
only.
days for the SOA record in
the DNS zone on domain
Sets the Refresh
example.com:
parameter for the SOA
# ./dns --update-soa
record for a domain' or
domain alias' DNS zone. example.com -soa-ttl
5H -soa-refresh 4H Used with the -soa-retry 10S -soaupdate-soa command expire 2W -soaonly.
minimum 2D
Sets the Retry parameter
for the SOA record for a
domain' or domain alias'
DNS zone.
Used with the -update-soa command
only.
-soaexpire
<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.
68
Using Command-Line Utilities
-soaminimum
<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.
-list
"<record
1>;<record
2>;...<record
N>"
where <record > =
MX,<subdomain
name>,<mail
exchanger
name>,<priority>
|
NS,<subdomain
name>,<name
server name> |
A,<subdomain
name>,<IP
address> |
PTR,<IP
address/subnet
mask>,<subdomain
name> |
CNAME,<subdomain
name>,<canonical
domain name> |
TXT,<subdomain
name>,<text>
Specifies resource
To add the following two
records to be included in resource records to the DNS
zone of domain
a domain's DNS zone.
example.com, while
Consult descriptions of
removing all pre-existing
the options in this table
resource records from the
for adding resource
DNS zone:
records of respective
 new MX resource record
types individually.
mail3.example.com
Used with the -specifying domain name
update-soa command
mail.example.com as the
only.
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.exampl
e.com,15;NS,ns2,ns.ex
ample.com"

69
Using Command-Line Utilities
70
Domain Accounts: domain Utility
The 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.
Syntax
domain <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
--create
or --c
<domain
name>
Creates a new
domain.
To create new domain example.com for a
client with login name clientlogin:
# ./domain --create example.com Requires
concomitant use of clogin clientlogin - ip
192.168.67.78
the -clogin
option.
--update
or --u
<domain
name>
Example
or
# ./domain -c example.com -clogin
clientlogin
Updates
To enable domain example.com:
configuration of an # ./domain -u example.com -status
existing domain.
enabled
Using Command-Line Utilities
Сommand
Parameter
Description
Example
--remove
or --r
<domain
name>
Deletes an
existing domain.
To delete domain example.com:
# ./domain --remove example.com
71
or
# ./domain -r example.com
--info or
-i
<domain
name>
Displays
information about
configuration of a
domain.
--on
<domain
name>
Enables a domain. To enable domain example.com:
# ./domain --on example.com
--off
<domain
name>
Disables a
domain.
--changeowner
<domain_n Changes the
ame>
owner of a
domain.
Requires
concomitant use of
the -clogin
option.
--shells
or -s
<domain
name>
--help or
-h
To display configuration information about
domain example.com:
# ./domain --info example.com
or
# ./domain --i example.com
To disable domain example.com:
# ./domain --off example.com
To make the client with login name clientlogin
the owner of domain example.com:
# ./domain --change-owner
example.com -clogin clienlogin
Displays the list of To display the list of shells available on the
available shells on Plesk server:
a domain.
# ./domain --shells
Displays help on
the use of the
utility.
To display help on the use of the domain
utility:
# ./domain --help
or
# ./domain -h
Options
Option
Parameter
Description
Example
-status
enabled
|
disable
d|
admin,d
omadm,
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
enabled
To assign the status of domain
example.com to the status of
the client account that owns it:
# ./domain -u
example.com -status
parent
Using Command-Line Utilities
Option
Parameter
Description
Example
-new_name
<domain
name>
Renames a domain.
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 true
To 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.
To disable the www prefix
option for domain name
example.com:
# ./domain -u
example.com -www false
Used only with the -u command.
Set to true by default.
-hosting
true|
false
Enables or disables hosting for a
domain.
-hst_type
phys|
std|
frm
Sets the type of hosting on a
domain: phys - physical hosting,
std - standard forwarding, frm frame forwarding.
target_ur
l
<URL>
Sets a target URL for the
Standard forwarding and Frame
forwarding types of hosting.
72
To enable hosting for domain
example.com:
# ./domain -u
Set to false by default.
example.com -hosting
Requires concomitant use of the - true -ip 192.168.76.87
ip option.
To set up the standard
forwarding type of hosting (with
forwarding to newname.org) for
existing domain example.com:
# ./domain -u
Set to phys by default.
example.com -hst_type
Requires concomitant use of the - std -target_url
newname.org -ip
ip option.
192.168.76.87
When the std or frm parameters
are specified, the -target_url
option must also be used.
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
Using Command-Line Utilities
Option
Parameter
Description
Example
-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.
To specify an IP address for
domain example.com when
creating it:
# ./domain -c
example.com -clogin
clientlogin -ip
192.168.76.87
Must be used concomitantly with
options creating a domain or
specifying hosting type for a
domain (-hosting, hst_type, -target_url).
-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.
73
To indicate IP address of the
domain, where physical hosting
configured:
# ./domain -c
example.com -hosting hst_type -phys true -ip
192.168.76.87
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
ftppass
To change the FTP user login
name to newftplogin on domain
example.com with physical
hosting:
# ./domain -u
example.com -login
ftplogin
-passwd
<passwo
rd>
Specifies the FTP user password
To change the FTP user
on a domain with physical hosting. password to newftppass:
No password is set by default.
# ./domain -update
example.com -passwd
newftppass
passwd_ty
pe
plain|
crypt
Specifies the type of the FTP user
password - plain or cryptic.
-shell
<shell
name>|f
orbidde
n
Set to plain by default.
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 set the type of FTP user
password to cryptic for existing
domain example.com with
physical hosting:
# ./domain -u
example.com passwd_type crypt
To enable shell access and set
the /bin/sh/ shell for FTP user
on domain example.com:
# ./domain -u
example.com -shell
/bin/sh
Using Command-Line Utilities
Option
Parameter
Description
hard_quot
a
<number> Sets the Hard disk quota parameter
[K|M|G] for domain. Type 0 to set the
parameter to Unlimited. A number
without a letter is interpreted as the
number of bytes.
74
Example
To set a 10 Mb hard disk quota
for domain example.com:
# ./domain -u
example.com -hard_quota
10M
or
# ./domain -u
example.com -hard_quota
10000K
-fp
true|fa
lse
Enables or disables FrontPage
support on a domain. Is set to
false by default.
-fp_ssl
true|
false
Enables or disables FrontPage
To enable Microsoft FrontPage
Over SSL support on a domain. Is Over SSL support on domain
set to false by default.
example.com:
Deprecated since Plesk v.8.1 due # ./domain -u
to the stop of FrontPage support in example.com -fp_ssl
true
Plesk for Linux/Unix.
-fpauth
true|
false
Enables or disables FrontPage
authoring on a domain. Is set to
false by default.
-fplogin
<string
>
Sets the login name for
the FrontPage user.
-fppasswd
<string
>
creationdate
<YYYYMM-DD>
Sets the domain creation date.
-ssi
true|
false
Enables or disables SSI support
on a domain.
To enable Microsoft FrontPage
support for domain
example.com:
Deprecated since Plesk v.8.1 due # ./domain -u
to the stop of FrontPage support in example.com -fp true
Plesk for Linux/Unix.
To enable Microsoft FrontPage
authoring on domain
example.com:
Deprecated since Plesk v.8.1 due # ./domain -u
to the stop of FrontPage support in example.com -fpauth
true
Plesk for Linux/Unix.
To set the FrontPage user login
name to fploginname on
domain example.com:
Deprecated since Plesk v.8.1 due
to the stop of FrontPage support in # ./domain -u
example.com -fplogin
Plesk for Linux/Unix.
fploginname
Sets the password for the To set the FrontPage user
FrontPage user.
password to fpuserpass on
domain example.com:
Deprecated since Plesk v.8.1 due
to the stop of FrontPage support in # ./domain -u
example.com -fppasswd
Plesk for Linux/Unix.
fpuserpass
Used only with the --create
command.
Set to false by default.
To set the creation date for
domain example.com to 200612-30:
# ./domain -c
example.com -clogin
clientlogin -creationdate 2006-12-30
To enable SSI support on
domain example.com:
# ./domain -u
example.com -ssi true
Using Command-Line Utilities
Option
Parameter
Description
Example
-php
true|
false
Enables or disables PHP support
on a domain.
To enable PHP support on
domain example.com:
# ./domain -u
example.com -php true
Set to false by default.
php_safe_
mode
true|
false
-cgi
true|
false
Enables or disables safe mode for
PHP support on domain.
Set to true by default.
Enables or disables CGI support
on a domain.
Set to false by default.
-perl
true|
false
Enables or disables Perl support
on a domain.
Set to false by default.
-asp
true|
false
Enables or disables Apache ASP
support on a domain.
Set to false by default.
-python
true|
false
Enables or disables Python
support on a domain.
Set to false by default.
-fastcgi
true|
false
Enables or disables FastCGI
support on a domain.
Set to false by default.
coldfusio
n
true|
false
-miva
true|
false
Enables or disables ColdFusion
support on a domain.
Set to false by default.
Enables or disables Miva support
on a domain.
Set to false by default.
-ssl
true|
false
Enables or disables SSL support
on a domain.
Set to false by default.
75
To disable safe mode for PHP
support on domain
example.com:
# ./domain -u
example.com -php true php_safe_mode false
To enable CGI support on
domain example.com:
# ./domain -u
example.com -cgi true
To enable Perl support on
domain example.com:
# ./domain -u
example.com -perl true
To enable Apache ASP support
on domain example.com:
# ./domain -u
example.com -asp true
To enable Python support on
domain example.com:
# ./domain -u
example.com -python
true
To enable FastCGI support on
domain example.com:
# ./domain -u
example.com -fastcgi
true
To enable ColdFusion support
on domain example.com:
# ./domain -u
example.com -coldfusion
true
To enable Miva support on
domain example.com:
# ./domain -u
example.com -miva true
To enable SSL support on
domain example.com:
# ./domain -u
example.com -ssl true
Using Command-Line Utilities
76
Option
Parameter
Description
Example
-same_ssl
true|
false
Enables or disables using a single
directory for storing content
accessible through SSL and nonSSL connection (the Use a single
directory for housing SSL and non-SSL
content parameter).
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
Set to false by default.
-webstat
none|
awstats
|
webaliz
er
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
-webstatprotdiraccess
true|
false
Enables or disables access to web
statistics data through passwordprotected directory /plesk-stat
(the accessible via password protected
directory '/plesk-stat/' parameter).
To enable access to web
statistics data through
password- protected directory
/plesk-stat on domain
example.com:
# ./domain -u
example.com -webstatprotdir-access true
Set to false by default.
-err_docs
true|
false
Enables or disables custom server To enable custom error
error messages on a domain ( the messages support on domain
Custom Error Documents parameter). example.com:
# ./domain -u
Set to false by default.
example.com -err_docs
true
log_rotat
e
true|
false
Enables or disables log rotation on To enable log rotation on
a domain.
domain example.com:
# ./domain -u
Set to false by default.
example.com -log_rotate
true
log_bysiz
e
<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
log_bytim
e
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_n
um
<number
>
Sets the Maximum number of log files To set the maximum number of
log files (current and rotated) to
parameter.
5 for domain example.com:
Set to 3 by default.
# ./domain -u
example.com log_max_num 5
Using Command-Line Utilities
77
Option
Parameter
Description
log_compr
ess
true|
false
Enables or disables log file
To disable log file compression
compression (the Compress log files for domain example.com:
parameter).
# ./domain -u
example.com Set to true by default.
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).
-clogin
<client
login
name>
Specifies the login name of an
existing Plesk client who will own
the domain.
mail_serv
ice
true|
false
Enables or disables mail service
for a domain.
maillist_
service
true|
false
Enables or disables the mailing list To enable mailing list service
service on a domain.
for domain example.com:
# ./domain -u
Set to false by default.
example.com maillist_service true
-map_ip
<IP
address
>
Sets a new IP address for a
domain.
Set to true by default.
true|
false
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]
To create domain example.com
and assign ownership of the
domain to a Plesk client with
the login name clientlogin:
Used only with the --create or -# ./domain -c
change-owner commands.
example.com -clogin
clientlogin
Used only with the --changeowner command.
Required for the --changeowner command.
-aftp
Example
Enables or disables the
anonymous ftp service on a
domain.
Set to false by default.
To disable mail service for
domain example.com:
# ./domain -u
example.com mail_service false
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 --changeowner example.com clogin clientlogin map_ip 192.168.76.87
To enable the anonymous FTP
service on domain
example.com:
# ./domain -u
example.com -aftp true
Deprecated starting with Plesk 8.1. or
Use the anonftp utility instead.
./anonftp -u
example.com -status
true
Using Command-Line Utilities
Option
Parameter
Description
Example
-aftp_inc
true|
false
Enables or disables uploading to
the incoming directory (the Allow
uploading to incoming directory
parameter).
To allow uploading files to the
incoming directory by users:
# ./domain -u
example.com -aftp_inc
true
Set to false by default.
78
or
Deprecated starting with Plesk 8.1.
./anonftp -u
Use the anonftp utility instead.
example.com -incoming
true
aftp_inc_
disk_limi
t
<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.
To limit disk space in the
incoming directory to 900 Kb:
./anonftp -u
example.com aftp_inc_disk_limit
900K
Type "-1" to set the parameter to
Unlimited.
Deprecated starting with Plesk
8.1. Use the anonftp utility instead.
-dom_user
true|
false
du_passwd
_type
plain|
encrypt
ed
du_passwd
<string
>
-du_pname
<string
>
-du_email
<string
>
Enables or disables the domain
administrator account.
To enable the domain
administrator account on
domain example.com, set the
Set to false by default.
domain administrator's
password to domadminpass,
Deprecated starting with Plesk
make the password encrypted,
version 8.1. Use the domadmin
set the personal name as
utility instead.
Michael Smith, set the e-mail
Sets the type of the user password address to
[email protected], set
for domain administrator.
the default Plesk interface
Deprecated starting with Plesk 8.1.
language for domain
Use the domadmin utility instead.
administrator to Italian, and
enable multiple simultaneous
Sets the user password for domain domain administrator sessions:
administrator.
# ./domain -u
example.com -dom_user
Deprecated starting with Plesk
true -du_passwd_type
version 8.1. Use the domadmin
encrypted -du_passwd
utility instead.
domadminpass -du_pname
"Michael Smith" Sets the Personal name parameter
du_email
for domain administrator.
[email protected] Deprecated starting with Plesk
du_language it -duversion 8.1. Use the domadmin
multiple-sessions true
utility instead.
Sets the Email address for domain
administrator.
Deprecated starting with Plesk
version 8.1. Use the domadmin
utility instead.
Using Command-Line Utilities
Option
Parameter
Description
du_langua
ge
<string
>
Sets the default interface language
for domain administrator (the
Domain administrator's language
parameter). The argument of the
command must be a valid twoletter country code as described in
ISO-3166 (for example, "it" stands
for Italian).
79
Example
Deprecated starting with Plesk
version 8.1. Use the domadmin
utility instead.
-dumultiplesessions
true|fa
lse
Enables multiple simultaneous
sessions on a domain (the Allow
multiple sessions parameter).
Deprecated starting with Plesk
version 8.1. Use the domadmin
utility instead.
-notify
true|fa
lse
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
Using Command-Line Utilities
80
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
Syntax
domadmin <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 true
Commands
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 newpassword
or
# ./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.com
or
# ./domadmin -i example.com
Using Command-Line Utilities
Command
Parameter
--help or
-h
Description
Example
Displays help on
the use of the
utility.
To display help on the use of this utility:
# ./domadmin –-help
or
# ./domadmin -h
Options
Option
Parameter
Description
Example
-status
true|
false
Enables 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
<passwo
rd>
Sets the domain
administrator's password.
To change the domain
administrator's password to
newpassword on domain
example.com:
# ./domadmin -u example.com
-passwd newpassword
See additional comments in
the Note below the table.
plain|
passwd_t crypt
ype
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
<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"
-pname
-phone
<number
>
Sets the phone number (the To change the domain
Phone parameter) for a
administrator's phone number to
(112)112-2211 on domain
domain administrator.
example.com:
# ./domadmin -u example.com
-phone "(112)112-2211"
-fax
<number
>
Sets the Fax number (the
To change the domain
Fax parameter) for a domain administrator's fax number to
(112)112-2211 on domain
administrator.
example.com:
# ./domadmin -u example.com
-fax "(112)112-2211"
81
Using Command-Line Utilities
Option
Parameter
Description
Example
-email
<string
>
Sets the e-mail address (the To change the domain
E-mail parameter) for a
administrator's E-mail to
[email protected] on domain
domain administrator.
example.com:
# ./domadmin -u example.com
-email
[email protected]
-address <string
>
Sets the street address for a To change the domain
domain administrator (the
administrator's Address to 22 Drury
Address parameter).
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 <countr
y 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
<langua
ge
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
-locale
82
Using Command-Line Utilities
Option
Parameter
Description
Example
true|
multiple false
sessions
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
-maxbuttonlength
<number
>
Sets the Button label length
To change the button label length for
parameter for the domain
the domain administrator's control
administrator's control panel. 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"
-lockscreen
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
<string
desktop- >
preset
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"
true|
manage_p false
hosting
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
true|
manage_f false
tp_passw
ord
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
true|
manage_s false
h_access
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
83
Using Command-Line Utilities
Option
Parameter
Description
Example
true|
manage_n false
ot_chroo
t_shell
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
true|
manage_q false
uota
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
true|
manage_s false
ubdomain
s
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
true|
manage_d false
omain_al
iases
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
true|
manage_l false
og
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
true|
manage_a false
nonftp
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
true|
manage_c false
rontab
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
true|
manage_d false
ns
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
true|
manage_w false
ebapps
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
84
Using Command-Line Utilities
Option
Parameter
Description
Example
true|
manage_m false
aillists
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_lo true|
cal_back false
ups
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
true|
allow_ft false
p_backup
s
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
true|
manage_v false
irusfilt
er
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
true|
manage_d false
ashboard
Sets the Desktop management To allow managing Desktop by the
administrator of domain
parameter.
example.com:
Can be set to true only if
# ./domadmin -u example.com
the -dashboard option is
-manage_dashboard true
set to true.
true|
dashboar false
d
Enables or disables the use
of the Desktop interface by a
domain administrator.
To allow the use of Desktop
interface by the administrator of
domain example.com:
# ./domadmin -u example.com
Sets the User interface
-dashboard true
parameter (the Desktop and
 To allow the use of standard
standard interface are allowed
interface by the domain
and Only Desktop interface is
administrator of domain
allowed options only).
example.com:
Can be set to false only if # ./domadmin -u example.com
the -stdgui option is set to -stdgui true
true.


To set the Desktop and
standard interface are allowed
option for the User interface
parameter:
85
Using Command-Line Utilities
Option
Parameter
Description
-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.
true|
manage_s false
pamfilte
r
Enables or disables spam
filter management by a
client (the Spam filter
management parameter).
86
Example
# ./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
To enable spam filter management
the administrator of domain
example.com:
# ./domadmin -u example.com
-manage_spamfilter 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.
Using Command-Line Utilities
Domain Aliases: domalias Utility
The 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
Syntax
domalias <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.
To create a new domain alias example.com for
domain example.net:
# ./domalias --create example.com domain example.net
or
# ./domalias -c example.com -domain
example.net
Requires the
use of the domain option
--update
or -u
--delete
or -d
<alias
name>
<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 true
Deletes a
domain alias.
To delete domain alias example.com:
# ./domalias --delete example.com
or
# ./domalias -u example.com -mail
true
or
# ./domalias -d example.com
87
Using Command-Line Utilities
Command
Parameter
--delete- <domain
all or
name>
-da
Description
Example
Deletes all
domain aliases
for the specified
domain.
To delete all domain aliases for domain
example.net:
# ./domalias --delete-all
example.net
88
or
# ./domalias -da example.net
--info or <alias
-i
name>
Displays
information
about a domain
alias.
To view information about domain alias
example.com:
# ./domalias --info example.com
or
# ./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.
To change the name of domain alias
example.com to example.org:
# ./domalias --rename example.com new-name example.org
Requires the
use of the new-name
option
--help or <alias
–h
name>
Displays help on To view help on the use of this utility:
the use of the
# ./domalias –help
utility.
or
# ./domalias -h
Options
Option
Parameter
Description
Example
-newname
<FQDN>
Sets a new name
for an existing
domain alias.
To change the name of domain alias
example.com to example.org:
# ./domalias -r example.com new-name example.org
Required with the -rename
command.
-mail
true|false
Enables or disables To enable mail service on domain alias
mail service on a
example.com:
domain alias
# ./domalias -u example.com mail true
-web
true|false
Enables or disables To enable Web service on domain alias
web service on a
example.com:
domain alias.
# ./domalias -u example.com -web
true
Using Command-Line Utilities
89
Option
Parameter
Description
Example
-domain
<FQDN>
Specifies the name
of the domain for
which domain alias
is to be created.
To create a new domain alias example.com
for domain example.net
# ./domalias -c example.com domain example.net
Required with the -create command.
-status
enabled|disa Enables or disables To enable domain alias example.com:
bled
domain alias.
# ./domalias -u example.com status enabled
-tomcat
true|false
Enables or disables To enable the Tomcat service on domain
the Tomcat service alias example.com:
on a domain alias. # ./domalias -u example.com tomcat true
Using Command-Line Utilities
90
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.
Syntax
domain_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
To set the Disk space limit for domain
preferences of an example.com to 1 GB:
existing domain. # ./domain_pref --update
example.com -disk_space 1G
or
# ./domain_pref -u example.com disk_space 1G
--info
or -i
<domain
name>
Displays
To display information about preferences set
information about on domain example.com:
domain
# ./domain_pref --info example.com
preferences.
or
# ./domain_pref --i example.com
--setdefault
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.com
or
# ./domain_pref -d example.com
Using Command-Line Utilities
Command
Parameter
--help
or -h
Description
Example
Displays help on
the use of the
utility.
To display help on the use of the domain utility:
# ./domain_pref --help
or
# ./domain_pref -h
Options
Option
Parameter
Description
Example
<number>[ Sets the Disk space limit.
disk_sp K|M|G]
(type "-1" to set the
ace
parameter to Unlimited).
To set the Disk space limit for
domain example.com to 1 GB:
# ./domain_pref -u
example.com -disk_space 1G
<number>[ Sets the Maximum amount of
max_tra K|M|G]
traffic (per month) limit. (type
ffic
"-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
<number>
max_box
Sets the Maximum number of
mailboxes limit. (type "-1" to
set the parameter to
Unlimited).
<number>[ Sets the Mailbox quota limit.
mbox_qu K|M|G]
(type "-1" to set the
ota
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
To set the Mailbox quota limit for
domain example.com domain to 100
MB:
# ./domain_pref -u
example.com -mbox_quota
100M
<number>
max_red
ir
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
<number>
max_res
p
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
-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
91
Using Command-Line Utilities
Option
Parameter
Description
Example
-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
<number>
max_mai
llists
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
<number>
max_web
apps
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
<number>
max_sub
dom
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
<YYYY-MM- Sets the Validity period limit
expirat DD>
starting from domain
ion
creation date. (type "-1" to
set the parameter to
Unlimited).
-www
true|
false
true|
wuscrip false
ts
To set the Validity period limit for
domain example.com to 2008-11-30:
# ./domain_pref -u
example.com -expiration
2008-11-30
Enables or disables the www To disable the www prefix option for
prefix option for Domain name. domain name example.com:
# ./domain_pref -u
Set to true by default.
example.com -www false
Enables or disables scripting
support for web users on a
domain (the Allow the web
users scripting parameter).
To enable scripting support for web
users of domain example.com:
# ./domain_pref -u
example.com -wuscripts true
Set to false by default.
true|
webmail 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
92
Using Command-Line Utilities
Option
Parameter
-no_usr bounce:<t
xt>|<email
address>|
reject
<number>
max_dom
_aliase
s
-ataccess
Description
Example
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"
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
true|fals Sets the Enable
e
[email protected] access
format parameter for a
domain.
<number>
keep_tr
af_stat
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 forward mail messages
addressed to non-existing users on
domain example.com to
[email protected]:
# ./domain_pref -u
example.com -no_usr
[email protected]
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
To retain traffic statistics for domain
example.com for the last 5 months
only:
# ./domain_pref -u
example.com -keep_traf_stat
5
93
Using Command-Line Utilities
94
Domain Templates: domain_template Utility
The 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.
Syntax
domain_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
--create or <domain
template
-c
name>
Description
Example
Creates a new
domain
template.
To create a domain template named
DomainTemplate:
# ./domain_template --create
DomainTemplate
or
# ./domain_template -c
DomainTemplate
--update or
-u
<domain
template
name>
Updates an
To update a domain template named
existing domain DomainTemplate:
template.
# ./domain_template --update
DomainTemplate
or
# ./domain_template -u
DomainTemplate
Using Command-Line Utilities
Command
Parameter
Description
Example
--remove or
-r
<domain
template
name>
Deletes a
domain
template.
To remove a domain template
DomainTemplate:
# ./domain_template --remove
DomainTemplate
or
# ./domain_template -r
DomainTemplate
--xml-info
or -i
<domain
template
name>
--help or -h
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
DomainTemplate
Displays help
on the use of
the utility.
To view help on the use of the utility:
# ./domain_template --help
or
# ./domain_template -x
DomainTemplate
or
# ./domain_template -h
Options
Option
Parameter
Description
Example
-newname
<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
95
Using Command-Line Utilities
Option
Parameter
Description
Example
-no_usr
bounce:<t
xt>|<email
address>|
reject
Enables or disables
message bouncing,
forwarding to an e-mail
address, or rejecting
mail addressed to nonexisting 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"
webmail
true|fals Enables or disables
e
the use of WebMail.
Set to false by
default.
max_dom
_aliase
s
<number>
Sets the Maximum
number of domain aliases
limit. (type "-1" to set
the parameter to
Unlimited).
Set to Unlimited by
default.
disk_sp
ace
<number>[ Sets the Disk space
K|M|G]
limit. (type "-1" to set
the parameter to
Unlimited).
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]
To enable WebMail support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -webmail true
To set the Maximum number of domain
aliases limit in domain template
DomainTemplate to 10:
# ./domain_template -u
DomainTemplate -max_dom_aliases
10
To set the Disk space limit in domain
template DomainTemplate to 50 MB:
# ./domain_template -u
DomainTemplate -disk_space 50M
Set to Unlimited by
default.
max_tra
ffic
<number>[ Sets the Maximum
K|M|G]
amount of traffic (per
month) limit. (type "-1"
to set the parameter to
Unlimited).
Set to Unlimited by
default.
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 amount of traffic limit
in domain template DomainTemplate to
500 MB/month:
# ./domain_template -u
DomainTemplate -max_traffic
500M
To set the Maximum number of mailboxes
limit in domain template DomainTemplate
to 50:
# ./domain_template -u
DomainTemplate -max_box 50
96
Using Command-Line Utilities
Option
Parameter
Description
mbox_qu
ota
<number>[ Sets the Mailbox quota
K|M|G]
limit. (type "-1" to set
the parameter to
Unlimited).
Example
To set the Mailbox quota limit in domain
template DomainTemplate to 50 MB:
# ./domain_template -u
DomainTemplate -mbox_quota 50M
Set to Unlimited by
default.
total_m
boxes_q
uota
<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_red
ir
<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 in domain template
DomainTemplate to Unlimited:
# ./domain_template -u
DomainTemplate -max_redir -1
Set to Unlimited by
default.
-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 in domain template
DomainTemplate to 100:
# ./domain_template -u
DomainTemplate -max_mg 100
Set to Unlimited by
default.
max_res
p
<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 in domain template
DomainTemplate to 50:
# ./domain_template -u
DomainTemplate -max_resp 50
Set to Unlimited by
default.
-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 in domain template
DomainTemplate to 100:
# ./domain_template -u
DomainTemplate -max_wu 100
Set to Unlimited by
default.
-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
97
Using Command-Line Utilities
Option
Parameter
Description
Example
max_mai
llists
<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 in domain template
DomainTemplate to 50:
# ./domain_template -u
DomainTemplate -max_maillists
50
Set to Unlimited by
default.
max_web
apps
<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_sub
dom
<number>
Sets the Maximum
number of subdomains
limit. (type "-1" to set
the parameter to
Unlimited).
To set the Maximum number of
subdomains limit in domain template
DomainTemplate to 20:
# ./domain_template -u
DomainTemplate -max_subdom 20
Set to Unlimited by
default.
expirat
ion
<number>Y Sets the Validity period
|M|D
limit starting from
creation date of a the
domain account. (type
"-1" to set the
parameter to Unlimited).
Set to Unlimited by
default.
log_rot
ate
true|fals Enables or disables
e
log rotation on a
domain. Is set to
false by default.
log_bys
ize
<KB>
Enables or disables
log rotation on domain
based on the current
log file size (the Log
rotation condition
parameter).
To set the Validity period limit in domain
template DomainTemplate to 20 days:
# ./domain_template -u
DomainTemplate -expiration 20D
To set the Validity period limit in domain
template DomainTemplate to 1 year:
# ./domain_template -u
DomainTemplate -expiration 1Y
To disable log rotation in domain template
DomainTemplate:
# ./domain_template -u
DomainTemplate -log_rotate
false
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
98
Using Command-Line Utilities
Option
Parameter
Description
log_byt
ime
daily|wee Enables or disables
kly|
log rotation on domain
based on the current
monthly
log file size (the Log
rotation condition
parameter).
Example
To set weekly log rotation in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -log_bytime
weekly
Set to daily by
default.
Sets the Maximum
number of log files
parameter.
log_max
_num
<number>
log_com
press
true|fals Enables or disables
e
log file compression
(the Compress log files
parameter).
Set to false by
default.
To set the maximum number of log files to
5 in domain template DomainTemplate:
# ./domain_template -u
DomainTemplate -log_max_num 5
To enable log file compression in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -log_compress
true
log_ema
il
<e-mail
address>
Enables or disables
automatic sending of
rotated log files to the
specified e-mail
address (the Send
processed log files to email 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_tr
af_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
maillis
t
true|fals Sets the Mailing lists
e
parameter.
dns_zon
e_type
master|sl Sets the Type of domain To set the Plesk DNS server to act as
ave
DNS zone parameter.
slave DNS server in domain template
DomainTemplate:
Set to master by
# ./domain_template -u
default.
DomainTemplate -dns_zone_type
slave
true|fals Enables or disables
To enable physical hosting in domain
e
physical hosting on
template DomainTemplate:
domain (the Physical
# ./domain_template -u
hosting parameter).
DomainTemplate -hosting true
hosting
Set to false by
default.
Set to false by
default.
To enable mailing lists in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -maillist true
99
Using Command-Line Utilities
Option
Parameter
Description
-quota
<number>[ Sets the Hard disk quota
K|M|G]
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.
Example
To set the hard disk quota to 100 MB in
domain template DomainTemplate:
# ./domain_template -u
DomainTemplate -quota 100M
Set to Unlimited by
default.
-ssl
true|fals Enables or disables
e
SSL support (the SSL
support parameter).
Set to false by
default.
same_ss
l
true|fals Enables or disables
e
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).
To enable SSL support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -ssl true
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
Set to false by
default.
-ssi
true|fals Enables or disables
e
the SSI support
parameter.
Set to false by
default.
ssi_htm
l
true|fals Sets the use SSI for
e
*.htm, *.html files option
for the SSI support
parameter.
Set to false by
default.
-php
true|fals Enables or disables
e
PHP support (the PHP
support parameter).
Set to false by
default.
-cgi
true|fals Enables or disables
e
CGI support (the CGI
support parameter).
Set to false by
default.
To enable SSI support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -ssi true
To enable SSI support for HTML and
HTM files in domain template
DomainTemplate:
# ./domain_template -u
DomainTemplate -ssi_html true
To enable PHP support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -php true
To enable CGI support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -cgi true
100
Using Command-Line Utilities
Option
Parameter
Description
-perl
true|fals Enables or disables
e
the mod_perl support
parameter.
Set to false by
default.
-asp
true|fals Enables or disables
e
Apache ASP support
(the Apache ASP support
parameter).
101
Example
To enable Perl support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -perl true
To enable Apache ASP support in
domain template DomainTemplate:
# ./domain_template -u
DomainTemplate -asp true
Set to false by
default.
-python
true|fals Enables or disables
e
Python support (the
mod_python support
parameter).
To enable Python support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -python true
Set to false by
default.
coldfus
ion
true|fals Enables or disables
e
ColdFusion support
(the ColdFusion support
parameter).
To enable ColdFusion support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -coldfusion true
Set to false by
default.
fastcgi
true|fals Enables or disables
e
FastCGI support (the
mod_fcgi support
parameter).
To enable FastCGI support in domain
template DomainTemplate:
# ./domain_template -u
DomainTemplate -fastcgi true
Set to false by
default.
-shell
<shell
Enables or disables
name>|for shell access user and
bidden
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).
To enable shell access and set the
/bin/sh/ shell for domain FTP user in
domain template DomainTemplate:
# ./domain_template -u -shell
/bin/sh
To display the list of available shells:
# ./domain --shells
Set to forbidden by
default.
webstat
none|weba Enables or disables
lizer|
Web statistic support;
selects Web statistics
awstats
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
Using Command-Line Utilities
Option
Parameter
Description
webstat
_protdi
r
true|fals Enables or disables
e
the accessible via
password protected
directory '/plesk-stat/'
option for the Web
statistics parameter.
Set to false by
default.
err_doc
s
true|fals Enables or disables
e
custom server error
messages on a
domain ( the Custom
Error Documents
parameter).
102
Example
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
To enable custom error messages
support in domain template
DomainTemplate:
# ./domain_template -u
DomainTemplate -err_docs true
Set to false by
default.
wuscrip
ts
true|fals Enables or disables
e
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
Using Command-Line Utilities
103
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 -includedatabases true -traffic-direction out
Commands
Сommand
Parameter
Description
Example
--setdefault or sd
Sets Plesk Default
Interface Preferences.
To set Plesk servers Default locale to
English(United States):
# ./server_pref --setdefault -locale en-US
or
# ./server_pref -sd -locale
en-US
--localeslist or -ll
Displays the list of
available supported
interface languages
(locales).
To display the list of available interface
languages (locales):
# ./server_pref --localeslist
or
# ./server_pref -ll
--skinslist or -sl
-templateslist or -tl
Displays the list of
available Plesk control
panel skins.
To display the list of available skins:
# ./server_pref --skins-list
Displays the list of
available interface
customization
templates.
To display the list of available interface
customization templates:
# ./server_pref --templateslist
or
# ./server_pref -sl
or
# ./server_pref -tl
Using Command-Line Utilities
Сommand
Parameter
104
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 --help
or
# ./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 fourletter language code derived from
the language code described in
ISO-639-2 and the corresponding
country code described in ISO3166. For example, the Plesk code
for the Italian language code is itIT; the Plesk code for the
American variant of English is enUS; the Plesk code for the British
variant of English is en-GB.
To set the default interface
language for Plesk
administrator to Russian:
# ./server_pref -sd locale -ru-RU
Used only with the --setdefault command.
-skin
<skin
name>
Sets the default interface skin for
Plesk control panel (the Default skin
parameter).
Used only with the --setdefault command.
<template
template name>
Sets the default interface
customization template to Plesk
control panel (the Default interface
customization template parameter).
Used only with the --setdefault command.
To set the WinXP Olivegreen
skin as the default skin:
# ./server_pref -sd skin "WinXP
Olivegreen"
To apply customization
template CustomTemplate to
administrator's control panel:
# ./server_pref -sd template
CustomTemplate
Using Command-Line Utilities
Option
Parameter
105
Description
Example
<string>
hostname
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 -uhostname
host.example.com
<number>
restartapache
Sets the Apache restart interval
parameter (in seconds).
To set the Apache restart
interval to 1000 seconds:
# ./server_pref -u restart-apache 1000
true|false Enables or disables including log
includefiles in the disk space usage
logs
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
true|false Enables or disables including
includedatabases in the disk space usage
database
calculation (the Include in the disk
s
space usage calculation parameter,
databases option).
To enable including
databases in the disk space
usage calculation:
# ./server_pref -u include-databases true
true|false Enables or disables including
includemailboxes in the disk space usage
mailboxe
calculation (the Include in the disk
s
space usage calculation parameter,
mailboxes option).
To enable including
mailboxes in the disk space
usage calculation:
# ./server_pref -u include-mailboxes true
true|false Enables or disables including
includemailing lists in the disk space usage
maillist
calculation (the Include in the disk
s
space usage calculation parameter,
mailing lists option).
To enable including mailing
lists in the disk space usage
calculation:
# ./server_pref -u include-maillists true
true|false Enables or disables including
includedomain backup files in the disk
domaindu
space usage calculation (the Include
mps
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
-counttype
byte|block Sets the When calculating disk space
usage, count parameter (file size
(byte) or amount of disk space used
(block) options).
-statkeep
<number>
Sets the Retain traffic statistics for
parameter (in months).
Set to 4 by default.
both|in|ou Sets the Include in the traffic
traffic- t
calculation parameter (inbound and
directio
outbound traffic, only inbound traffic,
n
or only outbound traffic options)
To enable counting disk
space usage based on actual
file sizes:
# ./server_pref -u count-type -byte
To set the Retain traffic
statistics for parameter to 3
months:
/server_pref -u -statkeep 3
To include only outbound
traffic in the traffic calculation:
# ./server_pref -u traffic-direction out
Using Command-Line Utilities
106
Interface Templates: interface_template Utility
The 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
Syntax
interface_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
--export
or -e
<template Exports interface
name>
Example
To export interface template
template as a file InterfaceTemplate form Plesk to file
/usr/local/templates/intemp:
or to the standard
# ./interface_template --export
output
InterfaceTemplate
(STDOUT).
/usr/local/templates/intemp
or
# ./interface_template -e
InterfaceTemplate
/usr/local/templates/intemp
Using Command-Line Utilities
Command
Parameter
Description
--import
or -i
<template Import interface
name>
template from a
file or the
standard input
(STDIN).
107
Example
To import interface template
InterfaceTemplate to Plesk from file
/usr/local/templates/intemp:
# ./interface_template --import
InterfaceTemplate
/usr/local/templates/intemp
or
/interface_template -i
InterfaceTemplate
/usr/local/templates/intemp
preferenc
es or -p
--help or
-h
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_disabled
Displays help on
the use of the
utility.
To view help on the use of the utility:
# ./interface_template --help
or
# ./interface_template -p hide_disabled
or
# ./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.
To export interface template
InterfaceTemplate form Plesk
to file
/usr/local/templates/intemp:
# ./interface_template
-e InterfaceTemplate
/usr/local/templates/in
temp
Used with the -export and --import
commands.
-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
Using Command-Line Utilities
Option
Parameter
-to-stdin
Description
Example
Specifies the standard
output in the XML format
as the export destination
of an interface template.
To export interface template
InterfaceTemplate to standard
output in the XML format:
# ./interface_template
-e InterfaceTemplate from-stdin
Used only with the -export command.
true|false
hide_disabled
108
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).
To enable hiding all
unavailable buttons in the
Plesk control panel for
interface template
InterfaceTemplate:
# ./interface_template
-p -hide_disabled true
Used only with the -preferences
command.
true|false
hide_unavaila
ble_limits
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).
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
Used only with the -preferences
command.
true|false
hide_unavaila
ble_permissio
ns
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).
To enable hiding control
elements for resource limits
that are not allowed to be
managed by users:
# ./interface_template
-p hide_unavailable_permis
sions true
Used only with the -preferences
command.
true|false
domain_regist
ration
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
Using Command-Line Utilities
Option
Parameter
true|false
cert_purchasi
ng
109
Description
Example
Enables or disables
hiding buttons
forwarding to a
certificate retailer's site
(the Hide buttons for
certificate purchasing
parameter).
To enable hiding buttons
forwarding to a certificate
retailer's site:
# ./interface_template
-p -cert_purchasing
true
Used only with the -preferences
command.
-extras
true|false
Enables or disables
hiding buttons for extra
services (the Hide buttons
for extra services
parameter).
To enable hiding buttons for
extra services:
# ./interface_template
-p -extras true
Used only with the -preferences
command.
-mail_bounce
true|false
Enables or disables
hiding the bounce with
message option for the
Mail to nonexistent user
parameter (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
Using Command-Line Utilities
110
IP Addresses: ipmanage Utility
The 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
--create or
-c
<IP address> Creates an IP
address.
Example
To create IP address 192.168.67.78,
set its type to shared, network mask to
192.168.12.1/16, and physical network
Requires
interface to Local Area Connection:
concomitant use
of the -type, - # ./ipmanage --create
192.168.67.78 -type shared interface,
mask 192.168.12.1/16 and -mask
interface "Local Area
options.
Connection"
or
# ./ipmanage -c
192.168.67.78 -type shared mask 192.168.12.1/16 interface "Local Area
Connection"
Using Command-Line Utilities
Command
Parameter
--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
exclusive
<IP address> Deletes an IP
address.
To remove IP address 192.168.67.78:
# ./ipmanage --remove
192.168.67.78
or
# ./ipmanage -r
192.168.67.78
--remove or
-r
Description
111
Example
or
# ./ipmanage --update
192.168.67.78 -type
exclusive
--ip_list
or -l
Displays the list
of available IP
addresses.
--ssl_list
or -s
Displays the list To output the list of available SSL
of available SSL certificates:
certificates.
# ./ipmanage -ssl_list
To display the list of available IP
addresses:
# ./ipmanage --ip_list
or
# ./ipmanage -l
or
# ./ipmanage -s
-inter_list
or -f
Displays the list
of available
interfaces.
--help or h
Displays help on To display help on the use of the
the use of the
ipmanage utility:
utility.
# ./ipmanage --help
To display the list of available network
interfaces:
# ./ipmanage --inter_list
or
# ./ipmanage -f
or
# ./ipmanage -h
Options
Option
Parameter
Description
-type
shared|exclus Sets the type of an IP
ive
address.
Required by the -create command.
Example
To change the type of IP
address 192.168.67.78
from shared to exclusive:
# ./ipmanage -u
192.168.67.78 -type
exclusive
Using Command-Line Utilities
112
Option
Parameter
Description
ssl_certificat
e
<certificate
name>
Specifies the name of an To assign SSL certificate
SSL certificate to be
named New Certificate to
used for the IP address. 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.
Example
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"
Using Command-Line Utilities
113
Mail Accounts: mail Utility
The 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
Syntax
mail <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 inout
Commands
Command
Parameter
Description
Example
--create
or -c
<e-mail
address>
Creates a Plesk
mail name (an email account).
To create a Plesk mail name example.com:
# ./mail -create [email protected]
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 500
--update
or -u
<e-mail
address>
or
# ./mail -c [email protected]
or
# ./mail -u [email protected] mbox_quota 50M
Using Command-Line Utilities
Command
Parameter
Description
-updateservice
<domain
name>
Updates mail
To enable mail service on domain
service status on a example.com:
domain.
# ./mail --update-service
example.com -status enabled
Requires
114
Example
concomitant use of
the -status
option.
--remove
or -r
<e-mail
address>
Deletes a mail
name from Plesk.
To delete mail name [email protected]
from Plesk:
# ./mail --remove
[email protected]
or
# ./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]
or
# ./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
-cp_access true |
false
Description
Example
Enables or disables mail
name user to Plesk
control panel (the Control
panel access parameter).
To enable access to control panel
for user of mail name
[email protected]:
# ./mail -u
[email protected] cp_access true
Set to true by default.
-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
Using Command-Line Utilities
Option
Parameter
Description
-passwd
<password> Sets the user password
for a mail name.
115
Example
To change user password to
userpass for mail name
[email protected]:
For additional
comments, see the Note # ./mail -u
[email protected] -passwd
below the table.
userpass
plain|encr Specifies the type of
passwd_typ ypted
user password. Ignored
e
if no password is
specified.
To set the type of user password to
encrypted for mail name
[email protected]:
# ./mail -u
[email protected] For additional
comments, see the Note passwd_type encrypted
below the table.
<number>[K Sets the size of the mail
mbox_quota |M|G]
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).
To set the size of the mail box for a
mail name [email protected] to
50 MB:
# ./mail -u
[email protected] mbox_quota 50M
Set to the Default for the
domain value by default.
-aliases
add|del:<a Adds to or deletes e-mail
lias>[,<al aliases from a mail
ias
name.
1>,...,<al
ias N>
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:<m Adds to or removes a
ail
mail name from Plesk
group>[,<m mail groups (Groups).
ail group
1>,...,<ma
il group
N>
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).
To enable redirecting e-mail
messages for mail name
[email protected] to e-mail
address
[email protected]:
If set to true, requires
concomitant use of the - # ./mail -u
[email protected] rediraddr option.
redirect true -rediaddr
[email protected]@redirect
.com
Using Command-Line Utilities
Option
Parameter
-rediraddr <e-mail
address>
Description
Example
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 email 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>,...,<email
address N>
Adds to or removes email 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],admi
[email protected]
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
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 enGB.
To set the default interface
language for mail user with login
name [email protected] to
Russian:
# ./mail -u
[email protected] -locale
-ru-RU
-multiple- true |
sessions
false
-locale
<language
code>
116
Using Command-Line Utilities
117
Option
Parameter
Description
Example
-maxbuttonlength
<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] -maxbutton-length 20
-lockscreen
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
name [email protected] from
working with the control panel until
control panel screens are
completely loaded:
# ./mail -u
[email protected] -lockscreen 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
enabled
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] -managedrweb true
-managedrweb
To set the status of mail service on
domain example.com to the status
of the domain:
./domain --update-service
example.com -status parent
Using Command-Line Utilities
Option
Parameter
Description
Example
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] -managespamfilter true
off |
Disables (off) or
inout | in enables (in, out,
| out
inout) antivirus
screening of e-mail
messages for a mail
name. Sets the mode of
antivirus screening by
Dr.Web:
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
-managetrue |
spamfilter false
-drweb
118
in - only incoming
messages are screened
out - only outgoing
messages are screened
inout - both incoming
and outgoing messages
are screened
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.
Using Command-Line Utilities
119
Mail Autoresponders: autoresponder Utility
The 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
Syntax
autoresponder <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
<autoresp
onder
name>
Creates a mail
autoresponder.
To create mail autoresponder AutoReply for
Plesk mail name [email protected]:
# ./autoresponder --create
Autoreply -mail
[email protected]
or
# ./autoresponder -c AutoReply mail [email protected]
Using Command-Line Utilities
120
Command
Parameter
Description
Example
--update
or -u
<autoresp
onder
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
[email protected] - subject "An
autoreply message"
or
# ./autoresponder -u AutoReply mail [email protected] - subject
"An autoreply message"
--remove
or -r
<autoresp
onder
name>
Deletes a mail
autoresponder.
To delete mail autoresponder AutoReply for
Plesk mail name [email protected]:
# ./autoresponder --remove
Autoreply -mail
[email protected]
or
# ./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
Adds ot deletes
files from a mail
name's
autoresponder
attachment files
repository
(Autoresponders >
Attachment Files).
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.tx
t,/usr/local/applicationform.txt
-attachme
nts or -a
Used in conjunction or
with the -files
# ./autoresponder -a -mail
option.
[email protected] -files
add:/usr/local/sampleschedule.tx
t,/usr/local/applicationform.txt
--info or
-i
<autoresp
onder
name>
Displays
To display information about autoresponder
information about a AutoReply for Plesk mail name
mail autoresponder. [email protected]:
Used in conjunction # ./autoresponder --info
AutoReply -mail
with the -mail
[email protected]
option.
or
# ./autoresponder -i AutoReply mail [email protected]
Using Command-Line Utilities
Command
Parameter
--help or
-h
Description
Example
Displays help on
the use of the
utility.
To display help on the use of the
autoresponder utility:
# ./autoresponder --help
121
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]
redirec
t
<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 email 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]
et
-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
Using Command-Line Utilities
Option
Parameter
Description
require
s
always
Specifies the condition under which
an autoresponder will act (the Specify
the condition for this automatic reply
parameter):
or
subj|bod
y:<strin
g>
122
Example
To set up automatic replying
to messages delivered to
Plesk mail name
[email protected] using
autoresponder AutoReply
always - the always respond option;
only when an incoming
when enabled, the autoresponder
message subject line
will always be used to reply to
contains the "information
incoming messages.
request" pattern:
subj:<string> - the when specified # ./autoresponder -u
words are found in message subject
AutoReply -mail [email protected] option; when enabled, the
requires
autoresponder will be used to reply
subj:"information
to an incoming message only if the
request"
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.
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]
et
Using Command-Line Utilities
123
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 To use the UTF-8 charset to
autoresponder's automatic reply
encode automatic reply
messages (the Encoding parameter). 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
Using Command-Line Utilities
124
Option
Parameter
Description
Example
-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.
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/sample
schedule.txt,/usr/loc
al/applicationform.tx
t
-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.
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/sample
schedule.txt,/usr/loc
al/applicationform.tx
t
Used only with the --create and -update commands.
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.
Using Command-Line Utilities
125
Mail Server Settings: mailserver Utility
The 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
Syntax
mailserver <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 10
Commands
Command
Parameter
Description
--setrelay
closed |
auth
Sets the relaying mode for
the mail server (the Relaying
parameter).
Example
To set the Plesk mail server
relaying mode requiring
authorization (authorization is
required), specify the POP3
 closed - the closed
authorization, and set the lock time
option
of 20 min:
 auth - the authorization is # ./mailserver --setrequired option
relay auth -auth-type
pop3 -lock-time 20
Set to closed by default.
--set-max- <number>[ Sets the maximum message
letterK|M|G]
size that can be accepted by
size
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-maxletter-size 500K
Using Command-Line Utilities
126
Command
Parameter
Description
Example
--setmapsstatus
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 --setmaps-status true
--addmaps-zone
<domain
name
1>[,<doma
in 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 --addmaps-zone
maps1.example.com,maps2.e
xample.com
--removemaps-zone
<domain
name
1>[,<doma
in 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 --removemaps-zone
maps1.example.com,maps2.e
xample.com
--setaccounttype
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).


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 --setfull - only login names account-type both
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.
Using Command-Line Utilities
Command
Parameter
--usetrue |
vocabulary false
127
Description
Example
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 --usevocabulary true
--add-to- <domain
Adds one or more domain
black-list name
names to the mail server's
1>[,<doma Black list.
in name
2>, ...
<domain
name N>]
To add domains
commerce.example.org and
commerce.example.net to the mail
server's black list:
# ./mailserver --add-toblack-list
commerce.example.org,comm
erce.example.net
--remove- <domain
Removes one or more
fromname
domain names from the mail
black-list 1>[,<doma server's Black list.
in name
2>, ...
<domain
name N>]
To remove domains
commerce.example.org and
commerce.example.net from the
black list:
# ./mailserver --removefrom-black-list
commerce.example.org,comm
erce.example.net
--add-to- <IP
Adds one or more subnet
white-list address/s masks to the mail server's
ubnet
White list.
mask
1>[,<IP
address/s
ubnet
mask 2>,
... <IP
address/s
ubnet
mask N>]
To add subnets 192.168.64.0/24
and 192.168.0.0/16 to the mail
server's white list:
# ./mailserver --add-towhite-list
192.168.64.0/24,192.168.0
.0/16
--remove- <IP
Removes one or more
fromaddress/s subnet masks from the mail
white-list ubnet
server's White list.
mask
1>[,<IP
address/s
ubnet
mask 2>,
... <IP
address/s
ubnet
mask N>]
To add subnets 192.168.64.0/24
and 192.168.0.0/16 to the mail
server's white list:
# ./mailserver --add-towhite-list
192.168.64.0/24,192.168.0
.0/16
--updatespf
To enable the SPF spam
protection on the mail server:
# ./mailserver --updatespf -spf-status true
Updates the SPF (Sender
Policy Framework) settings.
Using Command-Line Utilities
Command
Parameter
--info or i
options | Displays mail server
blacksettings:
list |
 options - displays
whitevarious mail server
list |
settings except for the
spf
mail server black and
white lists contents and
the the SPF (Sender
Policy Framework)
settings.
--help or h
Description

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.
Displays help on the use of
the utility.
128
Example
To display the SPF (Sender Policy
Framework) settings:
# ./mailserver --info spf
or
# ./mailserver -i spf
To display help on the use of the
mailserver utility:
# ./mailserver --help
or
# ./mailserver -h
Options
Option
Parameter
Description
Example
-authtype
pop3|smt
p|both
Specifies mail user authorization To set the relaying mode that
requires authorization, specify the
type during mail relaying.
POP3 authorization type, and set
the lock time to 10 min:
# ./mailserver --setrelay auth -auth-type
pop3 -lock-time 10
-locktime
<number>
Sets the lock time for POP3
authorization (in minutes).
Required for pop3 and both
authorization types.
-spfstatus
true|fal
se
Enables or disables the SPF
(Sender Policy Framework)
spam protection on the mail
server.
Used only with the --updatespf command.
To enable the SPF (Sender Policy
Framework) spam protection on
the mail server:
# ./mailserver --updatespf -spf-status true
Using Command-Line Utilities
129
Option
Parameter
Description
Example
-spfbehavior
<number>
Sets the SPF behavior (the SPF
checking mode parameter).
To set SPF behavior to Reject
mails when SPF resolves to "fail"
(deny):
# ./mailserver --updatespf -spf-behavior 3
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 --updatespf command.
-spfrules
<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 --updatespf command.
-spfguess
<string>
Sets SPF rules that will be
applied if SPF checks return
"fail", "softfail", or "neutral" (the
SPF guess parameter).
Used only with the --updatespf command.
-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 --updatespf command.
To set the following SPF rule
include:spf.trusted-forwarder.org:
# ./mailserver --updatespf -spf-rules
"include:spf.trustedforwarder.org"
To set the following SPF rule
include:spf.trusted-forwarder.org:
# ./mailserver --updatespf -spf-guess
"include:spf.trustedforwarder.org"
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 --updateexp -spf-guess
"include:spf.trustedforwarder.org"
Using Command-Line Utilities
130
Mailing Lists: maillist Utility
The 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
Syntax
maillist <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]
Commands
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 plain
or
# ./maillist -c MailList -domain
example.com -email
[email protected] -passwd user
pass -passwd_type plain
Using Command-Line Utilities
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]
or
# ./maillist -u MailList -members
add:[email protected]
-updateservice
<domain
name>
Updates mail
service status
on a domain.
To enable mailing list service on domain
example.com:
# ./maillist --update-service
example.com -status enabled
Requires
concomitant
use of the status option.
--remove
or -r
<mailing
list
name>
Deletes a
To remove mailing list MailList from domain
mailing list from example.com:
domain.
# ./maillist --remove MailList domain example.com
or
# ./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.com
or
# ./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 –-help
or
# ./maillist –h
131
Using Command-Line Utilities
Options
Option
Parameter
Description
Example
-domain
<domain
name>
Specifies the name of a
domain to which a mailing
list belongs.
To remove mailing list MailList
from domain example.com:
# ./maillist --remove
MailList -domain
example.com
Used with all commands,
except the --help
command.
-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_t
ype
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>
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
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.
-status
true|false Enables or disables a
To disable mailing list MailList
mailing list. Is set to true by on domain example.com:
default.
# ./maillist -u
MailList -domain
example.com -status
false
132
Using Command-Line Utilities
Option
Parameter
Description
-members
add|del:<e Adds to or deletes e-mail
-mail
addresses from a mailing
address>[, list.
<e-mail
address
1>,...,<email
address N>
133
Example
To add e-mail addresses
jane@example and
[email protected] to mailing
list MailList :
# ./maillist -u
MailList -members domain example.com
add:[email protected],m
[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.
Using Command-Line Utilities
134
OS Update Sources: ai_prefs Utility
The ai_prefs utility is used to manage operating system update sources. By using
this utility, you can perform the following tasks:

Adding/Removing OS update source entries to/from Plesk Updater


Changing OS update source entries
Retrieving a list of OS update sources registered in Plesk, in human-readable and
XML formats
Syntax
ai_prefs <command> [
<option_1> [<param>]
[<option_2> [<param>]]
…[<option_N> [<param>]]
]
Example
The following command adds to Plesk Updater the Fedora Core 7 repository, and sets
the lowest priority to it.
# ./ai_prefs --add-vendor-source -url
http://download.fedora.redhat.com/fedora/linux/core/updates/7/i386 type repomd -priority 1
Commands
Command
Parameter
Description
Example
--addvendorsource or -a
Adds a source of operating
system updates.
To register RPM metadata
repository for Fedora Core 6:
# ./ai_prefs -a -url
http://download.fedora.
redhat.com/fedora/linux
/core/updates/6/i386 type repomd
--remove<source
vendorID>
source or -r
Removes a source of
operating system updates.
To unregister the OS update
source with ID 6:
# ./ai_prefs -r 6
--update<source
vendorID>
source or -u
Updates a source of
operating system updates
preferences.
--vendorsourceslist or -l
Lists OS updates sources
configured in Plesk in the
human-readable format.
To set the highest priority to the
OS update source with ID 4:
# ./ai_prefs -u 4 priority 999
# ./ai_prefs -l
Requires using the -url
and -type options.
Using Command-Line Utilities
Command
Parameter
Description
135
Example
# ./ai_prefs -lx
--vendorsourceslist-xml or
-lx
Lists OS updates sources
configured in Plesk in the
xml format.
--help or -h
Displays help on the use of
the utility.
# ./ai_prefs -h
Note: The --vendor-sources-list and --vendor-sources-list-xml
commands retrieve the following information on each of the OS update source entries:
ID, type, URL, priority, status (enabled/disabled), authentication status, login,
password.
Options
Option
Parameter
Description
-url
<uri>
Specifies the location of
OS update source, which
may start with http://,
https://, ftp://,
file:///.
-type
repomd | Specifies whether the
directory source is an XML RPM
metadata repository, or a
plain repository directory
mounted in the local
system.
To register RPM metadata
repository for Fedora Core 6:
# ./ai_prefs -a -url
http://download.fedora.red
hat.com/fedora/linux/core/
updates/6/i386 -type
Required with the --add- repomd
vendor-source
command.
To register directory /updates/
located on the CD RedHat-Linux9.0
mounted in local system as an OS
updates resource:
# ./ai_prefs -a -url
file:///mnt/cdrom/RedHatRequired with the --add- Linux9.0/updates -type
directory
vendor-source
command.
-priority [1-999]
-auth
true |
false
Sets priority of the source: To set the highest priority to the OS
1 means the lowest
update source with ID 4:
priority, 999 the highest.
# ./ai_prefs -u 4 priority 999
Default value is 500
(Normal priority).
Specifies if the source
requires authorization.
Default value is false.
-login
Example
<string>
Sets login name for
authorization on the
source.
Required if the -auth
option is set to true.
To retrieve updates from the source
with ID 3 as authenticated user
"autoupdate" (with password
ghYnn39s7f):
# ./ai_prefs -u 3 -auth
true -login autoupdate password ghYnn39s7f
Using Command-Line Utilities
Option
Parameter
-password <string>
Description
136
Example
Sets password for
authorization on the
source.
Required if the -auth
option is set to true.
Plesk Services: service Utility
The 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
Syntax
service <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 dns
or
# ./service -s dns
--stop
or -p
<service
key>
Stops a service.
To stop the service named dns:
# ./service --stop dns
or
# ./service -p dns
Using Command-Line Utilities
Command
Parameter
Description
Example
-restart
or -r
<service
key>
Restarts a service.
To restart the service named dns:
# ./service --restart dns
--status
or -t
<service
key>
137
or
# ./service -r dns
Displays the current
status of a service.
To display the current status of the
service named dns:
# ./service --status dns
or
# ./service -t dns
--list
or -l
Displays information
To display the list of available services:
about available services. # ./service --list
or
Can be used with the detail and -format
# ./service -l
options to display
detailed information
about services.
--help
or -h
Displays help on the use To view help on the use of the utility:
of the utility.
# ./service --help
or
# ./service -h
Options
Option
Parameter
Description
Example
<service key
include 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
<service key
exclude 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
Using Command-Line Utilities
Option
Parameter
-format "%<output
parameter
1>[%<output
parameter 2>
...%<output
parameter
N>"
138
Description
Example
Specifies the
information to be
included in the
detailed output and the
display parameters of
the --list
command.
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"
use \n, \t, or a 
comma to

format the

output display
as needed.

%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.
Using Command-Line Utilities
139
Server Configuration: init_conf Utility
The 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
Using Command-Line Utilities
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 nonconfigured Plesk server
only.
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> Requires concomitant
passwd <string> -phone
use of the following
<number> -fax <number> options used to specify
email <string> -addr
administrator's personal
<string> -city <string> information: -name, state <string> -pcode
passwd, -phone, <string>
fax, -email, For more details on the options,
addr, -city, consult the following table.
state, -pcode.
--update
or -u
Updates the Plesk
To set or change the Plesk
administrator’s personal administrator's e-mail to
information.
[email protected]:
# ./init_conf --update email [email protected]
or
# ./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 --help
or
# ./init_conf -h
140
Using Command-Line Utilities
141
Options
Option
Parameter
Description
compa
ny
<string>
Adds the Plesk
administrator's Company
name.
-name
<string>
passw
d
<password>
phone
<number>
To set the Plesk administrator's
company name to Company, Inc,
contact name as Michael Smith,
password to adminpass, phone
Required with the -number to 555-5555, fax number to
init command.
333-3333, e-mail address to
[email protected], street address
to 45 Trail street, administrator's city to
Specifies the Plesk
Anytown, state to New York, ZIP code
administrator’s Contact
to 77568, and country to Australia:
name.
# ./init_conf --init Required with the -company "Company, Inc" -name
init command.
"Michael Smith" -passwd
adminpass -phone 555-5555 Specifies the Plesk
administrator’s password fax 333-3333 -email
[email protected] -addr "45
for access to Plesk
Trail street" -city
control panel.
"Anytown" -state "New York"
Required with the --pcode 77568 -country AU
init command.
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>
Example
Sets the administrator’s
State/Province.
Required with the -init command.
Using Command-Line Utilities
pcode
<string>
142
Sets the administrator’s
Postal/ZIP code.
Required with the -init command.
count
ry
<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.
<domain
hostna name>
me
Sets the Plesk server's
host name.
Used only with the -init command.
add:<ip_1>,< Sets the IP addresses
shared ip_2>,
specified by the <ip_n>
_ips
...,<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.
true|false
send_a
nnounc
e
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.
def_cl
ient
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 <..>
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.1
23.47 -name <..> -passwd
<..> -phone <..> -fax <..> email <..> -addr <..> -city
<..> -state <..> -pcode <..>
To subscribe the Plesk administrator to
SWsoft notifications about new
products and promotions lists of
SWsoft:
# ./init_conf -u send_announce true
Creates the default client To create the default client account for
account My Domains for the Plesk administrator:
the Plesk administrator. # ./init_conf --init def_client -name <..> Used only with the -passwd <..> -phone <..> -fax
init command.
<..> -email <..> -addr <..>
-city <..> -state <..> pcode <..>
Using Command-Line Utilities
<IP address> Sets the Default IP
defaul
Address during initial
t-ip
Plesk configuration. This
option is to be used only
with the --init
command. If this
address has not yet
been added to the
server IP address pool,
the option requires the
concomitant use of the netmask, -iface, and
-ip-type options.
<IP
netmas address|nn>
k
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.
-iptype
shared|exclu Sets the type of the
sive
default IP address
during initial Plesk
configuration.
Used only with the -init command.
143
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 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 <..>
Using Command-Line Utilities
144
Site Applications: sitapp Utility
The 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.
Syntax
siteapp <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-tovault 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 7
or
# ./siteapp -a -sapp WebApp version 5.02 -release 7
Using Command-Line Utilities
Command
Parameter
Description
Example
--infopackages
-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-packagesxml
or
# ./siteapp -x
--help or
-h
Displays help on the
use of the utility.
To display help on the use of the
siteapp utility:
./mail --help
145
or
./mail --h
Options
Option
Parameter
Description
Example
-sapp
<site
applicatio
n 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.
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
release
<number>
Specifies the release
number of a site
application package to
be added to a client
account Application
pool.
Using Command-Line Utilities
146
Site Directories Protection: protdir Utility
The 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
Syntax
protdir <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
--create
or -c
<directo Creates a
ry name> 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.
Example
To create password-protected directory
Protected_Dir in the /httpdocs directory on
domain example.com:
# ./protdir --create Protected_Dir
-domain example.com -type nonssl
or
# ./protdir -c Protected_Dir domain example.com -type nonssl
Using Command-Line Utilities
Command
Parameter
Description
--update
or -u
<directo Updates settings
ry name> of a passwordprotected
directory.
Example
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
<directo Deletes a
ry name> passwordprotected
directory.
--help
or -h
Displays help on
the use of the
utility.
To delete password-protected directory
/httpdocs/Protected_Dir from domain
example.com:
# ./protdir --remove Protected_Dir
-domain example.com -type nonssl
or
# ./protdir -r Protected_Dir domain example.com -type nonssl
To see help on the use of the protdir utility:
# ./protdir -–help
or
# ./protdir -h
Options
Option
Parameter
Description
Example
-domain
<domain
name>
Specifies the name of a
domain to which a
password-protected
directory belongs.
To create the Protected_Sample
protected URL on example.com:
# ./protdir -c
Protected_Dir -domain
example.com
Used with all
commands, except the -help command.
-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
Using Command-Line Utilities
Option
Parameter
Description
-type
nonssl | Specifies the location of To create password-protected
ssl | cgi a password directory in directory Protected_Dir in the
the domain root catalog: /httpdocs/Protected
directory on domain
 nonssl - the
example.com:
/httpdocs
# ./protdir -c
directory
Protected/Protected_Dir  ssl - the
domain example.com -type
/httpsdocs
nonssl
directory

-passwd
cgi- the /cgi-bin
directory
<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_typ
e
Example
plain |
Specifies the type of the
encrypted password for accessing
contents of a passwordprotected directory by
users.
See additional
comments in the Note
below the table.
-add_user
<login
name>
Creates a passwordprotected directory user
with the specified login
name.
update_use
r
<login
name>
Updates settings of a
password-protected
directory user with the
specified login name.
-user_name
<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
To change the user login name
from authorizeduser to admin
for the password-protected
directory
/httpdocs/Protected_Dir on
Sets a passwordprotected directory login domain example.com:
# ./protdir -u
name.
Protected_Dir -type
Used in conjunction with nonssl -domain
the -update_user
example.com -update_user
option.
authorizeduser -user_name
admin
148
Using Command-Line Utilities
Option
Parameter
Description
Example
remove_use
r
<login
name>
Deletes a passwordprotected directory user
with the specified login
name.
To delete the user with login name
authorizeduser for a passwordprotected directory
/httpdocs/Protected_Dir on
domain example.com:
# ./protdir -u
Protected_Dir -type
nonssl -domain
example.com -remove_user
authorizeduser
-dir_name
<director Sets a new name for a
y name>
password-protected
directory.
149
To set a new name
/httpdocs/Protected_Archi
ve for a password-protected
directory
Used in conjunction with
/httpdocs/Protected_Dir on
the -update_user
domain example.com:
option.
# ./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.
Using Command-Line Utilities
150
Site Skeletons: skeleton Utility
The 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
Syntax
skeleton <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.
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 zip
Requires
concomitant
use of the -filename
option.
--reset
or -r
--help
or -h
<client
login
name>
or
# ./skeleton -i clientlogin -filename
siteskeleton -force-type zip
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 clientlogin
Displays help
on the use of
the utility.
To view help on the use of the utility:
# ./skeleton --help
or
# ./skeleton -r clientlogin
or
# ./skeleton -h
Using Command-Line Utilities
151
Options
Option
Parameter
-filename
<file path>
-forcetype
Description
Specifies a site
skeleton file.
Example
To install a site skeleton from the
skeleton file
/usr/local/skeletons/site
Used only with the -skeleton (in the ZIP format) for
install command.
the client with client login name
clientlogin:
zip|tgz|tar.g Forces specification of
# ./skeleton -i
z|tar
a site skeleton file
clientlogin -filename
format.
/usr/local/skeletons/site
Used only with the -- skeleton -force-type zip
install command.
Using Command-Line Utilities
152
Spam Filtering: spamassassin Utility
The 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
Syntax
spamassassin <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 -personalconf true -reject-spam true -hits 3
Commands
Command
Parameter
Description
Example
--update
or -u
<mail
name>
Updates the
Spamassassi
n 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 -rejectspam true
or
# ./spamassassin -u [email protected]
-hits 3 -reject-spam true
Using Command-Line Utilities
Command
Parameter
--updateserver
--info or
-i
<mail
name>
153
Description
Example
Updates the
Spamassassi
n 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
Displays the
Spamassassi
n spam filter
settings for a
Plesk mail
name.
To display the Spamassassin spam filter settings
for [email protected]:
# ./spamassassin --info
[email protected]
or
# ./spamassassin -i [email protected]
--infoserver
Displays the To display the Spamassassin spam filter settings
Spamassassi for the Plesk server:
n spam filter # ./spamassassin --info
settings for
the Plesk
server.
--help or
-h
Displays help To see the help info on the use of the
on the use of spamassassin utility:
this utility.
# ./spamassassin -–help
Options
Option
Parameter
Description
Example
-status
true |
false
Enables 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
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 namespecific Spamassassin filter settings
for mail name [email protected]:
# ./spamassassin -u
[email protected] personal-conf true
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
-personal- true |
conf
false
-hits
<float
number>
-max-proc
<1|2|3|4| The maximum number of
5>
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 --updateserver -max-proc 4
Using Command-Line Utilities
154
Option
Parameter
Description
Example
-modifysubj
true |
false
Enables or disables
automatic modification of
subject lines of messages
marked as spam.
-modifysubj-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] -modifysubj true -modify-subj-text
"***SPAM*** Score: _SCORE_
:"
-rejectspam
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] -rejectspam true
-blacklist add| del|
enable|
disable:<
pattern
1>[,<patt
ern
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.
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],???us
er@*.example.net
-whitelist add| del|
enable|
disable:<
pattern
1>[,<patt
ern
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.
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],???us
er@*.example.net
* Non-ASCII characters are not allowed on the left of the @ sign in the e-mail pattern. Email patterns can include the "*" and "?" wildcard characters (for example,
*@domain.com, user?@*.com). Non-ASCII parts of domain names must not contain
wildcard characters.
Using Command-Line Utilities
155
SSL Certificates: certificate Utility
The 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
Syntax
certificate <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
<certifi
cate
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.
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.cert
For information
on the options
required by the
command, refer
to the Note
below the table.
or
# ./certificate -c "Site
Certificate" -domain example.com key-file /usr/local/keyfile.key cert-file.cert
Using Command-Line Utilities
156
Command
Parameter
Description
Example
--update
or -u
<certifi
cate
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
-assigncert or ac
--list or
-l
--help or
-h
<certifi
cate
name>
<certifi
cate
name>
<login
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.com
Assigns an SSL
certificate in
administrator's
repository for
use with a
specific IP
address.
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.78
Requires
concomitant use
of the -ip
option.
or
# ./certificate -ac "Site
Certificate" -domain example.com ip 192.168.67.78
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.com
or
# ./certificate -r "Site
Certificate" -domain example.com
or
# ./certificate -l -domain
example.com
Displays help on To view help on the use of the certificate utility:
the use of the
# ./certificate –help
utility.
or
# ./certificate -h
Using Command-Line Utilities
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 To delete the SSL certificate named
certificate repository in Plesk
Site Certificate from domain's
as the location of a certificate. 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
defaul
t
Sets an SSL certificate as the
default certificate. Is used to
set administrator's default
certificate only.
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
Used only concomitantly with
the -admin option.
-newname
<certifi
cate
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 -newname "Old Site
Certificate"
157
Using Command-Line Utilities
Option
Parameter
Description
-keyfile
<path>
Specifies the path to a private
key file on the Plesk server to
be used for certificate creation
(the Private key component).
-certfile
<path>
cacert
-file
<path>
Example
To create the SSL certificate named
Site Certificate in domain's
certificate repository for domain
example.com by using private key
file
Used with the --create
/usr/local/keys/keyfile.ke
command only.
y, corresponding certificate file
/usr/local/cert/certfile.c
Required by the --create
ert, CA certificate file
command.
/usr/local/cert/cacert.cer
t, and to associate the
Specifies the path to an SSL
corresponding certificate signing
certificate file on the Plesk
request file
server to be used for certificate /usr/local/requests/csreq.
creation (the Certificate
csr:
component).
# ./certificate -c "Site
Certificate" -domain
Used with the --create
example.com -key-file
command only.
/usr/local/keyfile.key Required by the --create
cert-file.cert -cacertcommand.
file
/usr/local/cert/cacert.cer
t -csr-file
usr/local/requests/csreq
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.
-csrfile
<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).
-ip
<IP
address>
Specifies an IP address to
which an SSL certificate is to
be assigned.
Used with the --assigncert command only.
Required by the --assigncert command.
To assign the SSL certificate
named Site Certificate on domain
example.com for use with IP
address 192.168.67.78:
# ./certificate --assigncert "Site Certificate" domain example.com -ip
192.168.67.78
or
# ./certificate -ac "Site Certificate" domain example.com -ip
192.168.67.78
158
Using Command-Line Utilities
159
Subdomains: subdomain Utility
The 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

Syntax
subdomain <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
--create
or -c
<subdomain Creates a
name>
subdomain on the
domain specified by
the -domain
option.
Example
To create subdomain subdom on domain
example.com:
# ./subdomain --create subdom domain example.com
or
# ./subdomain -c subdom -domain
example.com
Using Command-Line Utilities
Command
Parameter
Description
--update
or -u
<subdomain Updates an existing
name>
subdomain on a
domain specified by
the -domain
option.
--remove
or -r
Removes one or
more subdomains
specified by the subdomains
option from a
domain specified by
the -domain
option.
Example
To change the name of subdomain
subdom.example.com to
subdomnew.example.com:
# ./subdomain --update subdom domain example.com -new_name
subdomnew
or
# ./subdomain -u subdom -domain
example.com -new_name subdomnew
To remove subdomains
subdom1.example.com and
subdom2.example.com from domain
example.com:
# ./subdomain --remove subdomains subdom1,subdom2 domain example.com
or
# ./subdomain -r -subdomains
subdom1,subdom2 -domain
example.com
--info
or -i
Displays
information about
configurations of
subdomains that
exist on a specified
domain.
--help
or -h
Displays help on
To see the help info on the use of this
the use of the utility. utility:
# ./subdomain -–help
To display information about all
subdomains on domain example.com:
# ./subdomain --info -domain
example.com
or
# ./subdomain -i -domain
By default, displays example.com
info on all
subdomains on a
domain. Use the subdomains
option, to display
information only
about subdomains
specified by the
option.
or
# ./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
160
Using Command-Line Utilities
Option
Parameter
Description
-new_name
<subdomain Changes the name of a
name>
subdomain.
Used only with the -update command.
-ftp_user
native|mai Specifies the FTP account to
n
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).
161
Example
To change the name of
subdomain
subdom.example.com to
subdomnew.example.com:
# ./subdomain -u
subdom -domain
example.com -new_name
subdomnew
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
Set to main by default.
When used with the native
argument, requires
concomitant use of the login option.
-login
<login
name>
-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.
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.
See additional comments in
the Note below the table.
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
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
Using Command-Line Utilities
Option
Parameter
Description
passwd_typ
e
plain|cryp Specifies the type of the FTP
t
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.
hard_quota
<number>[K Sets the Hard disk quota limit
|M|G]
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.
Example
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
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
To enable SSI support on
support on a subdomain (the subdomain
SSI support parameter).
subdom.example.com:
# ./subdomain -u
Set to false by default.
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.
162
To enable PHP support on
subdomain
subdom.example.com:
# ./subdomain -u
subdom -domain
example.com -php true
-cgi
true|false Enables or disables CGI
To enable CGI support on
support on a subdomain (the subdomain
CGI support parameter).
subdom.example.com:
# ./subdomain -u
Set to false by default.
subdom -domain
example.com -cgi true
-fastcgi
true|false Enables or disables FastCGI To enable FastCGI support on
support on a subdomain (the subdomain
mod_fcgid support parameter). subdom.example.com:
# ./subdomain -u
Set to false by default.
subdom -domain
example.com -fastcgi
true
Using Command-Line Utilities
Option
Parameter
-perl
true|false Enables or disables Perl
To enable Perl support on
support on a subdomain (the subdomain
mod_perl support parameter). subdom.example.com:
# ./subdomain -u
Set to false by default.
subdom -domain
example.com -perl true
true|false Enables or disables ASP
To enable ASP support on
support on a subdomain (the subdomain
ASP support parameter).
subdom.example.com:
# ./subdomain -u
Set to false by default.
subdom -domain
example.com -asp true
-asp
-python
Description
true|false Enables or disables Python
support on a subdomain (the
mod_python support
parameter).
Set to false by default.
coldfusion
true|false Enables or disables
ColdFusion support on a
subdomain (the ColdFusion
support support parameter).
Set to false by default.
-miva
true|false Enables or disables Miva
support on a subdomain.
Set to false by default.
subdomains
or -s
<subdomain
name>[,<su
bdomain
name>,...]
>
-ssl
true|false Enables or disables SSL
support on a subdomain
domain.
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.
Set to false by default.
Example
To enable Python support on
subdomain
subdom.example.com:
./# ./subdomain -u
subdom -domain
example.com -python
true
To enable ColdFusion support
on subdomain
subdom.example.com:
# ./subdomain -u
subdom -domain
example.com coldfusion true
To enable Miva support on
subdomain
subdom.example.com:
# ./subdomain -u
subdom -domain
example.com -miva true
To remove subdomains
subdom1.example.com and
subdom2.example.com from
domain example.com:
# ./subdomain --remove
-subdomains
subdom1,subdom2 domain example.com
To enable SSL support on
subdomain
subdom.example.com:
# ./subdomain -u
subdom -domain
example.com -ssl true
163
Using Command-Line Utilities
Option
Parameter
Description
-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.
164
Example
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.
Using Command-Line Utilities
165
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
Syntax
tomcat <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
--install <file
name>
or -i
Description
Example
Installs a Javabased Web
application on a
domain.
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.com
Requires
concomitant use
of the -domain
option.
--remove
or -r
<webapp
name>
or
# ./tomcat -i
/usr/local/siteapps/webapp1.war domain example.com
Deletes a JavaTo delete Web application WebApp1 from
based web
domain example.com:
application from a # ./tomcat --remove webapp1 domain.
domain example.com
Requires
concomitant use
of the -domain
option.
or
# ./tomcat -r webapp1 -domain
example.com
Using Command-Line Utilities
166
Command
Parameter
Description
-updateservice
<domain
name>
Updates a
To enable Tomcat service on domain
domain's Tomcat example.com:
service status.
# ./tomcat --update-service
example.com -status enabled
--update
<webapp
name>
Updates a Javabased web
application
status.
To start Web application WebApp1 on domain
example.com:
# ./tomcat --update webapp1 domain example.com -status enabled
Requires
concomitant use
of the -domain
option.
or
# ./tomcat -r webapp1 -domain
example.com -status enabled
Displays help on
the use of the
utility.
To view help on the use of the utility:
# ./tomcat --help
--help or
-h
Example
or
# ./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/webapp
1.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 --updateservice example.com status parent
Using Command-Line Utilities
167
Web Statistics: webstat Utility
The 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
Syntax
webstat <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
--add or - <domain
name>
a
Description
Example
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/
Using Command-Line Utilities
168
Command
Parameter
Description
Example
--list or
-l
<domain
name>
Displays the list of
records in
Webalizer
preferences on a
domain.
--del<domain
all or -da name>
Deletes all records
from 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/
# ./webstat --del-all example.com
or
# ./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 -–help
or
# ./webstat -h
Options
Option
Parameter
Description
Example
-type
group|
hidden|
hidden_dire
ct
Specifies the type of a record
in Webalizer preferences. Is
to be used in conjunction with
the -url option.
To add hidden referrer record
*example.net/ to Webalizer
preferences on domain
example.com:
# ./webstat --add
example.com -type hidden
-url *example.net/
-url
<string>
-group <string>

group - grouped referrer

hidden - hidden referrer

hidden_direct - hidden
direct request
Specifies an URL or an URL
pattern for a Webalizer
record.
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/
Using Command-Line Utilities
169
Web Users: webuser Utility
The 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.
Syntax
webuser <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 userpass
or
# ./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
Using Command-Line Utilities
170
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.com
or
# ./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.com
or
# ./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 –help
or
# ./webuser -h
Options
Option
Parameter
Description
-domain
<domain
name>
Specifies name of the domain To create a web user with login
to which the web user
name Michael and password
userpass on domain
account belongs.
example.com:
Required for all commands,
# ./webuser -c Michael except --help.
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.
passwd_
type
plain|
encrypted
Example
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
Specifies the type of web user To set the type of web user
password - plain or cryptic. Is password to cryptic for the web
user with login name Michael on
set to plain by default.
domain example.com:
See additional comments in
./domain -u example.com the Note below the table.
passwd_type encrypted
Using Command-Line Utilities
Option
Parameter
Description
-quota
<number>[K Sets the Hard disk quota
|M|G]
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.
-ssi
true|false Enables or disables SSI
support on a web user
account.
Set to false by default.
-php
true|false Enables or disables PHP
support on a web user
account.
Set to false by default.
-cgi
true|false Enables or disables CGI
support on a web user
account.
Set to false by default.
171
Example
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
50M
or
# ./webuser -u Michael domain example.com -quota
50000K
To enable SSI support for the
web user with login name Michael
on domain example.com:
# ./webuser -u Michael domain example.com -ssi
true
To enable PHP support for the
web user with login name Michael
on domain example.com:
# ./webuser -u Michael domain example.com -php
true
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. 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.
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
Set to false by default.
-python
true|false Enables or disables Python
support on a web user
account.
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
Using Command-Line Utilities
Option
Parameter
Description
-miva
true|false Enables or disables Miva
support on a web user
account.
172
Example
Set to false by default.
fastcgi
true|false Enables or disables FastCGI
support on a web user
account.
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.