summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/files
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-06-10 14:22:16 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-10 14:22:16 +0200
commitbed9bfaaa99dde6ecfb04e6a9ce98176b5ca604f (patch)
tree5900412ff9d64eeb376a79a079a2d5a0e246c010 /roles/IMAP/files
parent5c8ac82b9d990539fea1aaa6518aba5adb35ba1c (diff)
Dovecot: Collect IMAP statistics.
Diffstat (limited to 'roles/IMAP/files')
-rw-r--r--roles/IMAP/files/etc/dovecot/conf.d/10-mail.conf2
-rw-r--r--roles/IMAP/files/etc/dovecot/conf.d/10-master.conf7
-rw-r--r--roles/IMAP/files/etc/dovecot/conf.d/20-imap.conf2
-rw-r--r--roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf6
4 files changed, 15 insertions, 2 deletions
diff --git a/roles/IMAP/files/etc/dovecot/conf.d/10-mail.conf b/roles/IMAP/files/etc/dovecot/conf.d/10-mail.conf
index cc29991..902f58b 100644
--- a/roles/IMAP/files/etc/dovecot/conf.d/10-mail.conf
+++ b/roles/IMAP/files/etc/dovecot/conf.d/10-mail.conf
@@ -207,7 +207,7 @@ first_valid_uid = 1
# Space separated list of plugins to load for all services. Plugins specific to
# IMAP, LDA, etc. are added to this list in their own .conf files.
-mail_plugins = virtual zlib
+mail_plugins = stats virtual zlib
##
## Mailbox handling optimizations
diff --git a/roles/IMAP/files/etc/dovecot/conf.d/10-master.conf b/roles/IMAP/files/etc/dovecot/conf.d/10-master.conf
index 189e96e..9fcc549 100644
--- a/roles/IMAP/files/etc/dovecot/conf.d/10-master.conf
+++ b/roles/IMAP/files/etc/dovecot/conf.d/10-master.conf
@@ -129,3 +129,10 @@ service dict {
#group =
}
}
+
+service stats {
+ fifo_listener stats-mail {
+ user = vmail
+ mode = 0600
+ }
+}
diff --git a/roles/IMAP/files/etc/dovecot/conf.d/20-imap.conf b/roles/IMAP/files/etc/dovecot/conf.d/20-imap.conf
index 1807e05..016f4ff 100644
--- a/roles/IMAP/files/etc/dovecot/conf.d/20-imap.conf
+++ b/roles/IMAP/files/etc/dovecot/conf.d/20-imap.conf
@@ -53,7 +53,7 @@
protocol imap {
# Space separated list of plugins to load (default is global mail_plugins).
- #mail_plugins = $mail_plugins
+ mail_plugins = $mail_plugins imap_stats
# Maximum number of IMAP connections allowed for a user from each IP address.
# NOTE: The username is compared case-sensitively.
diff --git a/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf b/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf
index b205c20..b6fcd3b 100644
--- a/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf
+++ b/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf
@@ -22,4 +22,10 @@ plugin {
zlib_save = gz
zlib_save_level = 6
+
+
+ # how often to session statistics
+ stats_refresh = 30 secs
+ # track per-IMAP command statistics
+ stats_track_cmds = yes
}