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 has started to modify the default settings of the onlyoffice-mail-server.

To change mailbox passwords, perform the following steps:

Execute the following command:

docker exec -it onlyoffice-mail-server bash

Go to the directory containung the scripts:

cd /usr/src/iRedMail/tools/scripts/

Prepare the CSV file containing a list of existing mailboxes and their new passwords, and save it in the CSV format, for example 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 perform other operations using a script, refer to the following articles:

Article with the tag:
Browse all tags