1 (edited by essecitech 2021-01-28 18:42:15)

Topic: Solved: Please help me. I'm in a big problem; all emails are gone.

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySql
- 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.
====

I had a VPS with Ubuntu 18.04 and iRedmail 1.0 (installed in 2020/Jan) - 6 domains and 50 users, more or less.
For some reasons the server has crashed but fortunately I was able to login in rescue mode and to export in sftp  all directories that was in /var/vmail/vmail1.
I've re-installed Ubuntu 18.04 and iRedmail 1.3.2 (it's been impossible to install iredmail 1.0) and then I've uploaded all dirs in /var/vmail/vmail1 with 0700 permissions and vmail:vmail owner.
I have login in Roundcubemail but... I don't see any mail.
What can I do?
Please help me.

----

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

2

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

I don't have the steps to resolve, Zhang is more likely to be able to help, but I wanted to say, "Be calm, don't do anything precipitous or start making changes to things just in hopes it'll start to work.

Stay methodical (as it seems you started with the recovery of the /var/vmail contents).  It seems like you have the data; now it's just a matter of hooking up the plumbing to get things running again.

Have a coffee, send one to Zhang, and hope that he has the necessary insight, based on knowledge of the differences in version 1 and 1.3.2

3

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

essecitech wrote:

I've re-installed Ubuntu 18.04 and iRedmail 1.3.2 (it's been impossible to install iredmail 1.0) and then I've uploaded all dirs in /var/vmail/vmail1 with 0700 permissions and vmail:vmail owner.
I have login in Roundcubemail but... I don't see any mail.

You need to make sure the mailbox paths are same as the ones stored in SQL db.

4

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

Hi Zhang, I bought you a coffee smile
I didn't checked SQL db but the path is identical to the old installation (/var/vmail/vmail1/domain.name/etc..).
You think it's better to check db?
In case, which is the table where the paths are stored?
Thanks

5

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

essecitech wrote:

Hi Zhang, I bought you a coffee smile
I didn't checked SQL db but the path is identical to the old installation (/var/vmail/vmail1/domain.name/etc..).
You think it's better to check db?
In case, which is the table where the paths are stored?
Thanks

SELECT CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM mailbox WHERE username='user@domain.com';

BTW: Google knows these types of answers.
https://github.com/gspu/iredmail-docs/b … .server.md

The info you seek is about 3/4 of the way down the page. :-)

6

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

essecitech wrote:

Hi Zhang, I bought you a coffee smile

Thank you. smile

essecitech wrote:

I didn't checked SQL db but the path is identical to the old installation (/var/vmail/vmail1/domain.name/etc..).
You think it's better to check db?
In case, which is the table where the paths are stored?
Thanks

Yes you better check sql db to make sure they're the same.

If you created the accounts manually on new server instead of restoring the SQL backup from old server, then it's pretty sure they're different.

7

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

iredmailtnt wrote:

SELECT CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM mailbox WHERE username='user@domain.com';

In which database I must execute query?
I have:
...
| iredadmin          |
| iredapd            |
| mysql              |
| vmail              |
...

Thank.

8

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

essecitech wrote:
iredmailtnt wrote:

SELECT CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM mailbox WHERE username='user@domain.com';

In which database I must execute query?
I have:
...
| iredadmin          |
| iredapd            |
| mysql              |
| vmail              |
...

Thank.

use vmail;

Most if not all of the user info is in vmail.

9

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

Mail domains / accounts are stored in "vmail" database.

10

Re: Solved: Please help me. I'm in a big problem; all emails are gone.

YESSSS!!
Problem solved!
I would like to thank all the users who participated in this post, you were amazing!
A lot of coffee fo all big_smile big_smile