- Plesk for Linux
- Plesk for Windows
How to create several mailboxes in Plesk at once using a single command or a script in the command line?
Create a file
mail.txtusing any text editor with a list of mail addresses and passwords for it:
CONFIG_TEXT: firstname.lastname@example.org password
Note: Make sure that passwords comply with the current Password Strength Policy
Follow the instructions below for creating mailboxes from the
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
Execute the command below to create mailboxes from the list created on step 2:
Note: In the example below,
mail.txtfile exists in
C:\mail.txt. Adjust the path to the
mail.txtfile if required
C:\> 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
-forwardingetc., can be added to the command
plesk bin mailin the script. For details on using these options, check the documentation articles: for Linux and for Windows.
The file download ist not found (404).
The link has been updated. Thank you for bringing this to our attention!
Please sign in to leave a comment.