The mail.exe utility serves to manage mail accounts. The utility allows the following operations:
Location
%plesk_cli%
Usage
mail.exe <command> [[<mail name>@]<domain name>] [
<option 1> <param 1>[,<param 2>,...,<param n>]
[<option 2> <param 1>[,<param 2>,...,<param n>]]
... [<option N> <param 1>[,<param 2>,...,<param n>]]
]
Example
The following command creates the JohnDoe@example.com mail account, sets the password MyPass for it, restricts the size of the mailbox to 10240 KB, and enables bidirectional mail checkup for viruses.
>mail.exe --create JohnDoe@example.com -passwd MyPass -mbox_quota 10240K -antivirus inout
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates a mail account with a specified name. |
To create a mail account with the name JohnDoe on the domain example.com: >mail.exe --create JohnDoe@example.com or >mail.exe -c JohnDoe@example.com |
|
|
Updates mail account settings. |
To set the size of the mailbox for JohnDoe@example.com: >mail.exe --update JohnDoe@example.com -mbox_quota 20480K or >mail.exe -u JohnDoe@example.com -mbox_quota 20480K |
|
|
Switches mail service on or off on a subscription. Requires the |
To enable mail service on the subscription example.com: >mail.exe --update-service example.com -status enabled |
|
|
Renames a mail account. Required option |
To rename mail account JDoe@example.com to roy@example.com: >mail.exe --rename JDoe@example.com -new roy |
|
|
Removes a specified mail account from a domain. |
To remove the mail account with the name JohnDoe from example.com: >mail.exe --remove JohnDoe@example.com or >mail.exe -r JohnDoe@example.com |
|
|
Enables mail service on a subscription. |
To enable the mail service on the subscription example.com: >mail.exe --on example.com |
|
|
Disables mail service on a subscription. |
To disable the mail service on the subscription example.com: >mail.exe --off example.com |
|
|
Retrieves info about a specified mail account. |
To retrieve info about the mail account JohnDoe@example.com: >mail.exe --info JohnDoe@example.com or >mail.exe -i JohnDoe@example.com |
|
|
Displays help on the use of the utility. |
To see the help info on the use of the utility: >mail.exe --help or >mail.exe -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates/Removes a mailbox. Is |
To create a mailbox for JohnDoe@example.com mail account: >mail.exe --update JohnDoe@example.com -mailbox true |
|
|
Sets a password. |
To set the 12345 password for JohnDoe@example.com mail account: >mail.exe --update JohnDoe@example.com -passwd 12345 |
|
|
Limits the size of the mailbox. |
To restrict the size of the mailbox for JohnDoe@example.com mail account to 10240 KB: >mail.exe --update JohnDoe@example.com -mbox_quota 10240K |
|
|
Adds/Deletes mail aliases. |
To add JD, JohnD mail aliases to JohnDoe@example.com mail account: >mail.exe --update JohnDoe@example.com -aliases add:JD,JohnD |
|
|
Enables/Disables mail forwarding for a mail account. Is |
To enable mail forwarding from John_Doe@example.com to John_Doe@sample.com: >mail.exe --update John_Doe@example.com -forwarding true -forwarding-addresses add:John_Doe@sample.com
|
|
|
Specifies e-mail addresses to which incoming mail should be forwarded. It is required when enabling the |
|
|
|
Enables/Disables mail service on a subscription (the |
To enable mail service on the subscription example.com: >mail.exe --update-service example.com -status enabled |
|
|
Specifies new mail account name. Used with |
To rename mail account JDoe@example.com to rroy@example.com: >mail.exe --rename JDoe@example.com -new rroy |
|
|
Sets an antivirus checkup of the mail traffic. One can disable this option, or enable this checkup for the incoming mail only, or for the outgoing mail only, or for both. |
To enable the antivirus checkup for all mail messages sent to JohnDoe@example.com: >mail.exe --update JohnDoe@example.com -antivirus in |