- Plesk for Linux
- Plesk for Windows
How to create several mailboxes at once using a single command or a script in command line?
Create a file
mail.txtwith a list of mail addresses and a password for it:
Execute the following script to create mailboxes from the list in command line:
for Linux - download, unpack and execute the script
# wget https://support.plesk.com/hc/en-us/article_attachments/360004446494/createmail.tar.gz
# tar -zxvf createmail.tar.gz
# ./createmail.sh mail.txt
C:\> for /F %i in (c:\mail.txt) do plesk bin mail.exe -c %i -passwd insertpasswordhere -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.