Articles with the tag:
Close
Changelog
Close
Try in the cloud
Try in the cloud
Help Center
ONLYOFFICE Mail for Docker

Updating ONLYOFFICE Mail integrated with ONLYOFFICE Groups

ONLYOFFICE Mailv1.5 - ONLYOFFICE Mail v1.6 ONLYOFFICE Mail changelog

Version 1.6.57

Release date: 04/25/2019

New features

  • Added permanent Fail2Ban ignoreip section for docker containers and its gateway;
  • Added the possibility to create sieve rules for users inside /var/vmail/sieve/;
  • Added new extension to sieve: sieve_extensions -> editheader;
  • Exposed port 4190 for ManageSieve service;
  • Added the possibility to run an external script from the /var/vmail/external.sh or /app/onlyoffice/MailServer/data/external.sh path;
  • Changed the default FIRST_DOMAIN parameter;
  • Replaced the hard-coded password used for the first mailbox with a random one;
  • Removed old useless descriptions for iRedMail administrator console path;
  • Added backticks to the 'CREATE DATABASE' commands;
  • Added the possibility to send mail messages from alias_domain, alias_address and full alias;
  • Added the imapsync command;
  • Added the new Python scripts allowing to create mailboxes, change password and run imapsync batch in /usr/src/iRedMail/tools/scripts folder inside the onlyoffice-mail-server container;
  • Added the Python PIP manager and installation requirements.

Bug fixes

  • Fixed the bug with mailbox not being removed when using third level domain (issue: wrong domain regex);
  • Fixed the bug with the Cannot load 1024-bit DH parameters from file /etc/pki/tls/dhparams.pem warning;
  • Fixed the bug with the No such file or directory being shown in many cases;
  • Fixed the bug with the ECHO_INFO: command not found warning.

Version 1.6.25

Release date: 07/03/2017

Runtime

  • Updated OpenSSL to the latest version (1.0.2).

Version 1.6.21

Release date: 04/26/2017

Runtime

  • Fixed the issue when the amavisd-new interface could not start without the properly configured IPv6.

Version 1.6.20

Release date: 12/13/2016

Connection Settings

  • Added page to the Settings for the integration of Community Server (Windows version) with Mail Server.

Installation Script

  • Fixed the error shown if the mail domain is not specified, now Mail Server will not be installed if this is the case.

Version 1.6.7

Release date: 06/22/2016

Refactoring

  • Removed version from the iRedMail folder;
  • iRedMail completed with commits from v.0.9.2;
  • Deleted unused packages from iRedMail;
  • Added the SpamAssassin setup with initial bayes_tokens.

Runtime

  • Fixed the incorrect MySQL server name in the config;
  • Fixed the issue with the config section duplication when starting the Docker container;
  • Fixed the issue with sending mail to a group/alias address;
  • Fixed the startup API issue.

Logging

  • Fixed logging during the installation.

Networking

  • Fixed the fail2ban and iptables issue when starting Docker in a network mode;
  • Fixed the issue with Mail Server on an external physical server.

Version 1.6.0

Release date: 03/09/2016

Settings

  • Redesigned Mail Server settings page.

Version 1.5.0

Release date: 04/20/2015

Mail Server

  • Mail Server for Docker first release.

Introduction

ONLYOFFICE Mail for Docker files can be found here:
https://hub.docker.com/r/onlyoffice/mailserver/

Starting from version 9.1, ONLYOFFICE Community Server uses MySQL v. 5.7 instead of MySQL v. 5.5 that had been used in earlier versions. Besides, a different installation scheme is used when MySQL is running in a separate container. If your current portal version has been installed using the old installation scheme, the ONLYOFFICE Mail database is located within the ONLYOFFICE Mail container and the ONLYOFFICE Groups database is in the ONLYOFFICE Community Server container. According to the new installation scheme, the MySQL container contains both the ONLYOFFICE Groups database (named 'onlyoffice') and the ONLYOFFICE Mail database (named 'onlyoffice_mailserver').

The first section of this article describes the update procedure for old versions that have been installed using the old installation scheme with MySQL databases located within the ONLYOFFICE Mail/ONLYOFFICE Community Server containers.

If you want to update your ONLYOFFICE Mail integrated with an old ONLYOFFICE Community Server version (lower than 9.1) to the latest available version that uses MySQL v. 5.7 running in a separate container, please refer to the second section.

Updating to versions that use MySQL 5.5 within the ONLYOFFICE Mail/ONLYOFFICE Community Server containers

Step 1: Check if all the external data storage folders are mounted

Make sure that all the container volumes used to store ONLYOFFICE Mail data are mounted using the following command:

sudo docker inspect --format='{{range $p,$conf:=.HostConfig.Binds}}{{$conf}};{{end}}' {{MAIL_SERVER_ID}}

where {{MAIL_SERVER_ID}} stands for the ONLYOFFICE Mail container name or ID.

You can easily find out the current ONLYOFFICE Mail container name or ID using the Docker command which will list all the existing containers:
docker ps -a

You can backup the mounted folders located on the host machine, as a precaution:

  • /app/onlyoffice/MailServer/logs
  • /app/onlyoffice/MailServer/mysql
  • /app/onlyoffice/MailServer/data
  • /app/onlyoffice/MailServer/data/certs

In case you have not mounted the folders during the ONLYOFFICE Mail installation, you will need to perform the backup of the following folders within the Docker container:

  • /var/log that contains ONLYOFFICE Mail logs
  • /var/lib/mysql that contains MySQL database data
  • /var/vmail that contains mail storage
  • /etc/pki/tls/mailserver that contains certificates

You can copy these data folders from the Docker container to a folder on your host machine:

sudo docker cp {{MAIL_SERVER_ID}}:var/log /home/user/Backup/MailServer/log
sudo docker cp {{MAIL_SERVER_ID}}:var/lib/mysql /home/user/Backup/MailServer/mysql
sudo docker cp {{MAIL_SERVER_ID}}:var/vmail /home/user/Backup/MailServer/vmail
sudo docker cp {{MAIL_SERVER_ID}}:etc/pki/tls/mailserver /home/user/Backup/MailServer/mailserver

Where {{MAIL_SERVER_ID}} stands for the ONLYOFFICE Mail container name or ID and /home/user/Backup/MailServer stands for a path to any folder on your host machine.

Step 2: Remove the current container
sudo docker rm -f {{MAIL_SERVER_ID}}

where {{MAIL_SERVER_ID}} stands for the ONLYOFFICE Mail container name or ID.

Step 3: Remove the current image

The image used to install ONLYOFFICE Mail also needs to be removed, otherwise it will be used to install it anew and no upgrade will happen:

sudo docker rmi -f $(sudo docker images | grep onlyoffice/mailserver | awk '{ print $3 }')
Step 4: Run the new ONLYOFFICE Mail image with the same map paths

Create a network for Docker containers if it had not been created for the previous version:

docker network create --driver bridge onlyoffice

Run the new ONLYOFFICE Mail image:

sudo docker run --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice-mail-server \
    -p 25:25 -p 143:143 -p 587:587 \
    -v /app/onlyoffice/MailServer/data:/var/vmail \
    -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
    -v /app/onlyoffice/MailServer/logs:/var/log \
    -v /app/onlyoffice/MailServer/mysql:/var/lib/mysql \
    -h yourdomain.com \
    onlyoffice/mailserver

Where yourdomain.com is your ONLYOFFICE Mail hostname.

Your domain that will be used for maintaining correspondence must be valid and configured for this machine (i.e. it should have the appropriate A record in the DNS settings that points your domain name to the IP address of the machine where ONLYOFFICE Mail is installed).
In the command above, the "yourdomain.com" parameter must be understood as a service domain for Mail Server. It is usually specified in the MX record of the domain that will be used for maintaining correspondence. As a rule, the "yourdomain.com" looks like mx1.onlyoffice.com

Make sure that you run the new image with the folder paths mapped exactly as they had been mounted before you deleted ONLYOFFICE Mail image, otherwise the data stored in these folders will not be picked up automatically.

If you have not mounted the folders during the previous version installation, you will need to restore data manually before installing the ONLYOFFICE Mail new version. To do that you can copy the backup data from the folders on your host machine to the new folders on the host that will be mounted during the further installation:

sudo mkdir -p /app/onlyoffice/MailServer/logs && sudo cp -a /home/user/Backup/MailServer/log/. $_
sudo mkdir -p /app/onlyoffice/MailServer/mysql && sudo cp -a /home/user/Backup/MailServer/mysql/. $_
sudo mkdir -p /app/onlyoffice/MailServer/data && sudo cp -a /home/user/Backup/MailServer/vmail/. $_
sudo mkdir -p /app/onlyoffice/MailServer/data/certs && sudo cp -a /home/user/Backup/MailServer/mailserver/. $_

Where /home/user/Backup/MailServer stands for a path to any folder on your host machine. When the backup is restored, install ONLYOFFICE Mail as described above.

Step 5: Run the ONLYOFFICE Docs & ONLYOFFICE Community Server images with the same map paths

Run a new ONLYOFFICE Docs container and then the ONLYOFFICE Community Server container connecting them as described here. When running the containers, you will also need to mount data folders exactly as they had been mounted in the previous version.

Now you can run the portal and check the data for consistency and correct work.

Updating to the latest version that uses MySQL 5.7 within a separate container

To update your ONLYOFFICE Mail integrated with an old ONLYOFFICE Community Server version (lower than 9.1) to the newest version you'll need to make a dump for both the ONLYOFFICE Mail and ONLYOFFICE Community Server MySQL databases and then restore them in the corresponding databases within a new MySQL container. Restoring the ONLYOFFICE Mail backup data should be performed before installing the new version of ONLYOFFICE Mail.

Instructions on how to update ONLYOFFICE Groups are available here.

Step 1: Backup data

Enter the ONLYOFFICE Mail container:

sudo docker exec -it onlyoffice-mail-server bash

Create the 'onlyoffice_mailserver' database dump:

mysqldump -u root -pIsadmin123 onlyoffice_mailserver > dump_mailserver.sql

Exit from the container:

exit

Copy the dump file to the host computer:

sudo docker cp onlyoffice-mail-server:/dump_mailserver.sql /home/user/

Additionally, you can backup the /var/log, /var/vmail, /etc/pki/tls/mailserver folders as it is described in the previous section of this guide (step 1).

Step 2: Remove the current ONLYOFFICE Mail container and image
sudo docker rm -f onlyoffice-mail-server
sudo docker rmi -f $(sudo docker images | grep onlyoffice/mailserver | awk '{ print $3 }')
Step 3: Restore data folders

If necessary, restore the /var/log, /var/vmail, /etc/pki/tls/mailserver data folders as it is described in the previous section of this guide (step 4).

You can skip this step if you've mapped data folders during the previous version installation.

Step 4: Install prerequisites

Install prerequisites following these instructions.

Step 5: Install MySQL

Install MySQL following these instructions.

Step 6: Restore the 'onlyoffice_mailserver' database dump.

Copy the dump file into the MySQL container:

sudo docker cp /home/user/dump_mailserver.sql onlyoffice-mysql-server:/dump_mailserver.sql

Enter the MySQL container:

sudo docker exec -it onlyoffice-mysql-server bash

Create the 'onlyoffice_mailserver' database:

mysql -u root -pmy-secret-pw -e "CREATE DATABASE onlyoffice_mailserver"

Restore the dump:

mysql -u root -pmy-secret-pw onlyoffice_mailserver < dump_mailserver.sql

Exit from the container:

exit
Step 7: Install new ONLYOFFICE version

Install new versions of ONLYOFFICE Docs, ONLYOFFICE Mail, ONLYOFFICE Groups following these instructions.

Download Host on your own server Available for
Docker, Windows and Linux
You Might Also Like This:
Close