1

Topic: Email restore process

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

I am trying to define a process to restore users IMAP items. Currently I backup the /var/vmail directory and was wondering if a user inadvertently deleted message; what would be the best way to create an imap folder under that users account and restore/copy the deleted messages to it from the backup?


Also are there example scripts available that would let me restore the messages using a date range?

Thanks,
-Tim

----

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

2

Re: Email restore process

What exactly is the question? In general some simple bash scripting will do the trick.

1) restore relevant email files to temporary location (depends on backup software used),
2) check if restore folder does exist under user home directory (use test -d folderpathandname) and if not, create id (see maildirmake.dovecot(1)),
3) copy relevant files into new (or cur) subfolder of the restore directory,
4) notify user and do some cleanup

3

Re: Email restore process

You can always create a similar server and sync with imapsync cronjob.

To restore just sync the other way around.