-
Notifications
You must be signed in to change notification settings - Fork 102
Archiving Mailboxes
ViMbAdmin V3 has a new feature - the archiving and deletion of mailboxes on the filesystem.
The current implementation is a first pass. Currently preservation of aliases is not supported. The archived mailbox will have its own aliases deleted permanently and, if it appears in an alias with more than one destination, it will be removed from that alias.
Archiving allows you to:
- mark a mailbox for archiving (which includes the deletion of ViMbAdmin mailbox and alias entries);
- via cron, archiving pending mailboxes by creating a bzip'd tar of the mail directory and deleting the original;
- marking an archived mailbox for restoration;
- via cron, restoring mailboxes marked for restoration;
- mark an archived mailbox for deletion;
- via cron, actually deleting archives marked for deletion.
To enable archiving, first set the configuration:
server_id = 1
;;Archive options
binary.path.chown_R = "/bin/chown -R"
binary.path.tar_cf = "/bin/tar -cf"
binary.path.tar_xf = "/bin/tar -xf"
binary.path.bzip2_q = "/bin/bzip2 -q"
binary.path.bunzip2_q = "/bin/bunzip2 -q"
binary.path.rm_rf = "/bin/rm -rf"
archive.path = "/srv/archives"
Most of the above should be self-explanatory. server_id
is for future use when your ViMbAdmin installation may be managing more than on file server.
Ensure your archives directory exists:
mkdir -p /srv/archives
Lastly, you need some cron jobs. These don't need to be executed too frequently as there is typically no panic on archiving / restoring / deleting mailboxes and archives.
10 */2 * * * $INSTALL_PATH/bin/vimbtool.php -a archive.cli-archive-pendings
30 */2 * * * $INSTALL_PATH/bin/vimbtool.php -a archive.cli-restore-pendings
50 */2 * * * $INSTALL_PATH/bin/vimbtool.php -a archive.cli-delete-pendings
where $INSTALL_PATH
is the path to where you installed ViMbAdmin.