Edition 1.0
zarafa-server's unix socket.
zarafa-dagent and zarafa-spooler are also involved to make sure all incoming and outgoing messages get archived.
DB or unix user plugin.
zarafa-archiver always has a fast local connection to the archive server.
zarafa-archiver and zarafa-archiver-extra package on RPM based distributions:
rpm -Uvh zarafa-archiver_<version>_<platform>.rpm zarafa-archiver-extra_<version>_<platform>.rpm
<version> with the correct version and <platform> with the required target platform (i386, i586, ia64, x86_64).
dpkg -i zarafa-archiver_<version>_<platform>.deb zarafa-archiver-extra_<version>_<platform>.deb
<version> with the correct version and <platform> with the required target platform (i386, ia64, x86_64).
/etc/zarafa/license directory of all your servers. Execute the following commands on every node to use the archive subscription:
echo 'Archiver code' > /etc/zarafa/license/archiverbase /etc/init.d/zarafa-licensed restart
/etc/zarafa/license directory, like normal ZCP CALs.
all server nodes, else de-stubbing will not work.
/etc/zarafa/archiver.cfg.
zarafa-archiver needs to know where to connect to and how to authenticate. This is configured using the server_socket, sslkey_file and sslkey_pass settings.
server_socket = file:///var/run/zarafa sslkey_file = /etc/zarafa/ssl/certificate.pem sslkey_pass = zarafa
zarafa-archiver uses one central MySQL database for managing deduplication of archived attachments. The MySQL settings can be configured like this:
mysql_host = localhost mysql_port = 3306 mysql_user = root mysql_password = mysql_socket = mysql_database = zarafa-archiver
zarafa-archiver.
/etc/zarafa/archiver.cfg
archive_enable = yes archive_after = 30 stub_enable = yes stub_after = 0 delete_enable = yes delete_after = 365 purge_enable = yes purge_after = 1826 cleanup_follow_purge_after = yes
archive_enable = yes setting enables the archive operation, which is essentially the copying from the primary node to the archive node. The archive_after = 30 setting causes the archive operation to be performed 30 days after the message was delivered.
stub_enable = yes setting enables the stub operation, which is essentially the operation on the primary message where the body and the attachments are removed. The stub_after = 0 setting causes the message to be stubbed 0 days after delivery but only if the message is archived. This setting could also be set to 30. Effectively this causes the messages on the primary node to be stubbed immediately after the archive operation.
stub_after to 30 if the archive on delivery feature is enabled, see Chapter 6, Configure for history preservation for more information. Setting stub_after to 0 in that case will cause all newly delivered messages to be stubbed on the first archive run.
delete_enable = yes setting enables the delete operation. The delete operation deletes messages from the primary node if they are archived. The delete_after = 365 causes the delete operation to be performed 1 year after delivery time if the message is archived.
purge_enable = yes and purge_after = 1826 options cause messages to be deleted from the archive 1826 days after they were delivered on the primary node.
cleanup_follow_purge_after is set to yes to make sure a cleanup run won’t delete items from the archive because they don’t exist in the primary store anymore.
/etc/zarafa/archiver.cfg
archive_enable = yes archive_after = 30 stub_enable = no stub_after = 0 delete_enable = yes delete_after = 0 purge_enable = no purge_after = 0 cleanup_follow_purge_after = yes
stub_enable is set to no. The stub_after setting is ignored.
delete_enable setting is still set to yes, but delete_after is now set to 0, causing the messages to be deleted immediately after they’re archived.
purge_enable = no makes sure all messages are kept in the archive forever.
/etc/zarafa/archiver.cfg
stub_unread = yes delete_unread = no
auto_attach_writable = yes
delete.
cleanup_action = delete
/etc/zarafa/dagent.cfg:
archive_on_delivery = yes
zarafa-dagent to archive each message the moment it is delivered if the store in which the message is delivered is attached to an archive. If the archive operation fails zarafa-dagent won’t deliver the message at all and return a temporary failure to the MTA.
/etc/zarafa/spooler.cfg:
archive_on_send = yes
zarafa-spooler to archive each message it sends if the primary store from which the message is send is attached to an archive. If the archive operation fails zarafa-spooler won’t send the message and creates a bounce message for the sender.
/etc/zarafa/archiver.cfg:
archive_enable = yes archive_after = 0 track_history = yes cleanup_action = store enable_auto_attach = yes
archive_enable = yes and archive_after = 0 causes the archive to archive every new message and every change on each run of the archiver.
track_history = yes setting causes the archiver to not update the archived copies of messages that were altered after they were archived but to make a new archived copy and move the old copy to another special folder in the users archive: Zarafa Archive/History.
cleanup_action = store setting changes the behavior of the cleanup operation. Instead of deleting archived copies from the archive when the primary message they reference is deleted, zarafa-archiver will move the archived copy to yet another special folder: Zarafa Archive/Deleted.
auto_attach_writable = no setting makes sure that the users don’t get write privileges on their archives. If they would have write privileges they could alter or delete messages from their archive, making the history useless.
/etc/zarafa/archiver.cfg:
stub_enable = yes stub_after = 30 stub_unread = no delete_enable = yes delete_after = 365 delete_unread = no cleanup_follow_purge_after = yes
cleanup_follow_purge_after is set to yes to make sure a cleanup run won’t delete items from the archive because they don’t exist in the primary store anymore.
zarafa-archiver can attach archive stores automatically based on user attributes stored in the LDAP or Active Directory. When using this way of attaching stores, zarafa-archiver will create genuine archive stores on the server and attaches the user stores to these archives stores based on the information found in the LDAP or Active Directory.
enable_auto_attach setting must preferably be set to yes in /etc/zarafa/archiver.cfg:
enable_auto_attach = yes
zarafa-archiver can periodically be run to perform the auto-attach operation:
zarafa-archiver --auto-attach
zarafaUserArchiveStores. This is is a multi value attribute, which needs to be set to the server name or server names of the servers that should contain an archive store for the user.
dn: uid=user,ou=users,dc=example,dc=com objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person objectClass: top objectClass: zarafa-user objectClass: posixAccount cn: User gidNumber: 0 homeDirectory: /bin/false sn: User uid: user uidNumber: 1000 givenName: User mail: user@server.com userPassword:: e1NTSEF9VzlXV0U3N1NEcW54UkJ3SFJkQUYvVkhrUj zarafaAccount: 1 zarafaUserServer: userServer zarafaUserArchiveServers: archiveServer
dn: uid=user,ou=users,dc=example,dc=com objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person objectClass: top objectClass: zarafa-user objectClass: posixAccount cn: User gidNumber: 0 homeDirectory: /bin/false sn: User uid: user uidNumber: 1000 givenName: User mail: user@server.com userPassword:: e1NTSEF9VzlXV0U3N1NEcW54UkJ3SFJkQUYvVkhrUj zarafaAccount: 1 zarafaUserServer: userServer zarafaUserArchiveServers: archiveServer zarafaUserArchiveServers: backupServer
zarafa-archiver -A with enable_auto_attach = yes or zarafa-archiver --auto-attach.
Zarafa Features tab.

archiver feature and click Properties. This will pop up the dialog in which the server names of the servers on which an archive store should exist for the selected user or users.

zarafa-archiver -A with enable_auto_attach = yes or zarafa-archiver --auto-attach.
zarafa-archiver allows one to attach archives to, detach archives from and list archives of users. A user can have more than one archive attached to allow redundant archives. In those cases these archives are usually on a different server, but that’s not mandatory.
zarafaHidden attribute to 1.

zarafa-archiver -u <user name> --attach-to <archive store>
user name to be created in the archive store. This folder is attached to the primary store for user name and used as the root of the archive, see screen shot.

-w option when attaching the store.
zarafa-archiver -u <user name> --attach-to <archive store> -w
only have access to his/her personal archive and not to the other archives.
zarafa-archiver -u <user name> --attach-to <archive store> \
--archive-name <folder name>folder name to be created in the archive store. This folder is attached to the primary store for user name and used as the root of the archive.
zarafa-archiver -u <user name> --attach-to <archive store> --no-folder
user name.
zarafa-archiver will not be able to connect to the correct archive server based on the archive store name. In this case the full path to the archive server must be specified:
zarafa-archiver -u <user name> --attach-to <archive store> \
--archive-server <full server path>http[s]://<address>:<port>/zarafa.
zarafa-archiver -u <user name> --list
zarafa-archiver -u <user name> --detach-from <archive store>
zarafa-archiver will not be able to determine which one the detach from. In that case the folder name also needs to be specified:
zarafa-archiver -u <user name> --detach-from <archive store> \
--archive-name <folder name>zarafa-archiver will reattach it on the next run.
> zarafa-archiver -u user -l
User 'user1' has 2 attached archives:
0: Store: Inbox - archive, Folder: user1-archive, Rights: [Read Only]
1: Store: Inbox - archive new, Folder: user1-archive, Rights: [Read Write]
> zarafa-archiver -u user -D 0
Successfully detached archive.
> zarafa-archiver -u user -l
User 'user1' has 2 attached archives:
0: Store: Inbox - archive new, Folder: user1-archive, Rights: [Read Write]zarafa-archiver --list-archiveusers
> zarafa-admin --details user1
Username: user1
Fullname: User 1
Emailaddress: user1@cluster.sio2
Active: yes
Administrator: no
Address book: Visible
Auto-accept meeting req:no
Home server: cnode-1
Last logon: 12/09/2011 03:41:32 PM
Last logoff: 12/09/2011 03:41:32 PM
Mapped properties:
PR_GIVEN_NAME User
PR_SURNAME One
PR_EC_ENABLED_FEATURES pop3
PR_EC_DISABLED_FEATURES imap
PR_EC_ARCHIVE_SERVERS cnode-2
Attached archives: 1
Root Folder in Archive - User 1 [Read Only]
Quota overrides: no
Warning level: unlimited
Soft level: unlimited
Hard level: unlimited
Current store size: 14.86 MiB
Groups (1):
Everyone
Archive details on node 'cnode-2':
Current store size: 114.68 MiB> zarafa-admin --details user1 --type archive --node cnode-2 Current store size: 114.68 MiB
> zarafa-admin --details archive
Username: archive
Fullname: Archive Store
Emailaddress: archive@cluster.sio2
Active: no
Administrator: no
Address book: Hidden
Auto-accept meeting req:no
Home server: cnode-2
Last logon: 12/09/2011 03:41:32 PM
Last logoff: 12/09/2011 03:41:32 PM
Mapped properties:
PR_GIVEN_NAME Archive
PR_SURNAME Archive
PR_EC_ENABLED_FEATURES pop3
PR_EC_DISABLED_FEATURES imap
Quota overrides: no
Warning level: unlimited
Soft level: unlimited
Hard level: unlimited
Current store size: 114.68 MiB
Groups (1):
Everyonetype and node arguments:
> zarafa-admin --unhook-store user1 --type archive --node cnode-2 Store unhooked.
type and node arguments:
> zarafa-admin --list-orphans --node cnode-2
Stores without users:
Store guid Guessed username Last login Store size Store type
-----------------------------------------------------------------------------------------------
F1A6BFCD67604B0FB733F746F1D00A91 user1 <unknown> 0 archive
> zarafa-admin --hook-store F1A6BFCD67604B0FB733F746F1D00A91 -u user1 --type archive --node cnode-2
Store hooked.type and node arguments:
> zarafa-admin --unhook-store user1 --type archive --node cnode-2
Store unhooked.
> zarafa-admin --list-orphans --node cnode-2
Stores without users:
Store guid Guessed username Last login Store size Store type
-----------------------------------------------------------------------------------------------
F1A6BFCD67604B0FB733F746F1D00A91 user1 <unknown> 0 archive
> zarafa-admin --remove-store F1A6BFCD67604B0FB733F746F1D00A91 --node cnode-2
Store removed.zarafa-archiver --auto-attach
zarafa-archiver -u <user name> --auto-attach
zarafa-archiver -A
--local-only option to zarafa-archiver causes it to only archive the primary stores that live on the server to which zarafa-archiver is connected. This is the server on which zarafa-archiver is executed unless otherwise configured in the configuration file.
zarafa-archiver -A --local-only
zarafa-archiver -u <user name> -A
/etc/crontab.
0 1 * * * root [ -x /usr/bin/zarafa-archiver ] && /usr/bin/zarafa-archiver -A
zarafa-archiver -C
--local-only option to zarafa-archiver causes it to only cleanup the archives of users who have a store on the server to which zarafa-archiver is connected. This is the server on which zarafa-archiver is executed unless otherwise configured in the configuration file.
zarafa-archiver -C --local-only
zarafa-archiver -u <user name> -C
/etc/crontab.
0 3 * * 0 root [ -x /usr/bin/zarafa-archiver ] && /usr/bin/zarafa-archiver -C


zarafa-archiver -u user --attach-to archive --archive-server https://archive.zarafa.com:237/zarafa
user to the store called archive on the server that can be connected to through https://archive.zarafa.com:237/zarafa.
--archive-server option is only useful in this setup.
za-aclsync Synchronizes archive ACL settings with those of the primary store.
za-aclsync can be used to propagate the ACL settings from the primary store to the archives. However, no user will ever get more right on a store or folder than the owner of the archive. So if the archive was attached without write permissions, no user will get write permissions on the archive.
za-aclsync will first determine the rights for the owner of the archive. Then it will get all the entries from the ACL of the current folder except those of the owner. Each right will be masked with the rights of the owner before being added to the ACL of the archive folder.
za-aclsync [options] [users] options: -h serverpath : Host to connect with. -s sslkey_file : SSL key file for authentication. -p sslkey_pass : Password for the SSL key file.
users is a space separated list of users for which to synchronize the ACL settings. If no user is specified all users will be processed.
za-aclset sets or updates the permissions on an archive store for the owner of that store.
za-aclset [OPTIONS] [users...]
options:
-h | --host Host to connect with. Default: file:///var/run/zarafa
Three formats are allowed for this option:
UNIX socket : file://<path to the UNIX socket>
HTTP : http://<host or IP>:<port>/zarafa
Secure HTTP : https://<host or IP>:<port>/zarafa
-s | --sslkey-file SSL key file for authentication.
-p | --sslkey-pass Password for the SSL key file.
-w | Grant write permissions on the archive.
--writable <y|n> Enable or disable write permissions.
--help Show this help message.users is a space separated list of users for which to synchronize the ACL settings. If no user is specified all users will be processed.
za-restore can be used to repopulate a primary store to a state where no archive is required to read any message. In a less cryptic way this means that all stubbed messages are destubbed and all messages that were deleted after archiving are restored.
za-restore over dragging the messages back from the archive in Outlook or Webaccess is that the restores messages are sanitized, allowing them to be properly re-archived later.
Usage: za-restore [OPTIONS] user
OPTIONS:
-h | --host : Host to connect with. Default: file:///var/run/zarafa
-s | --sslkey_file : SSL key file for authentication.
-p | --sslkey_pass : Password for the SSL key file.
-l | --log-file : Select log file.
--detach : Detach the selected or all archive stores before
starting the restore procedure. This avoids the
archiver from re archiving restored messages.
--unhook : Unhook the selected or all archive stores once
the restore process has completed. This implies
--detach and only works on archive stores.
--remove : Remove the selected or all archive stores once
the restore process has completed. This implies
--unhook and only works on archive stores.
--select-source : Select the source archive(s) by providing a comma
separated list of archive indexes. The indexes specify
which archives to restore from. The --detach, --unhook
and --remove options only apply to the selected
archives.
The archive indexes can be obtained by listing the
attached archives for a user: zarafa-archiver -u
<user> -l.
-v | --verbose : Increase console loglevel. Can be specified multiple
times.
-q | --quiet : Decrease console loglevel. Can be specified multiple
times.
-N | --dry-run : Don't actually modify anything.
--help : Show this help message./tmp/john_doe_restore.log
> za-restore --unhook -s /etc/zarafa/ssl/archiver.pem -p password \ -l /tmp/john_doe_restore.log john_doe
file:///var/run/zarafa. The sslkey_file and sslkey_pass are specified in order to connect to the other nodes in the cluster.