mail.exe: Mail Accounts
The mail.exe
utility serves to manage mail accounts. The utility allows the following operations:
- creating and removing mail accounts
- modifying mail account settings (mailbox quotas, antivirus protection, etc.)
- managing autoresponders (mail reply messages to be sent automatically), mail redirection, and mail aliases
- enabling/disabling the mail service on subscriptions
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 |
|
|
Retrieves the list of email accounts. |
To see the list of email accounts: mail.exe -l |
|
|
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 |
---|---|---|---|
|
|
Allows or prohibits managing the antivirus settings. |
To allow managing the antivirus settings for the mail account JDoe@example.com: mail.exe -u JDoe@example.com -manage-virusfilter true |
|
|
Allows or prohibits managing the spam filter settings. |
To allow managing the spam filter settings for the mail account JDoe@example.com: mail.exe -u JDoe@example.com -manage-spamfilter true |
|
|
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 |
|
|
Specifies the type of user password. Ignored if no password is specified. |
To set the user password to sample and password type to encrypted for the mail account JDoe@example.com: mail.exe -u JDoe@example.com -passwd_type encrypted -passwd '$1$3KWwrPxB$b6GLpDPpQVsljMRgAlQZG/' |
|
|
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 |
|
|
Adds a mail account to or removes a mail account from a mail group. |
To add mail account JDoe@example.com to the mail group testgroup: mail.exe -u JDoe@example.com |
|
|
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 |
|
|
Allows or prohibits logging in to the Control Panel with the specified email address as the username. This option, if ' To prohibit the corresponding existing user from logging in the the Control Panel, use ' |
To create the mail account user4@ example.com and the auxiliary user and to allow the user to log in to Control Panel with the email address as the user name and the password mypassword: mail.exe --create user4@example.com -passwd mypassword -cp-access true -mailbox true
To update the existing mail account user2@ example.com and create the auxiliary user who can log in to Control Panel with the email address as the user name and the password mypass: mail.exe --update user2@example.com -passwd mypass -cp-access true -mailbox true |
|
|
Specifies a description of an email address to be displayed in Plesk.
|
To create a description of the mail account JDoe@example.com: mail.exe --update JDoe@example.com -description "A mailbox for JDoe" |
|
|
Displays the output in the JSON format. Used with the |
To see the list of mail accounts in the JSON format: mail.exe -l -json |
|
|
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 |
|
|
Manages antivirus checking for incoming mail traffic. You can switch it on and off for the whole server and for individual mailboxes. |
To enable the antivirus checkup for all incoming mail messages sent to JohnDoe@example.com: mail.exe --update JohnDoe@example.com -antivirus |
|
|
Manages antivirus checking for outgoing mail traffic. You can switch it on and off for the whole server and for individual mailboxes. |
To enable the antivirus checkup for all outgoing mail messages sent to JohnDoe@example.com: mail.exe --update JohnDoe@example.com -antivirus |
|
|
Sets the limit on outgoing messages from a mailbox (per hour). To set the Unlimited value, specify "-1". Specify "default" to set the value specified in server-wide settings. |
To set the limit on outgoing messages per hour from the email address JDoe@example.com: mail.exe --update JohnDoe@example.com |