1

Topic: Deleted mailbox account

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

Hi Mr. Zhang,

Refer to your answer....
*) Backup file is a plain SQL file compressed with bzip2, you can uncompress it with 'bunzip2', open it with your favourite text editor (vi/vim, emacs, etc), search this file with email address of your deleted user.

*) You should find two records, one in table 'mailbox', another one in table 'alias'. now you have required data to re-create this user.

Contain in the backup directory....( /var/vmail/backup/mysql/2013/07/16/ )
[root@mailserver 16]# ls -l
total 20816
-rw-r--r-- 1 root root      752 Jul 16 03:30 2013.07.16.03.30.01.log
-rw-r--r-- 1 root root 20662056 Jul 16 03:30 amavisd-2013.07.16.03.30.01.sql.bz2
-rw-r--r-- 1 root root     6454 Jul 16 03:30 iredadmin-2013.07.16.03.30.01.sql.bz2
-rw-r--r-- 1 root root   510336 Jul 16 03:30 mysql-2013.07.16.03.30.01.sql
-rw-r--r-- 1 root root    98102 Jul 16 03:30 mysql-2013.07.16.03.30.01.sql.bz2
-rw-r--r-- 1 root root     3930 Jul 16 03:30 policyd-2013.07.16.03.30.01.sql.bz2
drwxr-xr-x 2 root root     4096 Jul 18 09:12 recover
-rw-r--r-- 1 root root    16967 Jul 16 03:30 roundcubemail-2013.07.16.03.30.01.sql.bz2

I've went through the file and tried to search in "mysql-2013.07.16.03.30.01.sql" as you tought but I couldn't find the record...
Thanks in advance

2

Re: Deleted mailbox account

You don't have SQL database 'vmail'? Mail accounts are stored in vmail database.
Please check your shell script, /var/vmail/backup/backup_mysql.sh, do you have 'vmail' listed as backup database?

export DATABASES='...'

If no, then you don't have 'vmail' backup.

3

Re: Deleted mailbox account

Mr. Zhang,

It seems that the previous IT guy didn't include the vmail in the backup list as you can see below...

export DATABASES=" mysql mysql policyd amavisd roundcubemail iredadmin"

and how to include the vmail.

Thanks in advance.

4

Re: Deleted mailbox account

Please list 'vmail' in the variable:

export DATABASES="mysql vmail policyd amavisd roundcubemail iredadmin"

Seems this is a bug in iRedMail-0.8.4 and earlier versions, it doesn't list 'vmail' here. I will post to mailing list to let all system administrators check this.

So sorry about my mistake.

5

Re: Deleted mailbox account

OK, thanks Mr. Zhang