엮음 7.1
DB
or unix
user plugin.
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
, 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
, 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, otherwise de-stubbing will not work.
/etc/zarafa/archiver.cfg
. If the default configuration file is not found, Archiver will try to work with default configuration settings, which will most probably fail. Archiver will display an error message like "Unable to open admin session on server https://192.168.1.10:237/zarafa" and close.
--config
. When such a configuration file is specified and cannot be found, Archiver will emit an error message like: "Unable to open configuration file /tmp/test.cfg" and close.
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/client.pem sslkey_pass = secret
zarafa-archiver
uses one central MySQL database for managing deduplication of archived attachments. MySQL settings can be configured like this:
mysql_host = localhost mysql_port = 3306 mysql_user = zarafa mysql_password = password mysql_socket = mysql_database = archiver
zarafa-server
is using and needs to be accessible over the network from each server running the zarafa-archiver
command.
zarafa-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/zarafa/
. 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.
Stage | Description |
---|---|
No Archiving
|
No archive store exists and no messages are archived.
|
Archive copy
|
A message exist in both main store and archive store.
|
Stubbed message
|
A message exists in archive store and a stub referring to the archived message exists in main store.
|
Fully removed
|
A message exists only in archive store.
|
Archive purged
|
A message has been removed from both main store and archive store. It no longer exists, but may be present in a backup and restored from there.
|
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.
stubbing only
setup settings like the following must be configured in /etc/zarafa/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
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.
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.
stub_unread = yes
means that even unread messages are stubbed.
delete_enable
and purge_enable
must be set to no
, since a user will not access his archive mailbox directly in this mode.
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 Zarafa Archive\Deleted
. See chapter 6.2절. “Cleanup” for an explanation of this cleanup process.
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.
/etc/zarafa/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
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.
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.
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
Zarafa-archiver
can attach archive stores automatically, based on user attributes stored in LDAP or in Active Directory. When using this way of attaching stores, zarafa-archiver will create archive stores on the archive server and attach the user stores to these archive stores based on information found in LDAP or in Active Directory. When using this method of attaching and detaching, Outlook and Webaccess will load archive stores automatically.
enable_auto_attach
must be set to yes
in /etc/zarafa/archiver.cfg
:
enable_auto_attach = yes
zarafa-archiver
can be run periodically to perform the auto-attach operation:
zarafa-archiver --auto-attach
zarafaUserArchiveStores
needs to be modified. This is a multi-value attribute, which needs to be set for the server name or server names of the servers that 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
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
in its configuration file or by running zarafa-archiver --auto-attach
.
zarafa-archiver -u <user name> --list
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): Everyone
type
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 -A
--local-only
to zarafa-archiver
tells it to archive only the primary stores that live on the server to which zarafa-archiver is connected. Unless configured otherwise in the configuration file, this is the server on which zarafa-archiver is run:
zarafa-archiver -A --local-only
zarafa-archiver
for a specific user use the -u option:
zarafa-archiver -u <user name> -A
/etc/crontab
:
0 1 * * * root [ -x /usr/bin/zarafa-archiver ] && /usr/bin/zarafa-archiver -A
zarafa-archiver
performs a cleanup run in which it encounters messages that exist in an archive and for which in main store a stub used to present which has now been deleted, it will remove the message from the archive. This is useful to avoid the situation that archived messages exist which have properties set that indicate that they are stubbed, while no corresponding stub exists in main(store.)
delete
. In this case messages for which no stubs exist will be removed from the archive.
store
. In this case messages for which no stubs exist will be moved to a folder named Zarafa Archive\Deleted
.
purge_soft_deleted
must be set to yes
. See chapter 10.1. Softdelete restore in the The Administrator Manual for more information on soft deleted items.
zarafa-archiver -C
--local-only
to zarafa-archiver
causes it to cleanup only 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
za-aclsync
synchronises archive ACL settings with those of the primary store.
za-aclsync
will first determine the rights of the owner of the archive. After that 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 to. -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 permissions on an archive store for the owner of that store.
za-aclset [OPTIONS] [users...] options: -h | --host Host to connect to. 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
is a utility that restores archived messages from an archive. Use za-restore
to destub all stubbed messages and restore all messages that were deleted after archiving. Do not drag and drop messages back from an archive to a main store in Outlook or Webaccess. Using za-restore
ensures that restored messages are sanitised, so that they can be re-archived properly later.
Usage: za-restore [OPTIONS] user OPTIONS: -h | --host : Host to connect to. 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 : Specify log file. --detach : Detach the selected or all archive stores before starting the restore procedure. This avoids the Archiver from rearchiving 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.
--help
.
Option | Alternative | Type | Meaning and usage |
---|---|---|---|
-u <name>
|
|
string
|
Select the archive of user <name>.
|
-l
|
--list
|
n/a
|
List archives for a specified user.
|
-L
|
--list-archiveusers
|
n/a
|
List users that have an archive attached.
|
-A
|
--archive
|
n/a
|
Perform archive operation. If no user is specified all user stores will be archived.
|
-C
|
--cleanup
|
n/a
|
Perform a cleanup of the archive stores attached to the user specified with
-u . If no user is specified, all archives are cleaned up.
|
|
--local-only
|
n/a
|
Archive or cleanup only those users that have their store on the server on which the archiver is invoked.
|
-a
|
--attach-to <archive store>
|
n/a
|
Attach an archive to the specified user. By default a subfolder will be created with the same name as the specified user. This folder will be the root of the archive.
|
-d
|
--detach-from <archive store>
|
n/a
|
Detach an archive from the specified user. If a user has multiple archives in the same archive store, the folder needs to be specified with --archive-folder.
|
-D
|
--detach <archive no>
|
n/a
|
Detach the archive specified by <archive no>. This number can be found by running
zarafa-archiver -l
|
|
--auto-attach
|
n/a
|
When no user is specified with
-u , all users will have their archives attached or detached based on the LDAP/ADS settings. When a user is specified only that user’s store will be processed. This option can be combined with -A/--archive to force an auto-attach run regardless of the enable_auto_attach configuration option.
|
-f
|
--archive-folder <name>
|
string
|
Specify an alternate name for the subfolder that acts as the root of the archive.
|
-s
|
--archive-server <path>
|
string
|
Specify the server on which the archive resides.
|
-N
|
--no-folder
|
n/a
|
Don’t use a subfolder that acts as the root of the archive. This implies that only one archive can be made in the specified archive store.
|
-w
|
|
|
Grant write permissions on the archive. This will override the
auto_attach_writable config option.
|
|
--writable
|
yes/no
|
Enable or disable write permissions. This will override the
auto_attach_writable config option.
|
-c
|
--config
|
string
|
Use alternate config file.
|
|
--help
|
n/a
|
Show a help message.
|
yes
in column Required aren’t specified Archiver prints an error message and quits execution.
Setting | Type | Default | Required | Meaning and usage |
---|---|---|---|---|
server_socket
|
string
|
|
Yes
|
Location of server unix socket.
|
archive_enable
|
yes/no
|
yes
|
No
|
Setting this to
no disables archiving.
|
archive_after
|
integer
|
30
|
No
|
Archive messages older than this number of days.
|
stub_enable
|
yes/no
|
no
|
No
|
Enables or disables stubbing.
|
stub_unread
|
yes/no
|
no
|
No
|
Enables or disables stubbing of unread messages.
|
stub_after
|
integer
|
0
|
No
|
Stub messages older than this number of days. When
archive_after has a larger value than this setting, archive_after is used instead.
|
delete_enable
|
yes/no
|
no
|
No
|
Delete archived messages from the main store. Only archived messages can be deleted. Note that if this option is set to
yes , no stubbing is performed.
|
delete_unread
|
yes/no
|
no
|
No
|
Enables or disables deleting unread archived messages from the main store.
|
delete_after
|
integer
|
0
|
No
|
Delete messages older than this number of days. When
archive_after has a larger value than this setting, archive_after is used instead.
|
purge_enable
|
yes/no
|
no
|
No
|
Enables or disables purging of messages in the archive server(s).
|
purge_after
|
integer
|
2555 (7 years)
|
No
|
Purge messages older than this number of days. When
archive_after has a larger value than this setting, archive_after is used instead.
|
cleanup_action
|
string
|
store
|
No
|
Specify what action should be taken on archive messages whose primary message has been deleted. Possible options are:
store : the archived message in a special folder named Zarafa Archive\Deleted ; delete , delete the archived messages.
|
cleanup_follow_purge_after
|
yes/no
|
no
|
No
|
Specify that items that are cleaned up from the archive are at least the age that is specified in setting
purge_after . This is to avoid messages being deleted from the archive when they were deleted from the primary store by a delete operation. Note that setting this to yes will cause a cleanup run to seemingly do nothing. A rule of thumb is to set this to the same value as delete_enable . So when delete_enable is set to yes , make sure cleanup_follow_purge_after is also set to yes .
|
enable_auto_attach
|
yes/no
|
no
|
No
|
Specify whether on each archive run an auto-attach run is performed in order to match the attached archives to the requested state as specified in LDAP or ADS.
|
auto_attach_writable
|
yes/no
|
yes
|
No
|
Specify whether an auto attached archive will be granted write permissions for the user the arcive is attached to.
|
purge_soft_deleted
|
yes/no
|
no
|
No
|
Specify whether archiver must purge soft-deleted items before a clean-up run
|
log_method
|
string
|
file
|
No
|
Logging method, either
syslog of file .
|
log_file
|
string
|
-
|
No
|
File name of log file when
log_method = file , use "-" for stderr
|
log_level
|
integer
|
2
|
No
|
Log level (0 = no logging, 5 = full logging)
|
log_timestamp
|
integer
|
1
|
No
|
Log timestamp - prefix each log line with timestamp in file logging mode.
|
sslkey_file
|
string
|
|
Yes
|
Log in to Zarafa server using this SSL Key.
|
sslkey_pass
|
string
|
|
Yes
|
Password of SSL Key.
|
pid_file
|
string
|
/var/run/zarafa-archiver.pid
|
No
|
Name of control pid file.
|
mysql_host
|
string
|
localhost
|
No
|
MySQL hostname to connect to for database access.
|
mysql_port
|
string
|
3306
|
No
|
MySQL port to connect with (usually 3306).
|
mysql_user
|
string
|
root
|
No
|
Name of the user with which to connect to MySQL.
|
mysql_password
|
string
|
|
No
|
The password for
mysql_user (leave empty for no password).
|
mysql_socket
|
string
|
|
No
|
Override the default MySQL socket to access mysql locally. Works only if the
mysql_host value is empty or localhost .
|
mysql_database
|
string
|
zarafa-archiver
|
No
|
Database to connect to.
|