Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to create several mailboxes in Plesk at once using a single command or a script in the command line?
Answer
-
Create a file
mail.txt
using any text editor with a list of mail addresses and passwords for it:CONFIG_TEXT: example1@example.com password
example2@example.com password
...
exampleN@example.com passwordNote: Make sure that passwords comply with the current Password Strength Policy
-
Follow the instructions below for creating mailboxes from the
mail.txt
file:For Linux-
Download the attached script:
# wget https://support.plesk.com/hc/en-us/article_attachments/12377375244567/createmail_.tar.gz
-
Unpack the downloaded archive:
# tar -zxvf createmail_.tar.gz
-
Execute the script:
# ./createmail.sh mail.txt
For Windows-
Execute the command below to create mailboxes from the list created on step 2:
Note: In the example below,
mail.txt
file exists inC:\mail.txt
. Adjust the path to themail.txt
file if requiredC:\> for /F "tokens=1,2 delims= " %i in (c:\mail.txt) do plesk bin mail.exe -c %i -passwd %j -mailbox true
Note: Other options like
-mbox_quota
,-aliases
,-forwarding
etc., can be added to the commandplesk bin mail
in the script. For details on using these options, check the documentation articles: for Linux and for Windows. -
Comments
2 comments
The file download ist not found (404).
content:
Hello Roger,
The link has been updated. Thank you for bringing this to our attention!
Please sign in to leave a comment.