1

Topic: undo user account deletion

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.5.2 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: Debian GNU/Linux 11 (bullseye)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I had scheduled an account for deletion through the admin panel.

Then the user wants it restored. The scheduled deletion hadn't take place, so this should be easy I thought.

I removed its record from the sql table "vmail.deleted_mailboxes".

But apparently to no avail.

Am I missing something here?

----

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

2

Re: undo user account deletion

Well let me reply to my own message...

I compared production database to backup prior to deletion.
Retrieved the affected tables through searching the username (email) in the vmail backup.
(the SQL commands are in there as well).

It boiled down to this:

INSERT INTO `forwardings` VALUES ([data from the backup]);
INSERT INTO `last_login` VALUES ([data from the backup]);
INSERT INTO `mailbox` VALUES ([data from the backup]);
INSERT INTO `used_quota` VALUES ([data from the backup]);

done!

I'm using the disable option next time ;-)