Dovecot Stats Plugin
Hello again everyone! I am trying to get the “doveadm stats dump” command to work and even though it does not error, there are no stats. When I try to enable the stats, I get the following error: “Error: Plugin 'stats' not found from directory /usr/lib/dovecot/modules” which is correct, the “stats” plugin does not exist. I do have “/usr/lib/dovecot/stats”. Here’s my configuration:
Dovecot Version: 2.3.16
Operating System: Ubuntu 22.04.1
Packages Installed:
dovecot-antispam
dovecot-core
dovecot-imapd
dovecot-lmtpd
dovecot-mysql
dovecot-pop3d
dovecot-sieve
Packages Available:
dovecot-auth-lua
dovecot-dev
dovecot-fts-xapian
dovecot-gssapi
dovecot-ldap
dovecot-lucene
dovecot-managesieved
dovecot-pgsql
dovecot-solr
dovecot-sqlite
dovecot-submissiond
Dovecot Configuration (without stats enabled):
# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.16 (09c29328)
# OS: Linux 6.5.0-1020-aws x86_64 Ubuntu 22.04.4 LTS nfs4
# Hostname: ec2-us-east-1a-arda-mail-001.ardaemail.com
auth_mechanisms = plain login
auth_worker_max_count = 5
base_dir = /var/run/dovecot
debug_log_path = /var/log/dovecot/debug.log
default_internal_group = ardaemail
default_internal_user = ardaemail
dict {
quota = mysql:/etc/dovecot/inc.d/inc.quota.user.sql.conf
}
hostname = = mail.ardaemail.com
info_log_path = /var/log/dovecot/info.log
instance_name = ec2-us-east-1a-arda-mail-001.ardaemail.com
listen = 172.16.0.200
log_path = /var/log/dovecot/general.log
login_greeting = Welcome to ArdaEmail
mail_gid = ardaemail
mail_location = maildir:/mnt/mail/%d/%n
mail_max_userip_connections = 1000
mail_plugins = " quota mailbox_alias"
mail_uid = ardaemail
maildir_stat_dirs = yes
namespace inbox {
inbox = yes
location =
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox Drafts {
auto = no
special_use = \Drafts
}
mailbox Junk {
auto = no
autoexpunge = 90 days
special_use = \Junk
}
mailbox SPAM {
auto = subscribe
autoexpunge = 90 days
}
mailbox Sent {
auto = no
special_use = \Sent
}
mailbox Trash {
auto = no
autoexpunge = 30 days
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/inc.d/inc.sql.conf
driver = sql
}
plugin {
imapsieve_mailbox1_before = file:/etc/dovecot/sieve.d/spam/learn-spam.sieve
imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_name = Junk
imapsieve_mailbox2_before = file:/etc/dovecot/sieve.d/spam/learn-ham.sieve
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_name = *
mailbox_alias_new = Junk Email
mailbox_alias_new2 = Junk E-mail
mailbox_alias_new3 = Sent Messages
mailbox_alias_new4 = Sent Items
mailbox_alias_new5 = Deleted Items
mailbox_alias_old = Junk
mailbox_alias_old2 = Junk
mailbox_alias_old3 = Sent
mailbox_alias_old4 = Sent
mailbox_alias_old5 = Trash
quota = dict:User Quota::proxy::quota
quota_exceeded_message = Mailbox is full and cannot receive any more emails
quota_status_nouser = DUNNO
quota_status_success = DUNNO
quota_warning = bytes=95%% quota-warning 95 %u
quota_warning2 = bytes=85%% quota-warning 85 %u
quota_warning3 = bytes=75%% quota-warning 75 %u
recipient_delimiter = +
sieve_after = /etc/dovecot/sieve.d/after/
sieve_before = /etc/dovecot/sieve.d/before/
sieve_extensions = +spamtest +spamtestplus +virustest +notify +imapflags
sieve_global_extensions = +vnd.dovecot.pipe
sieve_pipe_bin_dir = /etc/dovecot/sieve
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_quota_max_storage = 0
sieve_spamtest_max_header = X-Spamd-Result: -?[[:digit:]]+\.[[:digit:]]+ / (-?[[:digit:]]+\.[[:digit:]])
sieve_spamtest_status_header = X-Spamd-Result: (-?[[:digit:]]+\.[[:digit:]]+) / -?[[:digit:]]+\.[[:digit:]]
sieve_spamtest_status_type = score
}
postmaster_address = postmaster@ardaemail.com
protocols = imap lmtp
service auth-worker {
group = ardaemail
user = ardaemail
}
service auth {
group = ardaemail
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
group = ardaemail
mode = 0666
user = ardaemail
}
user = ardaemail
}
service imap-login {
inet_listener imap {
port = 0
}
inet_listener imaps {
port = 993
ssl = yes
}
process_min_avail = 8
service_count = 0
}
service imap {
vsz_limit = 4 G
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0666
user = postfix
}
}
service pop3-login {
inet_listener pop3 {
port = 0
}
inet_listener pop3s {
port = 0
}
}
service quota-status {
executable = /usr/lib/dovecot/quota-status -p postfix
unix_listener /var/spool/postfix/private/quota-status {
user = postfix
}
}
service quota-warning {
executable = script /etc/dovecot/bin/quota-warning.sh
unix_listener quota-warning {
group = ardaemail
mode = 0666
user = ardaemail
}
}
service submission-login {
inet_listener submission {
port = 0
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/mail.ardaemail.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
args = /etc/dovecot/inc.d/inc.sql.conf
driver = sql
}
protocol imap {
mail_plugins = " quota mailbox_alias imap_sieve imap_quota"
}
protocol lmtp {
mail_plugins = " quota mailbox_alias sieve"
}
The “stats” plugin does not seem to be found anywhere from my searching. Any help is greatly appreciated. I would like to be able to turn on the INET listener to hit the stats via an HTTP request.
Thank you!
Please see https://doc.dovecot.org/configuration_manual/stats/ how to configure 2.3 stats. Aki On 08/06/2024 00:28 EEST Adam Miller via dovecot <dovecot@dovecot.org> wrote: Hello again everyone! I am trying to get the “doveadm stats dump” command to work and even though it does not error, there are no stats. When I try to enable the stats, I get the following error: “Error: Plugin 'stats' not found from directory /usr/lib/dovecot/ modules” which is correct, the “stats” plugin does not exist. I do have “/usr/lib/dovecot/stats”. Here’s my configuration: Dovecot Version: 2.3.16 Operating System: Ubuntu 22.04.1 Packages Installed: - dovecot-antispam - dovecot-core - dovecot-imapd - dovecot-lmtpd - dovecot-mysql - dovecot-pop3d - dovecot-sieve Packages Available: - dovecot-auth-lua - dovecot-dev - dovecot-fts-xapian - dovecot-gssapi - dovecot-ldap - dovecot-lucene - dovecot-managesieved - dovecot-pgsql - dovecot-solr - dovecot-sqlite - dovecot-submissiond Dovecot Configuration (without stats enabled): # 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.16 (09c29328) # OS: Linux 6.5.0-1020-aws x86_64 Ubuntu 22.04.4 LTS nfs4 # Hostname: ec2-us-east-1a-arda-mail-001.ardaemail.com auth_mechanisms = plain login auth_worker_max_count = 5 base_dir = /var/run/dovecot debug_log_path = /var/log/dovecot/debug.log default_internal_group = ardaemail default_internal_user = ardaemail dict { quota = mysql:/etc/dovecot/inc.d/inc.quota.user.sql.conf } hostname = = mail.ardaemail.com info_log_path = /var/log/dovecot/info.log instance_name = ec2-us-east-1a-arda-mail-001.ardaemail.com listen = 172.16.0.200 log_path = /var/log/dovecot/general.log login_greeting = Welcome to ArdaEmail mail_gid = ardaemail mail_location = maildir:/mnt/mail/%d/%n mail_max_userip_connections = 1000 mail_plugins = " quota mailbox_alias" mail_uid = ardaemail maildir_stat_dirs = yes namespace inbox { inbox = yes location = mailbox Archive { auto = subscribe special_use = \Archive } mailbox Drafts { auto = no special_use = \Drafts } mailbox Junk { auto = no autoexpunge = 90 days special_use = \Junk } mailbox SPAM { auto = subscribe autoexpunge = 90 days } mailbox Sent { auto = no special_use = \Sent } mailbox Trash { auto = no autoexpunge = 30 days special_use = \Trash } prefix = } passdb { args = /etc/dovecot/inc.d/inc.sql.conf driver = sql } plugin { imapsieve_mailbox1_before = file:/etc/dovecot/sieve.d/spam/learn- spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/etc/dovecot/sieve.d/spam/learn- ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = * mailbox_alias_new = Junk Email mailbox_alias_new2 = Junk E-mail mailbox_alias_new3 = Sent Messages mailbox_alias_new4 = Sent Items mailbox_alias_new5 = Deleted Items mailbox_alias_old = Junk mailbox_alias_old2 = Junk mailbox_alias_old3 = Sent mailbox_alias_old4 = Sent mailbox_alias_old5 = Trash quota = dict:User Quota::proxy::quota quota_exceeded_message = Mailbox is full and cannot receive any more emails quota_status_nouser = DUNNO quota_status_success = DUNNO quota_warning = bytes=95%% quota-warning 95 %u quota_warning2 = bytes=85%% quota-warning 85 %u quota_warning3 = bytes=75%% quota-warning 75 %u recipient_delimiter = + sieve_after = /etc/dovecot/sieve.d/after/ sieve_before = /etc/dovecot/sieve.d/before/ sieve_extensions = +spamtest +spamtestplus +virustest +notify +imapflags sieve_global_extensions = +vnd.dovecot.pipe sieve_pipe_bin_dir = /etc/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms sieve_quota_max_storage = 0 sieve_spamtest_max_header = X-Spamd-Result: -?[[:digit:]]+\.[[: digit:]]+ / (-?[[:digit:]]+\.[[:digit:]]) sieve_spamtest_status_header = X-Spamd-Result: (-?[[:digit:]]+\.[[: digit:]]+) / -?[[:digit:]]+\.[[:digit:]] sieve_spamtest_status_type = score } postmaster_address = postmaster@ardaemail.com protocols = imap lmtp service auth-worker { group = ardaemail user = ardaemail } service auth { group = ardaemail unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener auth-userdb { group = ardaemail mode = 0666 user = ardaemail } user = ardaemail } service imap-login { inet_listener imap { port = 0 } inet_listener imaps { port = 993 ssl = yes } process_min_avail = 8 service_count = 0 } service imap { vsz_limit = 4 G } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0666 user = postfix } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 0 } } service quota-status { executable = /usr/lib/dovecot/quota-status -p postfix unix_listener /var/spool/postfix/private/quota-status { user = postfix } } service quota-warning { executable = script /etc/dovecot/bin/quota-warning.sh unix_listener quota-warning { group = ardaemail mode = 0666 user = ardaemail } } service submission-login { inet_listener submission { port = 0 } } ssl = required ssl_cert = </etc/letsencrypt/live/mail.ardaemail.com/fullchain.pem ssl_client_ca_dir = /etc/ssl/certs ssl_dh = # hidden, use -P to show it ssl_key = # hidden, use -P to show it ssl_prefer_server_ciphers = yes userdb { args = /etc/dovecot/inc.d/inc.sql.conf driver = sql } protocol imap { mail_plugins = " quota mailbox_alias imap_sieve imap_quota" } protocol lmtp { mail_plugins = " quota mailbox_alias sieve" } The “stats” plugin does not seem to be found anywhere from my searching. Any help is greatly appreciated. I would like to be able to turn on the INET listener to hit the stats via an HTTP request. Thank you! _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Hi,
i have the exact same problem, i configured everything as said in the documentation, but the output is always 0
metric client_connections { filter = event=client_connection_finished }
metric auth_success { filter = (event=auth_request_finished AND success=yes) }
metric mail_delivery { filter = event=mail_delivery_finished }
doveadm stats dump metric_name field count sum min max avg median stddev %95 client_connections duration 0 0 0 0 0.00 0 0.00 0 auth_success duration 0 0 0 0 0.00 0 0.00 0 mail_delivery duration 0 0 0 0 0.00 0 0.00 0
do i have to enable stats in mail_plugins? I thought this is only the case if i would want to use the old stats module, but even when i enable it, it doesnt work:
doveadm stats dump Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Dovecot version 2.3.18 (Ubuntu)
On 23/07/2024 16:34 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi,
i have the exact same problem, i configured everything as said in the documentation, but the output is always 0
metric client_connections { filter = event=client_connection_finished }
metric auth_success { filter = (event=auth_request_finished AND success=yes) }
metric mail_delivery { filter = event=mail_delivery_finished }
doveadm stats dump metric_name field count sum min max avg median stddev %95 client_connections duration 0 0 0 0 0.00 0 0.00 0 auth_success duration 0 0 0 0 0.00 0 0.00 0 mail_delivery duration 0 0 0 0 0.00 0 0.00 0
do i have to enable stats in mail_plugins? I thought this is only the case if i would want to use the old stats module, but even when i enable it, it doesnt work:
doveadm stats dump Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Dovecot version 2.3.18 (Ubuntu)
You don't have to enable old_stats plugin, it's only needed for old stats.
Not entirely sure why you are not seeing those events, you should first verify that the stats socket is writable.
service stats { unix_listener stats { mode = 0666 } }
Aki
Hi Aki,
still no output, i think i have to dig more. Is there any possibility to see, what events my dovecot server is "logging"?
We have a construct like proxy -> director -> storagenode i guess not every server in that construct has the same events, so I could just be unlucky.
Kind regards, Marcel
On 23.07.24 15:50, Aki Tuomi via dovecot wrote:
On 23/07/2024 16:34 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi,
i have the exact same problem, i configured everything as said in the documentation, but the output is always 0
metric client_connections { filter = event=client_connection_finished }
metric auth_success { filter = (event=auth_request_finished AND success=yes) }
metric mail_delivery { filter = event=mail_delivery_finished }
doveadm stats dump metric_name field count sum min max avg median stddev %95 client_connections duration 0 0 0 0 0.00 0 0.00 0 auth_success duration 0 0 0 0 0.00 0 0.00 0 mail_delivery duration 0 0 0 0 0.00 0 0.00 0
do i have to enable stats in mail_plugins? I thought this is only the case if i would want to use the old stats module, but even when i enable it, it doesnt work:
doveadm stats dump Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Dovecot version 2.3.18 (Ubuntu) You don't have to enable old_stats plugin, it's only needed for old stats.
Not entirely sure why you are not seeing those events, you should first verify that the stats socket is writable.
service stats { unix_listener stats { mode = 0666 } }
Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
event_exporter log { format = json format_args = time-rfc3339 transport = log }
metric all { filter=event=* exporter=log }
On 23/07/2024 16:56 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi Aki,
still no output, i think i have to dig more. Is there any possibility to see, what events my dovecot server is "logging"?
We have a construct like proxy -> director -> storagenode i guess not every server in that construct has the same events, so I could just be unlucky.
Kind regards, Marcel
On 23.07.24 15:50, Aki Tuomi via dovecot wrote:
On 23/07/2024 16:34 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi,
i have the exact same problem, i configured everything as said in the documentation, but the output is always 0
metric client_connections { filter = event=client_connection_finished }
metric auth_success { filter = (event=auth_request_finished AND success=yes) }
metric mail_delivery { filter = event=mail_delivery_finished }
doveadm stats dump metric_name field count sum min max avg median stddev %95 client_connections duration 0 0 0 0 0.00 0 0.00 0 auth_success duration 0 0 0 0 0.00 0 0.00 0 mail_delivery duration 0 0 0 0 0.00 0 0.00 0
do i have to enable stats in mail_plugins? I thought this is only the case if i would want to use the old stats module, but even when i enable it, it doesnt work:
doveadm stats dump Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Dovecot version 2.3.18 (Ubuntu) You don't have to enable old_stats plugin, it's only needed for old stats.
Not entirely sure why you are not seeing those events, you should first verify that the stats socket is writable.
service stats { unix_listener stats { mode = 0666 } }
Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Hi,
still no luck
all duration 0 0 0 0 0.00 0 0.00 0
seems it has something todo with our setup, i cant think of anything else
i will test in another testing environment
Kind regards Marcel
On 23.07.24 15:59, Aki Tuomi via dovecot wrote:
event_exporter log { format = json format_args = time-rfc3339 transport = log }
metric all { filter=event=* exporter=log }
On 23/07/2024 16:56 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi Aki,
still no output, i think i have to dig more. Is there any possibility to see, what events my dovecot server is "logging"?
We have a construct like proxy -> director -> storagenode i guess not every server in that construct has the same events, so I could just be unlucky.
Kind regards, Marcel
On 23.07.24 15:50, Aki Tuomi via dovecot wrote:
On 23/07/2024 16:34 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi,
i have the exact same problem, i configured everything as said in the documentation, but the output is always 0
metric client_connections { filter = event=client_connection_finished }
metric auth_success { filter = (event=auth_request_finished AND success=yes) }
metric mail_delivery { filter = event=mail_delivery_finished }
doveadm stats dump metric_name field count sum min max avg median stddev %95 client_connections duration 0 0 0 0 0.00 0 0.00 0 auth_success duration 0 0 0 0 0.00 0 0.00 0 mail_delivery duration 0 0 0 0 0.00 0 0.00 0
do i have to enable stats in mail_plugins? I thought this is only the case if i would want to use the old stats module, but even when i enable it, it doesnt work:
doveadm stats dump Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Dovecot version 2.3.18 (Ubuntu) You don't have to enable old_stats plugin, it's only needed for old stats.
Not entirely sure why you are not seeing those events, you should first verify that the stats socket is writable.
service stats { unix_listener stats { mode = 0666 } }
Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Hi,
we found the failure, it works now, we disabled the stats_writer_socket (i dunno why exactly, hopefully some legacy s***)
thanks for your help
Kind regards
Marcel
On 23.07.24 16:11, Marcel Schmidt via dovecot wrote:
Hi,
still no luck
all duration 0 0 0 0 0.00 0 0.00 0
seems it has something todo with our setup, i cant think of anything else
i will test in another testing environment
Kind regards Marcel
On 23.07.24 15:59, Aki Tuomi via dovecot wrote:
event_exporter log { format = json format_args = time-rfc3339 transport = log }
metric all { filter=event=* exporter=log }
On 23/07/2024 16:56 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi Aki,
still no output, i think i have to dig more. Is there any possibility to see, what events my dovecot server is "logging"?
We have a construct like proxy -> director -> storagenode i guess not every server in that construct has the same events, so I could just be unlucky.
Kind regards, Marcel
On 23.07.24 15:50, Aki Tuomi via dovecot wrote:
On 23/07/2024 16:34 EEST Marcel Schmidt via dovecot <dovecot@dovecot.org> wrote:
Hi,
i have the exact same problem, i configured everything as said in the documentation, but the output is always 0
metric client_connections { filter = event=client_connection_finished }
metric auth_success { filter = (event=auth_request_finished AND success=yes) }
metric mail_delivery { filter = event=mail_delivery_finished }
doveadm stats dump metric_name field count sum min max avg median stddev %95 client_connections duration 0 0 0 0 0.00 0 0.00 0 auth_success duration 0 0 0 0 0.00 0 0.00 0 mail_delivery duration 0 0 0 0 0.00 0 0.00 0
do i have to enable stats in mail_plugins? I thought this is only the case if i would want to use the old stats module, but even when i enable it, it doesnt work:
doveadm stats dump Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Dovecot version 2.3.18 (Ubuntu) You don't have to enable old_stats plugin, it's only needed for old stats.
Not entirely sure why you are not seeing those events, you should first verify that the stats socket is writable.
service stats { unix_listener stats { mode = 0666 } }
Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (3)
-
Adam Miller
-
Aki Tuomi
-
Marcel Schmidt