diff --git a/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix b/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix
index aba3533e4395..472652fe8a7a 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix
+++ b/nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix
@@ -35,13 +35,28 @@ in
{
= true;
= "/var/run/dovecot2/old-stats";
+ = [ "old_stats" ];
= '''
- mail_plugins = $mail_plugins old_stats
service old-stats {
unix_listener old-stats {
user = dovecot-exporter
group = dovecot-exporter
+ mode = 0660
}
+ fifo_listener old-stats-mail {
+ mode = 0660
+ user = dovecot
+ group = dovecot
+ }
+ fifo_listener old-stats-user {
+ mode = 0660
+ user = dovecot
+ group = dovecot
+ }
+ }
+ plugin {
+ old_stats_refresh = 30 secs
+ old_stats_track_cmds = yes
}
''';
}