Changing passwords for mailboxes in the ONLYOFFICE Mail using a script

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 change passwords for mailboxes, perform the 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 a list of existing mailboxes and new passwords for them and save the file in the csv format, e.g. mailboxes.csv.

Below is an example of the mailboxes.csv file:

  1. Email,Password
  2. zzz@example.com,newpwd123
  3. yyy@example.com,newqwerty123

Execute the script to change passwords for mailboxes:

python change_passwords.py -d "onlyoffice-mysql-server" -u "root" -p "my-secret-pw" -dn "onlyoffice_mailserver" -mb "mailboxes.csv"

To find out how to perform other operations using a script, you can refer to the following articles:

Host ONLYOFFICE Workspace on your own server

Article with the tag:
Browse all tags