5. Archive configuration¶
kopano-archiver
is configured in a configuration file, that can be specified on the command line using command line option --config
or -c
. When no configuration file is specified from the command line, Archiver tries to find a default configuration file named archiver.cfg
located in /etc/kopano/
. Please note that when no configuration file can be found, information required to proceed is missing. In such a case Archiver will emit an error message and exit.
Depending on user requirements, Archiver can be configured in many different ways. Five different stages in Archiving can be distinguished, of which any subset can be used. This chapter describes a basic setup. Later more advanced configurations using more complex combinations of stages will be presented.
The five stages of Archiving are:
Figure 4.1. Archiver stages
Archiving solutions have different stages to process the email data. Below the four stages of the archive process are described. The ages listed in the rightmost colums are examples only.
Every of these stages can be configured in the configuration file of the Archive Controller. Before deploying the Kopano Archiver make sure the configuration options are carefully set according to the archive strategy. The default installed configuration will only copy message items from linkes mailboxes to the archive mailboxes.
Table 4.1. Archiver stages
Stage | Description |
---|---|
No archiving | No archive store exists and no messages are archived. |
Archive copy | All messages that are eligible for archiving are copied from the primary store to the archive store. When a copy of a message is made, an internal reference to this copy is placed in the original message. |
Stubbed message | All messages that are eligible for stubbing are stubbed. A stub is defined as the original message with the body and attachments removed. A message is eligible for stubbing when it reaches the specified minimum age AND archived copies are present. So a message is never stubbed if it’s not yet copied to the archive store. |
Fully removed (Delete) | All messages and stubs that are eligible for deletion are removed from the primary store. A message is eligible for deletion when it reaches the specified minimum age AND archived copies are present. So a message is never deleted from the primary store if it’s not yet copied to the archive store. |
Archive purged | Messages that reached a specific age will be deleted completely from the archive store. In this case messages will not be available on both the primary and archive server. |
5.1. Scenarios¶
Email archiving are typically designed for two different scenarios.
- Email archiving for storage purposes
- Email archiving for keeping an email history and compliancy
Kopano Archiver can be configured for both purposes.
5.1.1. Email archiving for storage purposes¶
The volume of incoming emails is still growing at most organisations, where most mailbox quotas will not be increased. Users will organise and archive emails to pst files to keep their mailbox clean.
By implementing the Kopano Archiver all older emails can be stored on central located archive server. Where the archive database is typically stored on slower and cheaper storage. Storing the older emails on a different server will result in a smaller mailboxes of the primary server and therefore a better performant primary server. By having the archived emails stored centrally, the disadvantages of decentrally stored email archives (such as pst files) files can be eliminated:
- Local archives can not be accessed by multiple users
- Local archives, especially PST files are unmanageable by organisation (e.g. not part of backup)
- PST files have slow network performance
With the stubbing feature the user can transparently access emails from the primary mailbox, where the actual body and attachment of the emails are accessed from the archive server. With the direct connection to the archive mailboxes, users can access there archived emails which are not available as stub in the primary mailbox.
5.1.2. Email archiving for keeping an email history¶
As email is used for more and more official communication, companies want to ensure no emails are lost. Email archiving solutions for keeping email histories will automatically archive all incoming and outgoing emails. All archived emails will be stored on a central archive server and can be kept for long-term accountability.
As normally all users access to their archive mailbox, so users can still access older emails.
With the Kopano Archiver all incoming and outgoing emails can be directly archived after the send/delivery process.
The Kopano Archiver controller can still archive, stub, and cleanup primary mailboxes to reduce the size of mailboxes, however in this case the emails that were already in the archive database will not be modified.
5.2. Basic Archiver configuration¶
In a setup all stages as shown in Figure 4.1 can be configures. It should be noted, though, that not all combinations make sense. As a basic setup for Kopano Archiver, considered best practice, is a stubbing-only
configuration. In this setup all emails can be accessed from the primary store of the user. Depending on the age of the message the email will be opened on the primary server or a stub will open the item directly in the user’s archive mailbox. In this case the user doesn’t directly access his or her archive mailbox to view emails.
For a stubbing only
setup settings like the following must be configured in /etc/kopano/archiver.cfg
:
archive_enable = yes
archive_after = 90
stub_enable = yes
stub_after = 90
stub_unread = no
delete_enable = no
delete_after = 0
purge_enable = no
purge_after = 0
cleanup_action = store
cleanup_follow_purge_after = no
enable_auto_attach = yes
auto_attach_writable = no
Setting archive_enable = yes
enables archive operation, i.e. copying emails from the primary node to the archive node. Setting archive_after = 90
indicates that messages older than 90 days are to
be archived.
Setting stub_enable = yes
enables stubbing. Body and attachments messages in the primary store are removed and a reference to the archive store is created. Setting stub_after = 90
means that messages older than 90 days will be stubbed.
Unread emails are not stubbed by default. Setting stub_unread = yes
means that even unread messages are stubbed.
Settings delete_enable
and purge_enable
must be set to no
, since a user will not access his archive mailbox directly in this mode.
Setting cleanup_action = store
means that, in a cleanup run, archived messages of which stubs have been deleted from the archive mailbox will be moved to an archive folder named Kopano Archive\Deleted
. See Cleanup for an explanation of this cleanup process.
Setting enable_auto_attach = yes
means that a user automatically gets an archive mailbox when the archive server option is enabled in Active Directory or OpenLDAP. The user will always get read-only permissions, so users can delete messages from the primary mailbox only. This is required to make sure the stubs in the primary mailbox will always point to a existing message.
5.3. Archive-only setup¶
Another setup is archive-only, in which emails will exist either in the primary mailbox or in an archive mailbox. Stubbing is disabled in this mode.
For an archive-only setup the following settings need to be configured in /etc/kopano/archiver.cfg
:
archive_enable = yes
archive_after = 365
stub_enable = no
delete_enable = yes
delete_after = 365
purge_enable = yes
purge_after = 3650
enable_auto_attach = yes
auto_attach_writable = yes
To move items to the archive mailbox setting delete_enable
is set to yes
and the number of days is configured in delete_after
. In this example, items older than 1 year are deleted from the primary
mailbox and after that can only be accessed from the archive mailbox.
Setting stub_enable = no
makes sure there will be no stubs. Since there are no stubs, there is no sense in doing cleanup runs, so settings for cleanup need not be given.
To clean up the archive mailbox, items will be completely removed after 10 years.
As stubbing is not used in this mode, the archives can be set writable so users can clean up their archive mailbox themselves.
5.4. Advanced setups¶
Advanced setups are possible, but may cause some confusion initially, because some settings interfere. An example of an advanced setup is the following configuration, that resembles the setup from Figure 4.1:
archive_enable = yes
archive_after = 2
stub_enable = yes
stub_after = 60
stub_unread = no
delete_enable = yes
delete_after = 365
stub_unread = yes
purge_enable = yes
purge_after = 3650
cleanup_action = store
cleanup_follow_purge_after = yes
enable_auto_attach = yes
auto_attach_writable = no
In this example mode emails will be archived after two days as an archived copy, while the original remains in main store. After 60 days the copy from main store will be removed and replaced by a stub to the archived copy. After a year, the stub will be removed, while the copy in the archive remains.
To prevent the archive from growing forever, items will be removed after 10 years.