1

Topic: IredMail and MySQL restoration

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? yes
- Linux/BSD distribution name and version: ubuntu 18
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL 5.7
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Good day!
I have my new iRedmail Server version 0.9.9 and Mysql 5.7 and it is working fine.I created two email addresses and both are receiving test emails vise versa.

I am going to migrate my old (Production email Server) iRedmail Server version 0.3.3 from iRedAdmin dashboard and 0.8.7 from /etc/iredmail-release and  Mysql version is 5.5 to my New iRedMail Server v0.9.9.

1st - MySQL Restoration - Which database im going to restore? except mysql.sql - Do not restore as per migration tutorial from old iRedMail.

2nd - Do i have to update the structure from mysql 5.5 to mysql 5.7?

3rd - Why i cant access mysql via workbench even if i tried to grant access for root using % instead of localhost? is there any workaround?

Please help me.
TIA
NIX

2

Re: IredMail and MySQL restoration

itadmins wrote:

0.8.7 from /etc/iredmail-release

There're many SQL structure changes since iRedMail-0.8.7, you'd better upgrade this server to the latest iRedMail-0.9.9 first. Or, dump the whole "vmail" database to a testing server and upgrade the SQL structure (on testing server), then export it to new server.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3 (edited by itadmins 2019-10-31 14:51:50)

Re: IredMail and MySQL restoration

ZhangHuangbin wrote:
itadmins wrote:

0.8.7 from /etc/iredmail-release

There're many SQL structure changes since iRedMail-0.8.7, you'd better upgrade this server to the latest iRedMail-0.9.9 first. Or, dump the whole "vmail" database to a testing server and upgrade the SQL structure (on testing server), then export it to new server.

Hi,

just want to ask which database i need to dump? i have databases bellow

information_schema |
| amavisd            |
| iredadmin          |
| iredapd            |
| mysql              |
| performance_schema |
| roundcubemail      |
| sys 

If im going to download the sql templates to update the sql structure, what would be the database name should i going to update?

TIA

4

Re: IredMail and MySQL restoration

itadmins wrote:
ZhangHuangbin wrote:
itadmins wrote:

0.8.7 from /etc/iredmail-release

There're many SQL structure changes since iRedMail-0.8.7, you'd better upgrade this server to the latest iRedMail-0.9.9 first. Or, dump the whole "vmail" database to a testing server and upgrade the SQL structure (on testing server), then export it to new server.

Hi,

just want to ask which database i need to dump? i have databases bellow

information_schema |
| amavisd            |
| iredadmin          |
| iredapd            |
| mysql              |
| performance_schema |
| roundcubemail      |
| sys 

If im going to download the sql templates to update the sql structure, what would be the database name should i going to update?

Tried to run
root@mail:/etc/dovecot# postconf smtpd_sender_login_maps
smtpd_sender_login_maps = proxy:ldap:/etc/postfix/ldap/sender_login_maps.cf
root@mail:/etc/dovecot#

TIA

5

Re: IredMail and MySQL restoration

I also try to copy my old maildir to my new maildir and open my roundcube.
P;lease see attached file for error

6

Re: IredMail and MySQL restoration

The most important database is "vmail", it stores mail domains and accounts.
FYI: https://docs.iredmail.org/migrate.to.ne … erver.html

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

7

Re: IredMail and MySQL restoration

Hi Zhang, i checked my old production mail server (iredmail) and i only have the following databases

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| amavisd            |
| cluebringer        |
| iredadmin          |
| mysql              |
| performance_schema |
| phpmyadmin         |
| roundcubemail      |
+--------------------+
8 rows in set (0.00 sec)

what should i do?

8

Re: IredMail and MySQL restoration

Seems you're running OpenLDAP backend.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

9

Re: IredMail and MySQL restoration

Hi Zhang,

Do you have any suggestions on how we can migrate our old mail server to new?

TIA

10

Re: IredMail and MySQL restoration

Hi Zhang,

How could i migrate mail accounts from openldap?

11

Re: IredMail and MySQL restoration

itadmins wrote:

Do you have any suggestions on how we can migrate our old mail server to new?

We have tutorial for you: https://docs.iredmail.org/migrate.to.ne … erver.html

itadmins wrote:

How could i migrate mail accounts from openldap?

From OpenLDAP to SQL? You need to write some shell/python/perl/php/... script to convert the LDAP LDIF data to SQL commands. Unfortunately we don't have such script yet.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee