Working with Zimbra TGZ Files

Contents
[ ]

TGZ is the archive format that Zimbra Collaboration Suite uses to export and back up mailbox data. A .tgz file is a tar archive compressed with gzip: the tar part preserves the mailbox folder structure, and the gzip part compresses it so the backup is small and easy to move between systems. Inside the archive, each mail item is stored as an individual message together with the path of the folder it belongs to, which makes TGZ a convenient format for archiving and migrating Zimbra mailboxes.

Aspose.Email for .NET provides the Aspose.Email.Storage.Zimbra namespace, which lets you read a Zimbra TGZ backup, traverse its items, and export or migrate its content without a Zimbra server. The main type you will use is:

  • TgzReader - the mailbox items reader of a Zimbra TGZ storage. It opens a TGZ file from a path or a stream, iterates over the stored items, and exposes the current folder and message through the CurrentDirectory and CurrentMessage properties.

This section covers the following topics: