Must be smaller than MAIL_SESSION_IDLE_TIMEOUT_MSECS in stats server */
#define SESSION_STATS_FORCE_REFRESH_SECS (5*60)
#define REFRESH_CHECK_INTERVAL 100
-#define MAIL_STATS_SOCKET_NAME "stats-mail"
+#define MAIL_STATS_FIFO_NAME "stats-mail"
struct stats_storage {
union mail_storage_module_context module_ctx;
}
if (global_stats_conn == NULL) {
- path = t_strconcat(user->set->base_dir,
- "/"MAIL_STATS_SOCKET_NAME, NULL);
+ path = mail_user_plugin_getenv(user, "stats_notify_path");
+ if (path == NULL)
+ path = MAIL_STATS_FIFO_NAME;
+ if (path[0] != '/')
+ path = t_strconcat(user->set->base_dir, "/", path, NULL);
global_stats_conn = stats_connection_create(path);
}
stats_connection_ref(global_stats_conn);