1 (edited by kalstrams 2013-10-18 04:36:12)

Topic: Import of vmail folder from old iRedMail to new iRedMail installation

==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: Ubuntu 12.04 LTS
- Previous iRedMail installation was on Debian 7.
====
Basically, what I did:

1)Copied vmail folder to my local machine.
2)Reinstalled my VPS.
3)Installed iRedMail again.
4)Created same users on the same virtual domain.

Question is - can I somehow copy over my old vmail folder in new one to import the old emails ? Previous installation was on MySQL, I have full database backup.

I do not know what info to give more, surely ask for any other.

----

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

2

Re: Import of vmail folder from old iRedMail to new iRedMail installation

Maildir path of user's mailbox is defined in SQL record, for example, user user@example.com:

mysql> USE vmail;
mysql> SELECT CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM mailbox WHERE username='user@example.com';

You can simply copy old mailboxes to new server, but please make sure they're placed under correct maildir path, and set correct file owner (vmail:vmail) and permission (0700). Otherwise users cannot find/see them.

3 (edited by kalstrams 2013-12-11 00:00:17)

Re: Import of vmail folder from old iRedMail to new iRedMail installation

For example, I have following structure:

new folder - /var/vmail0/vmail1/domain.com/x/y/z/mail@domain.com/mail-new_date
old folder - /backup/vmail1/vmail1~/domain.com/x/y/z/mail@domain.com/mail-old_date

Do I leave mail-old_date folder in new mail@domain.com folder, or I put some contents of mail-old_date into mail-new_date ?

4

Re: Import of vmail folder from old iRedMail to new iRedMail installation

*) First of all, i hope you can track your own topic in a short time, at least not 2 months later.
*) If you export mailbox records to new server, it contains the date string, so just use the old one, and copy mailboxes to new server without modifying the date string.

5

Re: Import of vmail folder from old iRedMail to new iRedMail installation

Yeah, I am sorry that I came up with my question so late afterwards, but my I have had some issues to deal with in real life, before I can continue on with less important matters. Thank you for your answer, it worked as a charm and now I can access my old mails on my new sever.

Best regards.