1

Topic: Copying over old mail prior to a fresh install doesn't work

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: Ubuntu 20.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
Not applicable.
====
I attempted to migrate a personal iRedMail 1.2.1 (MariaDB) installation's mailboxes on an Ubuntu 18.04 LTS VPS to a fresh Ubuntu 20.04 LTS VPS. My process was to "tar -cf /var/vmail/vmail1" on the old VPS and extract into the same directory on the new one, preserving vmail:vmail's ownership and the 0700 mode,  then installing iRedMail 1.3.2 (MariaDB) on the new VPS via the scripts on the new server and manually re-making the mail accounts via iRedAdmin 1.2. However, upon logging into these accounts, all of the old emails are nowhere to be seen.
I attempted to use "doveadm force-resync -A INBOX" but this has had no effect.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Copying over old mail prior to a fresh install doesn't work

- Check the maildir path stored in SQL db (table "vmail.mailbox"), make sure it matches the one on file system.
- Try to enable debug mode in Dovecot, make sure it's accessing the real/copied mailbox path.

3 (edited by badmin 2020-11-21 00:39:02)

Re: Copying over old mail prior to a fresh install doesn't work

ZhangHuangbin wrote:

- Check the maildir path stored in SQL db (table "vmail.mailbox"), make sure it matches the one on file system.

On the filesystem, there's two separate Maildirs for each account, each within a time-and-date-stamped parent directory. The maildir paths in the DB all correspond to the newer directories.
How can I merge the two Maildirs for each account in a manner that is both safe and efficient?

4

Re: Copying over old mail prior to a fresh install doesn't work

You should either update SQL table "vmail.mailbox" to use same mailbox as the copied one, or you copy mail messages to the one defined in the sql table.