Starting from v1.6.57, it is possible to run a script after the container is started to change default settings of the onlyoffice-mail-server. If you want to create mailboxes perform following actions.
Execute the following command:
docker exec -it onlyoffice-mail-server bash
Go to the directory that contains scripts:
cd /usr/src/iRedMail/tools/scripts/
Prepare the csv file which contains the list of mailboxes that should be created and save the file in the csv format, e.g. mailboxes.csv.
Below is an example of the mailboxes.csv file:
Email,Password
zzz@example.com,pwd123
yyy@example.com,qwerty123
Execute the script to create mailboxes:
python create_mailboxes.py -d "onlyoffice-mysql-server" -u "root" -p "my-secret-pw" -dn "onlyoffice_mailserver" -mb "mailboxes.csv"
If you call the script once again, this does not create any duplicates.
To find out how to perform other operations using the script, you can refer to the following articles: