Compliance configuration settings¶
Available on Enterprise plans
Cloud and self-hosted deployments
Review and manage the following compliance configuration options in the System Console by selecting the Product menu, selecting System Console, and then selecting Compliance:
Tip
System admins managing a self-hosted Mattermost deployment can edit the config.json file as described in the following tables. Each configuration value below includes a JSON path to access the value programmatically in the config.json file using a JSON-aware tool. For example, the MessageRetentionHours value is under DataRetentionSettings.
If using a tool such as jq, you’d enter:
cat config/config.json | jq '.DataRetentionSettings.MessageRetentionHours'When working with the
config.jsonfile manually, look for an object such asDataRetentionSettings, then within that object, find the keyMessageRetentionHours.
Data retention policies¶
Available on Enterprise plans
Cloud and self-hosted deployments
Changes to properties in this section require a server restart before taking effect.
Warning
Once a message or a file is deleted, the action is irreversible. Please set up a custom data retention policy with care.
From Mattermost v9.5, data retention removes Elasticsearch indexes based on the day of the retention cut-off time.
Access the following configuration settings in the System Console by going to Compliance > Data Retention Policies.
Global retention policy for messages¶
Set how long Mattermost keeps messages across all teams and channels. This setting doesn’t apply to custom retention policies. By default, messages are kept forever. If Hours, Days, or Years is chosen, set how many hours, days, or years messages are kept in Mattermost. Messages older than the duration you set will be deleted nightly. The default is 0 (messages are kept forever). The minimum message retention is 1 hour. |
|
Note
From Mattermost v9.5, MessageRetentionDays has been deprecated in favor of MessageRetentionHours. See deprecated configuration settings for details.
Global retention policy for files¶
Set how long Mattermost keeps files across all teams and channels. This setting doesn’t apply to custom retention policies. By default, files are kept forever. If Hours, Days, or Years is chosen, set how many hours, days, or years files are kept in Mattermost. Files older than the duration you set will be deleted nightly. The default is 0 (files kept forever). The minimum file retention time is 1 hour. |
|
Note
From Mattermost v9.5, FileRetentionDays has been deprecated in favor of FileRetentionHours. See deprecated configuration settings for details.
Preserve pinned posts¶
From Mattermost v10.10, controls whether pinned posts are preserved when data retention policies delete messages. When enabled, pinned posts won’t be deleted by data retention policies, even if they exceed the configured retention period.
True: Pinned posts are preserved and won’t be deleted by data retention policies.
False: (Default) Pinned posts are deleted according to the configured data retention policy.
This feature’s |
Note
This global configuration setting must be enabled with mmctl using the mmctl config set command.
This configuration setting applies to team and channel policies as well as data retention, and can’t be overridden in those more granular team or channel policies.
Files attached to the pinned message aren’t preserved.
Only the pinned post is preserved. If it’s attached to a thread or if it’s the root post of a thread, the other threaded messages aren’t preserved.
Custom retention policy¶
Select Add Policy to define a custom retention policy. See the custom data retention policy documentation for details.
Data deletion time¶
Set the start time of the daily scheduled data retention job.
Choose a time when fewer people are using your system. Must
be a 24-hour time stamp in the form This setting is based on the local time of the server. Default is 02:00. |
|
Run deletion job now¶
Select Run Deletion Job Now to start a Data Retention deletion job immediately. Monitor the status of the job in the data deletion job table within the Policy Log section.
Compliance export¶
Available on Enterprise plans
Cloud and self-hosted deployments
Access the following configuration settings in the System Console by going to Compliance > Compliance Export.
Enable compliance export¶
|
|
Compliance export time¶
Set the start time of the daily scheduled compliance export
job. Choose a time when fewer people are using your system.
Must be a 24-hour time stamp in the form This setting is based on the local time of the server. Default is 01:00. |
|
Export file format¶
File format of the compliance export. Corresponds to the system that you want to import the data into. Currently supported formats are CSV, Actiance XML, and Global Relay EML. |
|
Global Relay customer account¶
Type of Global Relay customer account your organization has. Can be one of: A9/Type 9, A10/Type 10, or Custom. Default is A9. |
|
Global Relay SMTP username¶
The username for authenticating to the Global Relay SMTP server. String input. Default is an empty string. |
|
Global Relay SMTP password¶
The password associated with the Global Relay SMTP username. String input. Default is an empty string. |
|
Global Relay email address¶
The email address your Global Relay server monitors for incoming compliance exports. String input. Default is an empty string. |
|
SMTP server name¶
The SMTP server name URL that will receive your Global Relay EML file when a custom account type is configured. String input. Default is an empty string. |
|
SMTP server port¶
The SMTP server port that will receive your Global Relay EML file when a custom account type is configured. Numerical input. Default is 25. |
|
Message export batch size¶
Note
Available only on Enterprise plans
Determines how many new messages are batched together to a compliance export file. Numerical input. Default is 10000 messages. |
|
Note
This setting isn’t available in the System Console and can only be set in config.json.
Run compliance export job now¶
Select Run Compliance Export Job Now to start a compliance export job immediately. Monitor the status of the job in the compliance export job table.
Compliance monitoring¶
Available on Enterprise plans
Cloud and self-hosted deployments
Settings to enable and configure Mattermost compliance reports. Access the following configuration settings in the System Console by going to Compliance > Compliance Monitoring.
Enable compliance reporting¶
|
|
Compliance report directory¶
Sets the directory where compliance reports are written. String input. Default is ./data/ |
|
Enable daily report¶
|
|
Batch size¶
Set the size of the batches in which messages will be read from the database to generate the compliance report. Numerical input. Default is 30000 messages. |
|
Note
This setting isn’t available in the System Console and can only be set in config.json.
Custom terms of service¶
Available on Enterprise plans
Cloud and self-hosted deployments
Access the following configuration settings in the System Console by going to Compliance > Custom Terms of Service.
Enable custom terms of service¶
|
|
Note
This configuration setting can only be managed using the System Console user interface. It can’t be set in
config.jsonor through environment variables.When custom terms of service are enabled, users must accept the terms before they can access Mattermost teams after login or page refresh.
To update the Terms of Service link displayed in account creation and login pages, go to System Console > Legal and Support > Terms of Service Link.
Custom terms of service text¶
Text that will appear in your custom Terms of Service. Supports Markdown-formatted text. Text input. |
|
Re-acceptance period¶
The number of days before Terms of Service acceptance expires, and the terms must be re-accepted. Numerical input. Default is 365 days, and 0 indicates that the terms don’t expire. |
|