diff --git a/docs/core/config/shared_mailboxes.md b/docs/core/config/shared_mailboxes.md index 8afb25789..bfe05ae6e 100644 --- a/docs/core/config/shared_mailboxes.md +++ b/docs/core/config/shared_mailboxes.md @@ -380,7 +380,29 @@ dict_server { password = sqlpass } } - !include /etc/dovecot/dovecot-dict-sql.conf.inc + + dict_map shared/shared-boxes/user/$to/$from { + sql_table = user_shares + value_field dummy { + } + + key_field from_user { + value = $from + } + key_field to_user { + value = $to + } + } + + dict_map shared/shared-boxes/anyone/$from { + sql_table = anyone_shares + value_field dummy { + } + + key_field from_user { + value = $from + } + } } } ``` @@ -405,32 +427,6 @@ CREATE TABLE anyone_shares ( COMMENT ON TABLE anyone_shares IS 'User from_user shares folders to anyone.'; ``` -```[/etc/dovecot/dovecot-dict-sql.conf.inc] -dict_map shared/shared-boxes/user/$to/$from { - sql_table = user_shares - value_field dummy { - } - - key_field from_user { - pattern = $from - } - key_field to_user { - pattern = $to - } -} - -dict_map shared/shared-boxes/anyone/$from { - sql_table = anyone_shares - value_field dummy { - } - - key_field from_user { - pattern = $from - } -} -``` -::: - ### Mailbox Sharing You can use [[doveadm,acl]] to share mailboxes, or it can be done using diff --git a/docs/core/plugins/quota_clone.md b/docs/core/plugins/quota_clone.md index 02084b0e9..cda90f6e8 100644 --- a/docs/core/plugins/quota_clone.md +++ b/docs/core/plugins/quota_clone.md @@ -65,7 +65,20 @@ dict_server { dict mysql { driver = sql sql_driver = mysql - !include /etc/dovecot/dovecot-dict-sql.conf.inc + + dict_map priv/quota/messages { + sql_table = quota + username_field = username + value_field messages { + } + } + + dict_map priv/quota/storage { + sql_table = quota + username_field = username + value_field bytes { + } + } } } diff --git a/docs/core/recommended_metrics.md b/docs/core/recommended_metrics.md new file mode 100644 index 000000000..30335e362 --- /dev/null +++ b/docs/core/recommended_metrics.md @@ -0,0 +1,25 @@ +--- +layout: doc +title: Recommended Metrics +order: 101 +dovecotlinks: + recommended_metrics: Recommended Metrics + recommended_metrics_dovecot_proxy: + hash: dovecot-proxy + text: Dovecot Proxy + recommended_metrics_dovecot_backend: + hash: dovecot-backend + text: Dovecot Backend +--- + +# Recommended Metrics + + + +## Dovecot Proxy + + + +## Dovecot Backend + + diff --git a/docs/core/recommended_metrics_include/backend.inc b/docs/core/recommended_metrics_include/backend.inc new file mode 100644 index 000000000..ff783a4c1 --- /dev/null +++ b/docs/core/recommended_metrics_include/backend.inc @@ -0,0 +1,36 @@ +### Generic authentication metrics + +`@metric_defaults = backend` contains: + +`auth_successes` +: Number of successful authentications. See [[event,auth_request_finished]]. + +`auth_failures` +: Number of unsuccessful authentications. See [[event,auth_request_finished]]. + These are not usually expected to happen in backends. It may be useful to + export these events into log: + ```[dovecot.conf] + metric auth_failures { + exporter = log-export + } + ``` + +### Basic mail access and delivery metrics + +`@metric_defaults = backend` contains: + +`imap_commands` +: Number of IMAP commands, grouped by OK/NO/BAD tagged reply. + See [[event,imap_command_finished]]. + +`mail_deliveries` +: Number of mails delivered. See [[event,mail_delivery_finished]]. + +`mail_submissions` +: Number of mails submitted for outside delivery (e.g. rejects, vacations). + See [[event,smtp_submit_finished]]. + +`mail_user_session_finished` +: Number of mail sessions, including their RSS memory usage and user space + CPU usage at the time when the session was finished. See + [[event,mail_user_session_finished]]. diff --git a/docs/core/recommended_metrics_include/header.inc b/docs/core/recommended_metrics_include/header.inc new file mode 100644 index 000000000..7e71928e6 --- /dev/null +++ b/docs/core/recommended_metrics_include/header.inc @@ -0,0 +1,15 @@ +This page lists recommended metrics that allow inspecting dovecot's behavior in +the most general situations. More specialized situations might require further +refinements or additional statistics. For an overview of how to gather +statistics see [[link,stats]]. A list of all available events and their fields +can be found [[link,summary_events,here]]. + +The following examples use the custom `log-export` exporter. + +```[dovecot.conf] +event_exporter log-export { + format = json + format_args = time-rfc3339 + transport = log +} +``` diff --git a/docs/core/recommended_metrics_include/proxy.inc b/docs/core/recommended_metrics_include/proxy.inc new file mode 100644 index 000000000..c113b7167 --- /dev/null +++ b/docs/core/recommended_metrics_include/proxy.inc @@ -0,0 +1,16 @@ +`@metric_defaults = proxy` contains: + +`auth_successes` +: Number of successful authentications. See [[event,auth_request_finished]]. + +`auth_failures` +: Number of unsuccessful authentications. See [[event,auth_request_finished]]. + It may be useful to export these events into log: + ```[dovecot.conf] + metric auth_failures { + exporter = log-export + } + ``` + +`login_aborted` +: Number of aborted logins, grouped by reason. See [[event,login_aborted]].