3.3.1.1 Purpose
The majority of tasks related to administration of mail accounts can be handled by the mail.sh utility. The following tasks can be performed with its help: creation/update/removal of mail names, setup of preferences for mailboxes, redirects and mail groups. Autoresponder settings can also be controlled with this utility.
3.3.1.2 Usage
Usage: mail.sh command <mail_name> [options]
Available commands and options:
| Command | Parameter | Action |
|---|---|---|
| --create or -c | <mail_name>@<domain> | creates a mail account |
| --update or -u | <mail_name>@<domain> | updates mail account parameters |
| --remove or -r | <mail_name>@<domain> | removes a mail account |
| --on | <domain> | enables mail service for a domain |
| --off | <domain> | disables mail service for a domain |
| --info or -i | <mail_name>@<domain> | retrieves mail account information |
| --help or -h | displays help on the utility usage | |
| Option | Parameter | Note |
| -cp_access | <true|false> | enables control panel access |
| -mailbox | <true|false> | creates/removes a mailbox |
| -passwd | <passwd> | sets a mailbox password |
| -boxpass | <passwd> | an obsolete alias for the "passwd" option (this option may be removed from future releases) |
| -passwd_type | <plain|crypt> | specifies the type of the mailbox password; ignored if no password is specified |
| -mbox_quota | <KB> | limits the mailbox quota to the desired amount |
| -aliases | <add|del>:<name1[,name2]> | adds or deletes mail alias(es) to/from a mail name |
| -mgroups | <add|del>:<list1[,list2]> | adds or removes a mail name to/from a mail group |
| -redirect | <true|false> | switches mail redirect on/off |
| -rediraddr | <addr> | sets redirect to an address (required if the redirect is enabled) |
| -group | <true|false> | switches a mail group on/off |
| -groupmem | <add|del>:<addr1[,addr2]> | adds/removes address(-es) to/from a mail group |
| -multiple-sessions | <true|false> |
allows multiple sessions
|