From bed9bfaaa99dde6ecfb04e6a9ce98176b5ca604f Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 10 Jun 2015 14:22:16 +0200 Subject: Dovecot: Collect IMAP statistics. --- roles/IMAP/files/etc/dovecot/conf.d/10-mail.conf | 2 +- roles/IMAP/files/etc/dovecot/conf.d/10-master.conf | 7 +++++++ roles/IMAP/files/etc/dovecot/conf.d/20-imap.conf | 2 +- roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf | 6 ++++++ 4 files changed, 15 insertions(+), 2 deletions(-) (limited to 'roles/IMAP/files/etc') 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 } -- cgit v1.2.3