1 (edited by craig 2016-11-02 02:17:57)

Topic: Restore deleted domain

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.8.5
- Linux/BSD distribution name and version: CentOS 6.8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro?: Yes
- Related log if you're reporting an issue:
====

Hi,

I deleted a domain through iRedAdmin-Pro, and now the user wants it back. The files are still in the file system of course, so I'm wondering if I can re-add the domain in iRedAdmin-Pro and then edit some SQL to point the domain to the existing mailstore.

Did a search of the forum and looked at the documentation page, but the results all seemed to be about restoring a back-up.

Thanks.


Craig


P.S.: I know I'm long overdue for an upgrade.

----

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

2

Re: Restore deleted domain

craig wrote:

I'm wondering if I can re-add the domain in iRedAdmin-Pro and then edit some SQL to point the domain to the existing mailstore.

Yes.

The most important part is making sure the maildir path stored in SQL is same as the real mailbox folder on file system.

3

Re: Restore deleted domain

ZhangHuangbin wrote:

The most important part is making sure the maildir path stored in SQL is same as the real mailbox folder on file system.

Thanks Zhang. Where do I do this? I looked on the documentation page for a description of the MySQL database schema, but I don't see it.


Craig

4

Re: Restore deleted domain

You can get full maildir path stored in SQL with SQL command below:

USE vmail;
SELECT username, CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) FROM mailbox;

5

Re: Restore deleted domain

Hi Zhang,

Thanks. I'll make the modification.

This leads to another question though that I've never resolved, but I'll ask that separately.


Craig