Email Archiving in Zimbra Collaboration Suite Open-Source Edition

Email archiving with future viewing capability is an important feature for large businesses. It can be used for addressing various complaints, conducting investigations, and in several other situations. This feature is also useful for SaaS providers to protect themselves in case a malicious user exploits their service for illegal activities.

For these purposes, the Zimbra Archiving and Discovery plugin was created, which allows archiving outgoing and incoming emails in each mailbox, as well as emails saved in drafts. However, this solution has its downsides. Firstly, it only works with the paid Zimbra Collaboration Suite Network Edition, and secondly, it operates only within the web client, meaning that it won’t archive anything when using desktop or mobile email clients. Therefore, we will discuss how to implement email archiving for incoming and outgoing mail in the free Zimbra Collaboration Suite Open-Source Edition, which will also archive emails sent from any email clients.

Email Archiving in Zimbra Collaboration Suite Open-Source Edition
Email archiving is implemented through the built-in Postfix BCC function. It works as follows: the system administrator specifies the archive email address for the mailbox, enters certain settings, after which every incoming and outgoing email will be copied to the archive email, where the needed email can subsequently be found. We recommend creating a separate domain. This will significantly simplify the management of archived mailboxes in the future.

Archiving Outgoing Emails

Email Archiving in Zimbra Collaboration Suite Open-Source Edition

Let’s set up archiving for outgoing emails. For example, we will take the account manager@company.ru and create an archive mailbox manager@archive.company.ru. To ensure that outgoing emails are archived, several changes need to be made to the Postfix settings. To do this, open the file /opt/zimbra/postfix/conf/main.cf and add the line at its end sender_bcc_maps = lmdb:/opt/zimbra/postfix/conf/sender_bcc. After that, you need to create the file /opt/zimbra/postfix/conf/sender_bcc Add the mailboxes that are to be archived as well as the mailboxes to which archive emails will be forwarded. It's possible to archive several mailboxes into one. This is done as follows:

manager@company.ru manager@archive.company.ru
sales@company.ru manager@archive.company.ru
support@company.ru support@archive.company.ru

Email Archiving in Zimbra Collaboration Suite Open-Source Edition

Once all mailboxes have been added, simply execute the command postmap /opt/zimbra/postfix/conf/sender_bcc and restart Postfix using the command postfix reload. As indicated in our example, after the restart all outgoing emails from the accounts manager@company.ru and sales@company.ru will be sent to the mailbox manager@archive.company.ru, while outgoing emails from the account support@company.ru will be archived in the mailbox support@archive.company.ru.

Archiving incoming emails

Now let's configure automatic archiving of incoming emails. For this, we can use the same Postfix BCC. Just like in the case of archiving outgoing emails, you need to open the file /opt/zimbra/postfix/conf/main.cf and add the line recipient_bcc_maps = lmdb:/opt/zimbra/postfix/conf/recipient_bcc. After that, you must create the file /opt/zimbra/postfix/conf/recipient_bcc and add the necessary email addresses in the previous format.

Email Archiving in Zimbra Collaboration Suite Open-Source Edition

After adding the mailboxes, you need to execute the command postmap /opt/zimbra/postfix/conf/recipient_bcc and restart Postfix using the command postfix reload. Now all incoming emails from the accounts manager@company.ru and sales@company.ru will be archived in the mailbox manager@archive.company.ru, and incoming emails from the account support@company.ru will be copied to the mailbox support@archive.company.ru.

Email Archiving in Zimbra Collaboration Suite Open-Source Edition
Example of setting up an incoming message filter

It is particularly important to note that whenever adding or removing email addresses from the lists /opt/zimbra/postfix/conf/sender_bcc and /opt/zimbra/postfix/conf/recipient_bcc you need to re-run the command postmap with the modified list, and also restart Postfix. We also recommend using Zimbra OSE mail filters based on the sender's and recipient's name so that incoming and outgoing messages can be organized by folders, making it easier for you to find the desired email later.

Email Archiving in Zimbra Collaboration Suite Open-Source Edition
Example of setting up an outgoing message filter

To search for emails in the created mail archives, you can later use the built-in search functionality of Zimbra OSE. It's also important to note that the retention period for emails in the archive is significantly longer than in a regular account, meaning you need to set a higher quota and a retention policy with a longer term. If your archived mailboxes are stored on a separate domain, doing this will be much easier.

The safety alphabet in Kubernetes: authentication, authorization, auditing

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster