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, email, and other services.

Usage

domain_pref <command> <domain_name> [
<option_1> [<param>]
[<option_2> [<param>]]
… [<option_N> [<param>]]

Example

The following command sets the following limits and preferences for the domain example.com: the available disk space to 1GB, the maximum traffic limit to 500 MB, the available number of web users to 50, the available number of subdomains to 10, and enables the Webmail service.

# ./domain_pref --update example.com -disk_space 1G -max_traffic 500M -max_wu 50 -max_subdom 10 -webmail true

Commands

Command

Parameter

Description

Example

--update or -u

<domain_name>

Updates preferences of an existing domain.

To restrict the amount of disk space available for the domain example.com to 1 GB:

# ./domain_pref --update example.com -disk_space 1G

or

# ./domain_pref -u example.com -disk_space 1G

--info or -i

<domain_name>

Displays information about domain preferences.

To view information about preferences set on the domain example.com:

# ./domain_pref --info example.com

or

# ./domain_pref -i example.com

--set-default or -d

<domain_name>

Sets a domain as the default domain for the IP address that is assigned to the domain.

To set the 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

--help or -h

 

Displays help on the use of the utility.

To view help on the use of the domain utility:

# ./domain_pref --help

or

# ./domain_pref -h

Options

Option

Parameter

Description

Example

-disk_space

<number>[K|M|G]

Limits the amount of available disk space.

A number without a letter is interpreted as the number of bytes.

Unlimited if set to -1.

To restrict the amount of disk space available for domain example.com to 10 GB:

# ./domain_pref -u example.com -disk_space 10G

-max_traffic

<number>[K|M|G]

Limits the monthly traffic usage.

A number without a letter is interpreted as the number of bytes.

Unlimited if set to -1.

To restrict the maximum amount of traffic available for the domain example.com to 1 GB/month:

# ./domain_pref -u example.com -max_traffic 1G

-max_box

<number>

Limits the number of available mailboxes.

Unlimited if set to -1.

To restrict the maximum number of mailboxes available for the domain example.com to 50:

# ./domain_pref -u example.com -max_box 50

-mbox_quota

<number>[K|M|G]

Limits the amount of disk space that a single mailbox can occupy.

A number without a letter is interpreted as the number of bytes.

Unlimited if set to -1.

To set the mailbox quota for the domain example.com to 100 MB:

# ./domain_pref -u example.com -mbox_quota 100M

-max_redir

<number>

Limits the number of available mail redirects.

Unlimited if set to -1.

To restrict the maximum number of mail redirects available for the domain example.com to 5:

# ./domain_pref -u example.com -max_redir 5

-max_mg

<number>

Limits the number of available mail groups.

Unlimited if set to -1.

To restrict the maximum number of mail groups available for the domain example.com to 7:

# ./domain_pref -u example.com -max_mg 7

-max_resp

<number>

Limits the number of available mail autoresponders.

Unlimited if set to -1.

To restrict the maximum number of mail autoresponders available for the domain example.com to 10:

# ./domain_pref -u example.com -max_resp 10

-max_wu

<number>

Limits the number of available web users.

Unlimited if set to -1.

To restrict the maximum number of web users available for the domain example.com to 50:

# ./domain_pref -u example.com -max_wu 50

-max_db

<number>

Limits the number of available databases.

Unlimited if set to -1.

To set the number of databases available for the domain example.com to unlimited:

# ./domain_pref -u example.com -max_db -1

-max_maillists

<number>

Limits the number of available mailing lists.

Unlimited if set to -1.

To restrict the maximum number of mailing lists available for the domain example.com to 3:

# ./domain_pref -u example.com -max_maillists 3

-max_webapps

<number>

Limits the number of available Java applications.

Unlimited if set to -1.

To restrict the maximum number of Java applications available for the domain example.com to 10:

# ./domain_pref -u example.com -max_webapps 10

-max_subdom

<number>

Limits the number of available subdomains.

Unlimited if set to -1.

To restrict the maximum number of subdomains available for the domain example.com to 15:

# ./domain_pref -u example.com -max_subdom 15

-expiration

<YYYY-MM-DD>

Limits the validity period of a domain.

Unlimited if set to -1.

To set the validity period for the domain example.com to 2009-11-30:

# ./domain_pref -u example.com -expiration 2009-11-30

-www

true|false

Enables/Disables the www prefix.

Is true by default.

To disable the www prefix for the domain name example.com:

# ./domain_pref -u example.com -www false

-wuscripts

true|false

Enables/Disables scripting support for web users.

Is false by default.

To enable scripting support for web users on the domain example.com:

# ./domain_pref -u example.com -wuscripts true

-webmail

true|false

Enables/Disables using Webmail.

Is true by default.

To disable Webmail support on the domain example.com:

# ./domain_pref -u example.com -webmail false

-no_usr

bounce:txt|email|reject

Sets the mode of automatic action toward mail messages addressed to non-existent users.

Is reject by default.

To have messages addressed to non-existent users bounced back with text No such mailbox on the server on the domain example.com:

# ./domain_pref -u example.com -no_usr bounce:"No such mailbox on the server"

To have messages addressed to non-existent users forwarded to mail address admin@example.com on the domain example.com:

# ./domain_pref -u example.com -no_usr admin@example.com

-max_dom_aliases

<number>

Limits the number of available domain aliases.

Unlimited if set to -1.

To set the maximum number of domain aliases available for the domain example.com to 10:

# ./domain_pref -u example.com -max_dom_aliases 10

-at-access

true|false

Enables/Disables <webuser_name>@<domain_name> access format.

Deprecated since Plesk 8.3.

To enable authorized web user access to control panel using the <webuser_name>@<domain_name> login name format on the domain example.com:

# ./domain_pref -u example.com -at-access true

-keep_traf_stat

<number>

Defines the number of months during which the system keeps traffic usage statistics.

Keeping statistics during unlimited period if set to -0.

To make the system retain example.com traffic statistics during 5 months:

# ./domain_pref -u example.com -keep_traf_stat 5

-sign_outgoing_mail

true|false

Allows/Prohibits using DomainKeys spam protection on a domain.

Is false by default.

Available since Plesk 8.4.

To use DomainKeys spam protection on the domain example.com:

# ./domain_pref -u example.com -sign_outgoing_mail true