1

Topic: I think I lost all our mail. What am I doing wrong?

==== Required information ====
- iRedMail version:  0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version:  Ubuntu Linux 12.04
- Related log if you're reporting an issue:
====

Hello Everyone,

Yesterday, one of the people who help me administer our mail server did something to MySQl that completely brought down the mail site. Instead of fixing it, he decided to simply reinstall iRedMail and things went haywire!

It looks like he didn't back up any of the MySQL tables. He only backed up everything in /var/vmail. This, of course, includes all of the mail we had but it now isn't accessible to RoundCube mail. I recreated the domains in the iRedMail manager then recreated the users. I copied everything into the vmail directory but RoundCube doesn't see it!

Is all our mail lost or is there a way to recover from this?

Thanks,
Anthony

----

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

2

Re: I think I lost all our mail. What am I doing wrong?

The MySQL database has to be restored from the backups (/var/vmail) iRedMail makes by default.

You'll probably find the backups in this directory '/var/vmail/backup/mysql/' after restoring your /var/vmail-backup.
Restore the MySQL database tables from a date out the sub-dirs from a time you know the tables where OK.
You can use phpMyAdmin for this, but i like to use the program 'adminer'. Available for Ubuntu as well, search Google.
adminer is small, powerful and easy to use (much easier then phpMyAdmin, once you know how to use it).

Good luck,
--
LD

3

Re: I think I lost all our mail. What am I doing wrong?

cajuntechie wrote:

I recreated the domains in the iRedMail manager then recreated the users. I copied everything into the vmail directory but RoundCube doesn't see it!

Path to mailboxes of newly created mail users are different than old users. So you have to check the path of mailboxes in SQL database (table "vmail.mailbox"), compare them to the one stored on file system (/var/vmail/). make sure the one in SQL is the same as the one on file system.