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 preferences of an existing domain.

To set the Disk space limit for domain example.com to 1 GB:

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

or

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

--info or -i

<domain name>

Displays information about domain preferences.

To display information about preferences set on domain example.com:

# ./domain_pref --info example.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 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 display 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]

Sets the Disk space limit. (type "-1" to set the parameter to Unlimited).

To set the Disk space limit for domain example.com to 1 GB:

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

-max_traffic

<number>[K|M|G]

Sets the Maximum amount of traffic (per month) limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum amount of traffic limit for domain example.com to 500 MB/month:

# ./domain_pref -u example.com -max_traffic 500M

-max_box

<number>

Sets the Maximum number of mailboxes limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mailboxes limit in domain template example.com domain to 50:

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

-mbox_quota

<number>[K|M|G]

Sets the Mailbox quota limit. (type "-1" to set the parameter to Unlimited).

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

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

-max_redir

<number>

Sets the Maximum number of mail redirects limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mail redirects limit for domain example.com to 5:

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

-max_mg

<number>

Sets the Maximum number of mail groups limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mail groups limit for domain example.com to 7:

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

-max_resp

<number>

Sets the Maximum number of mail autoresponders limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mail autoresponders limit for domain example.com to 10:

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

-max_wu

<number>

Sets the Maximum number of web users limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of web users limit for domain example.com to 50:

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

-max_db

<number>

Sets the Maximum number of databases limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of databases limit for domain example.com to Unlimited:

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

-max_maillists

<number>

Sets the Maximum number of mailing lists limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of mailing lists limit for domain example.com to 3:

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

-max_webapps

<number>

Sets the Maximum number of Java applications limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of Java applications limit for domain example.com to 10:

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

-max_subdom

<number>

Sets the Maximum number of subdomains limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of subdomains limit for domain example.com to 10:

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

-expiration

<YYYY-MM-DD>

Sets the Validity period limit starting from domain creation date. (type "-1" to set the parameter to Unlimited).

To set the Validity period limit for domain example.com to 2008-11-30:

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

-www

true| false

Enables or disables the www prefix option for Domain name.

Set to true by default.

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

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

-wuscripts

true| false

Enables or disables scripting support for web users on a domain (the Allow the web users scripting parameter).

Set to false by default.

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

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

-webmail

true| false

Enables or disables the use of WebMail.

Set to false by default.

To enable WebMail support on domain example.com:

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

-no_usr

bounce:<txt>|<e-mail address>|reject

Enables or disables message bouncing, forwarding to an e-mail address, or rejecting mail addressed to non-existing users. Sets the Mail to nonexistent user parameter (Bounce with message, Forward to address, and Reject options) and specifies the text added on top of the bounced messages.

To enable bouncing mail messages addressed to non-existing users on domain example.com and adding text mail service for this email address has been discontinued to the bounced messages:

# ./domain_pref -u example.com -no_usr bounce:"mail service for this email address has been discontinued"

To forward mail messages addressed to non-existing users on domain example.com to admin@example.com:

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

-max_dom_aliases

<number>

Sets the Maximum number of domain aliases limit. (type "-1" to set the parameter to Unlimited).

To set the Maximum number of domain aliases limit for domain example.com to 10:

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

-at-access

true|false

Sets the Enable webuser@example.com access format parameter for a domain.

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

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

-keep_traf_stat

<number>

Sets the Retain traffic statistics parameter for a domain (Report > Traffic history > Traffic statistics retention preferences >). (type "0" if you want to retain all statistics).

To retain traffic statistics for domain example.com for the last 5 months only:

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