Quota messages warning
I have dovecot 2.4.5 in a Docker container and warning quota of message count isn't working.
My quota config:
quota "User quota" {
driver = count quota_warning warn-espacio-95 { quota_storage_percentage = 95 execute quota-warning { args = espacio-95 %{user} } } quota_warning warn-mensajes-95 { quota_message_percentage = 95 execute quota-warning { args = cantidad-95 %{user} } } quota_warning warn-espacio-85 { quota_storage_percentage = 85 execute quota-warning { args = espacio-85 %{user} } } quota_warning warn-mensajes-85 { quota_message_percentage = 85 execute quota-warning { args = cantidad-85 %{user} } } quota_warning warn-espacio-75 { quota_storage_percentage = 75 execute quota-warning { args = espacio-75 %{user} } } quota_warning warn-mensajes-75 { quota_message_percentage = 75 execute quota-warning { args = cantidad-75 %{user} } } }
In storage option works ok, but in case of messages no event success. Log not show anything and external script is not call, of course. Any idea?
Best Regards, Alberto
On 30/08/2026 21:44 EEST Alberto via dovecot <dovecot@dovecot.org> wrote:
I have dovecot 2.4.5 in a Docker container and warning quota of message count isn't working.
My quota config:
In storage option works ok, but in case of messages no event success. Log not show anything and external script is not call, of course. Any idea?
Best Regards, Alberto
How are you delivering mail to dovecot?
Aki
El 31/8/26 a las 7:11, Aki Tuomi escribió:
On 30/08/2026 21:44 EEST Alberto via dovecot <dovecot@dovecot.org> wrote:
I have dovecot 2.4.5 in a Docker container and warning quota of message count isn't working.
My quota config:
In storage option works ok, but in case of messages no event success. Log not show anything and external script is not call, of course. Any idea?
Best Regards, Alberto
How are you delivering mail to dovecot?
Aki
LMTP, attach wide doveconf...
2.4.5 (0cbb641e3e): /etc/dovecot/dovecot.conf
Pigeonhole version 2.4.5 (742bb892)
OS: Linux 4.15.0 x86_64 Debian 13.6
Hostname: db37d808b22b
3 default setting changes since version 2.4.5
dovecot_config_version = 2.4.5 auth_allow_cleartext = yes auth_allow_weak_schemes = yes auth_master_user_separator = * auth_mechanisms = plain login cram-md5 auth_verbose = yes auth_verbose_passwords = yes debug_log_path = /dev/stdout default_internal_user = vmail default_login_user = vmail deliver_log_format = msgid=%{msgid}: %{message} (subject=%{subject} from=%{from} To=%{to_envelope} size=%{size}) dovecot_storage_version = 2.4.5 first_valid_gid = 1000 first_valid_uid = 1000 fts_autoindex = yes fts_autoindex_max_recent_msgs = 999 fts_search_add_missing = yes import_environment { CORE_ERROR = %{env:CORE_ERROR} CORE_OUTOFMEM = %{env:CORE_OUTOFMEM} MALLOC_MMAP_THRESHOLD_ = 131072 PATH = %{env:PATH} TZ = %{env:TZ} } last_valid_gid = 1000 last_valid_uid = 1000 lmtp_rcpt_check_quota = yes lmtp_save_to_detail_mailbox = yes log_debug = category=sieve log_path = /dev/stdout mail_driver = maildir mail_gid = vmail mail_plugins { notify = yes mail_log = yes quota = yes } mail_uid = vmail protocols = imap lmtp sieve quota_message_count = 100000 quota_status_nouser = DUNNO quota_status_overquota = 452 4.2.2 Mailbox is full and cannot receive any more emails quota_status_success = DUNNO quota_storage_size = 3G sieve_execute_bin_dir = /etc/dovecot/sieve sieve_extensions { fileinto = yes reject = yes envelope = yes encoded-character = yes vacation = yes subaddress = yes comparator-i;ascii-numeric = yes relational = yes regex = yes imap4flags = yes copy = yes include = yes body = yes variables = yes enotify = yes environment = yes mailbox = yes date = yes index = yes ihave = yes duplicate = yes mime = yes foreverypart = yes extracttext = yes mboxmetadata = yes vnd.dovecot.debug = yes vnd.dovecot.pipe = yes vnd.dovecot.execute = yes imapsieve = yes } sieve_pipe_bin_dir = /etc/dovecot/sieve sieve_plugins { sieve_imapsieve = yes sieve_extprograms = yes } sieve_trace_debug = yes sieve_trace_dir = /var/mail/sieve-traces sieve_trace_level = matching sql_driver = mysql state_dir = /run/dovecot mysql mimariadb { dbname = xxxxxx password = # hidden, use -P to show it user = xxxxxxx } passdb sql { default_password_scheme = CRYPT query = SELECT username, domain, home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, (CASE WHEN '%{mechanism}' = 'CRAM-MD5' THEN crampassword ELSE password END) AS password, CONCAT('*:bytes=',quota) AS userdb_quota_rule, CONCAT('*:messages=',quotamsgs) AS userdb_quota_rule3 FROM users WHERE username = '%{ user | username | lower }' AND domain = '%{ user | domain | lower }' AND active = 'Y' } userdb sql { iterate_query = SELECT CONCAT(username,'@',domain) AS user FROM users query = SELECT uid, gid, home, CONCAT(username, '@', domain) AS username, crampassword AS password, COALESCE(quota, 0) AS quota_storage_size, COALESCE(quotamsgs, 0) AS quota_message_count FROM users WHERE username = '%{ user | username | lower }' AND domain = '%{ user | domain | lower }' } auth_policy { hash_nonce = # hidden, use -P to show it server_api_header = Authorization: Basic d2ZvcmNlOmllcGE server_url = http://xxxxxxxx:8084 } namespace inbox { inbox = yes mailbox Drafts { special_use = "\\Drafts" } mailbox spam { auto = subscribe special_use = "\\Junk" sieve_script report-spam { cause = copy path = /etc/dovecot/sieve/report-spam.sieve type = before } } mailbox Trash { special_use = "\\Trash" quota_storage_extra = 100M } mailbox Sent { special_use = "\\Sent" } mailbox "Sent Messages" { special_use = "\\Sent" } mailbox SPAM { quota_hidden = yes } imapsieve_from spam { sieve_script report-ham { cause = copy path = /etc/dovecot/sieve/report-ham.sieve type = before } } } service imap { extra_groups = vmail } service imap-postlogin { executable = script-login /dovecot/albertobin/postlogin.sh user = $SET:default_internal_user unix_listener imap-postlogin { } } service imap-login { process_min_avail = 1 inet_listener imap { port = 0 } inet_listener imaps { port = 31993 ssl = yes } } service pop3 { } service pop3-login { inet_listener pop3 { } inet_listener pop3s { } } service submission { } service submission-login { client_limit = 100 process_min_avail = 1 inet_listener submission { port = 31587 } inet_listener submissions { port = 31465 ssl = yes } } service lmtp { executable = lmtp -L extra_groups = vmail unix_listener lmtp { group = vmail user = vmail } inet_listener lmtp { port = 31024 } } service auth { inet_listener auth { port = 12345 } unix_listener auth-userdb { group = mode = 0666 } } service auth-worker { } service dict { unix_listener dict { group = user = vmail } } service dict-async { unix_listener dict-async { group = mode = 0660 user = vmail } } service imap-hibernate { unix_listener imap-hibernate { group = vmail user = vmail } } service imap-urlauth-worker { extra_groups = vmail unix_listener imap-urlauth-worker { group = vmail user = vmail } } service indexer-worker { extra_groups = vmail unix_listener indexer-worker { group = vmail user = vmail } } service doveadm { extra_groups = vmail inet_listener http { port = 8080 ssl = yes } } service stats { process_min_avail = 1 unix_listener stats-writer { group = vmail user = vmail } inet_listener http { port = 9900 ssl = yes } } service anvil { extra_groups = vmail unix_listener anvil { group = vmail user = vmail } unix_listener anvil-auth-penalty { group = vmail user = vmail } unix_listener anvil-connect-limit { group = vmail user = vmail } } metric auth_success { filter = (event=auth_request_finished AND success=yes) } metric auth_failure { exporter = log filter = (event=auth_request_finished AND NOT success=yes) } metric imap_command { filter = event=imap_command_finished metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by tagged_reply_state { metric_group_by_method discrete { } } } metric smtp_command { filter = event=smtp_server_command_finished and protocol=submission metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by status_code { metric_group_by_method discrete { } } metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } metric lmtp_command { filter = event=smtp_server_command_finished and protocol=lmtp metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by status_code { metric_group_by_method discrete { } } metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } metric mail_delivery { filter = event=mail_delivery_finished metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } event_exporter log { format = json time_format = rfc3339 } ssl_server { cert_file = /dovecot/albertocerts/fullchain.cer key_file = # hidden, use -P to show it key_password = # hidden, use -P to show it } protocol imap { mail_plugins { imap_sieve = yes imap_quota = yes last_login = yes } } protocol lmtp { mail_plugins { sieve = yes } } service managesieve-login { inet_listener sieve { port = 34190 } inet_listener sieve_deprecated { port = 2000 } } service managesieve { extra_groups = vmail } last_login { key = # hidden, use -P to show it precision = ms dict proxy { name = sql } } dict_server { dict sql { sql_driver = mysql mysql mimariadb { dbname = xxxxxxxx password = # hidden, use -P to show it user = xxxxxxx } } dict_map "shared/last-login/$service/$user/$remote_ip" { sql_table = last_login dict_map_value_field last_access { type = uint dict_map_key_field userid { value = $user } dict_map_key_field service { value = $service } dict_map_key_field last_ip { value = $remote_ip } } dict mysql { driver = sql sql_driver = mysql dict_map priv/quota/storage { sql_table = quotas username_field = username dict_map_value_field bytes { } } dict_map priv/quota/messages { sql_table = quotas username_field = username dict_map_value_field messages { } } } } quota "User quota" { driver = count quota_warning warn-espacio-95 { quota_storage_percentage = 95 execute quota-warning { args = espacio-95 %{user} } } quota_warning warn-mensajes-95 { quota_message_percentage = 95 execute quota-warning { args = cantidad-95 %{user} } } quota_warning warn-espacio-85 { quota_storage_percentage = 85 execute quota-warning { args = espacio-85 %{user} } } quota_warning warn-mensajes-85 { quota_message_percentage = 85 execute quota-warning { args = cantidad-85 %{user} } } quota_warning warn-espacio-75 { quota_storage_percentage = 75 execute quota-warning { args = espacio-75 %{user} } } quota_warning warn-mensajes-75 { quota_message_percentage = 75 execute quota-warning { args = cantidad-75 %{user} } } } service quota-warning { executable = script /dovecot/albertobin/quota-warning.sh user = vmail unix_listener quota-warning { group = vmail mode = 0660 user = vmail } } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener postfix { port = 12340 } } sieve_script personal { active_path = ~/.dovecot.sieve driver = file path = ~/sieve } sieve_script default { driver = file name = default path = /etc/dovecot/sieve/default/ type = default } sieve_script after { path = /etc/dovecot/sieve-after type = after } sieve_script before { path = /etc/dovecot/sieve-before type = before }
Hello
I have the same problem with new version 2.4.5
quota + ACL + shared namespace + MOVE
2.4.5 : quota.c ligne 516
<9V9rA1Na39xNnpb6>: Panic: file quota.c: line 516 (quota_root_is_visible): assertion failed: (box->list->ns->type == MAIL_NAMESPACE_TYPE_SHARED)
<P3lnA1Na3NxNnpb6>: Fatal: master: service(imap): child 796 killed with signal 6 (core not dumped - https://dovecot.org/bugreport.html#coredumps - set /proc/sys/fs/suid_dumpable to 2)
best regards
I have dovecot 2.4.5 in a Docker container and warning quota of message count isn't working.
My quota config:
In storage option works ok, but in case of messages no event success. Log not show anything and external script is not call, of course. Any idea?
Best Regards, Alberto
How are you delivering mail to dovecot?
Aki
LMTP, attach wide doveconf...
2.4.5 (0cbb641e3e): /etc/dovecot/dovecot.conf
Pigeonhole version 2.4.5 (742bb892)
OS: Linux 4.15.0 x86_64 Debian 13.6
Hostname: db37d808b22b
3 default setting changes since version 2.4.5
dovecot_config_version = 2.4.5 auth_allow_cleartext = yes auth_allow_weak_schemes = yes auth_master_user_separator = * auth_mechanisms = plain login cram-md5 auth_verbose = yes auth_verbose_passwords = yes debug_log_path = /dev/stdout default_internal_user = vmail default_login_user = vmail deliver_log_format = msgid=%{msgid}: %{message} (subject=%{subject} from=%{from} To=%{to_envelope} size=%{size}) dovecot_storage_version = 2.4.5 first_valid_gid = 1000 first_valid_uid = 1000 fts_autoindex = yes fts_autoindex_max_recent_msgs = 999 fts_search_add_missing = yes import_environment { CORE_ERROR = %{env:CORE_ERROR} CORE_OUTOFMEM = %{env:CORE_OUTOFMEM} MALLOC_MMAP_THRESHOLD_ = 131072 PATH = %{env:PATH} TZ = %{env:TZ} } last_valid_gid = 1000 last_valid_uid = 1000 lmtp_rcpt_check_quota = yes lmtp_save_to_detail_mailbox = yes log_debug = category=sieve log_path = /dev/stdout mail_driver = maildir mail_gid = vmail mail_plugins { notify = yes mail_log = yes quota = yes } mail_uid = vmail protocols = imap lmtp sieve quota_message_count = 100000 quota_status_nouser = DUNNO quota_status_overquota = 452 4.2.2 Mailbox is full and cannot receive any more emails quota_status_success = DUNNO quota_storage_size = 3G sieve_execute_bin_dir = /etc/dovecot/sieve sieve_extensions { fileinto = yes reject = yes envelope = yes encoded-character = yes vacation = yes subaddress = yes comparator-i;ascii-numeric = yes relational = yes regex = yes imap4flags = yes copy = yes include = yes body = yes variables = yes enotify = yes environment = yes mailbox = yes date = yes index = yes ihave = yes duplicate = yes mime = yes foreverypart = yes extracttext = yes mboxmetadata = yes vnd.dovecot.debug = yes vnd.dovecot.pipe = yes vnd.dovecot.execute = yes imapsieve = yes } sieve_pipe_bin_dir = /etc/dovecot/sieve sieve_plugins { sieve_imapsieve = yes sieve_extprograms = yes } sieve_trace_debug = yes sieve_trace_dir = /var/mail/sieve-traces sieve_trace_level = matching sql_driver = mysql state_dir = /run/dovecot mysql mimariadb { dbname = xxxxxx password = # hidden, use -P to show it user = xxxxxxx } passdb sql { default_password_scheme = CRYPT query = SELECT username, domain, home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, (CASE WHEN '%{mechanism}' = 'CRAM-MD5' THEN crampassword ELSE password END) AS password, CONCAT('*:bytes=',quota) AS userdb_quota_rule, CONCAT('*:messages=',quotamsgs) AS userdb_quota_rule3 FROM users WHERE username = '%{ user | username | lower }' AND domain = '%{ user | domain | lower }' AND active = 'Y' } userdb sql { iterate_query = SELECT CONCAT(username,'@',domain) AS user FROM users query = SELECT uid, gid, home, CONCAT(username, '@', domain) AS username, crampassword AS password, COALESCE(quota, 0) AS quota_storage_size, COALESCE(quotamsgs, 0) AS quota_message_count FROM users WHERE username = '%{ user | username | lower }' AND domain = '%{ user | domain | lower }' } auth_policy { hash_nonce = # hidden, use -P to show it server_api_header = Authorization: Basic d2ZvcmNlOmllcGE server_url = http://xxxxxxxx:8084 } namespace inbox { inbox = yes mailbox Drafts { special_use = "\\Drafts" } mailbox spam { auto = subscribe special_use = "\\Junk" sieve_script report-spam { cause = copy path = /etc/dovecot/sieve/report-spam.sieve type = before } } mailbox Trash { special_use = "\\Trash" quota_storage_extra = 100M } mailbox Sent { special_use = "\\Sent" } mailbox "Sent Messages" { special_use = "\\Sent" } mailbox SPAM { quota_hidden = yes } imapsieve_from spam { sieve_script report-ham { cause = copy path = /etc/dovecot/sieve/report-ham.sieve type = before } } } service imap { extra_groups = vmail } service imap-postlogin { executable = script-login /dovecot/albertobin/postlogin.sh user = $SET:default_internal_user unix_listener imap-postlogin { } } service imap-login { process_min_avail = 1 inet_listener imap { port = 0 } inet_listener imaps { port = 31993 ssl = yes } } service pop3 { } service pop3-login { inet_listener pop3 { } inet_listener pop3s { } } service submission { } service submission-login { client_limit = 100 process_min_avail = 1 inet_listener submission { port = 31587 } inet_listener submissions { port = 31465 ssl = yes } } service lmtp { executable = lmtp -L extra_groups = vmail unix_listener lmtp { group = vmail user = vmail } inet_listener lmtp { port = 31024 } } service auth { inet_listener auth { port = 12345 } unix_listener auth-userdb { group = mode = 0666 } } service auth-worker { } service dict { unix_listener dict { group = user = vmail } } service dict-async { unix_listener dict-async { group = mode = 0660 user = vmail } } service imap-hibernate { unix_listener imap-hibernate { group = vmail user = vmail } } service imap-urlauth-worker { extra_groups = vmail unix_listener imap-urlauth-worker { group = vmail user = vmail } } service indexer-worker { extra_groups = vmail unix_listener indexer-worker { group = vmail user = vmail } } service doveadm { extra_groups = vmail inet_listener http { port = 8080 ssl = yes } } service stats { process_min_avail = 1 unix_listener stats-writer { group = vmail user = vmail } inet_listener http { port = 9900 ssl = yes } } service anvil { extra_groups = vmail unix_listener anvil { group = vmail user = vmail } unix_listener anvil-auth-penalty { group = vmail user = vmail } unix_listener anvil-connect-limit { group = vmail user = vmail } } metric auth_success { filter = (event=auth_request_finished AND success=yes) } metric auth_failure { exporter = log filter = (event=auth_request_finished AND NOT success=yes) } metric imap_command { filter = event=imap_command_finished metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by tagged_reply_state { metric_group_by_method discrete { } } } metric smtp_command { filter = event=smtp_server_command_finished and protocol=submission metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by status_code { metric_group_by_method discrete { } } metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } metric lmtp_command { filter = event=smtp_server_command_finished and protocol=lmtp metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by status_code { metric_group_by_method discrete { } } metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } metric mail_delivery { filter = event=mail_delivery_finished metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } event_exporter log { format = json time_format = rfc3339 } ssl_server { cert_file = /dovecot/albertocerts/fullchain.cer key_file = # hidden, use -P to show it key_password = # hidden, use -P to show it } protocol imap { mail_plugins { imap_sieve = yes imap_quota = yes last_login = yes } } protocol lmtp { mail_plugins { sieve = yes } } service managesieve-login { inet_listener sieve { port = 34190 } inet_listener sieve_deprecated { port = 2000 } } service managesieve { extra_groups = vmail } last_login { key = # hidden, use -P to show it precision = ms dict proxy { name = sql } } dict_server { dict sql { sql_driver = mysql mysql mimariadb { dbname = xxxxxxxx password = # hidden, use -P to show it user = xxxxxxx } } dict_map "shared/last-login/$service/$user/$remote_ip" { sql_table = last_login dict_map_value_field last_access { type = uint dict_map_key_field userid { value = $user } dict_map_key_field service { value = $service } dict_map_key_field last_ip { value = $remote_ip } } dict mysql { driver = sql sql_driver = mysql dict_map priv/quota/storage { sql_table = quotas username_field = username dict_map_value_field bytes { } } dict_map priv/quota/messages { sql_table = quotas username_field = username dict_map_value_field messages { } } } } quota "User quota" { driver = count quota_warning warn-espacio-95 { quota_storage_percentage = 95 execute quota-warning { args = espacio-95 %{user} } } quota_warning warn-mensajes-95 { quota_message_percentage = 95 execute quota-warning { args = cantidad-95 %{user} } } quota_warning warn-espacio-85 { quota_storage_percentage = 85 execute quota-warning { args = espacio-85 %{user} } } quota_warning warn-mensajes-85 { quota_message_percentage = 85 execute quota-warning { args = cantidad-85 %{user} } } quota_warning warn-espacio-75 { quota_storage_percentage = 75 execute quota-warning { args = espacio-75 %{user} } } quota_warning warn-mensajes-75 { quota_message_percentage = 75 execute quota-warning { args = cantidad-75 %{user} } } } service quota-warning { executable = script /dovecot/albertobin/quota-warning.sh user = vmail unix_listener quota-warning { group = vmail mode = 0660 user = vmail } } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener postfix { port = 12340 } } sieve_script personal { active_path = ~/.dovecot.sieve driver = file path = ~/sieve } sieve_script default { driver = file name = default path = /etc/dovecot/sieve/default/ type = default } sieve_script after { path = /etc/dovecot/sieve-after type = after } sieve_script before { path = /etc/dovecot/sieve-before type = before }
Hi
Try:
SELECT quota AS userdb_quota/User quota/storage_size
in passdb/userdb sql query
Bogusław Juza
W dniu 31.08.2026 o 10:12, Alberto via dovecot pisze:
El 31/8/26 a las 7:11, Aki Tuomi escribió:
On 30/08/2026 21:44 EEST Alberto via dovecot <dovecot@dovecot.org> wrote:
I have dovecot 2.4.5 in a Docker container and warning quota of message count isn't working.
My quota config:
In storage option works ok, but in case of messages no event success. Log not show anything and external script is not call, of course. Any idea?
Best Regards, Alberto
How are you delivering mail to dovecot?
Aki
LMTP, attach wide doveconf...
2.4.5 (0cbb641e3e): /etc/dovecot/dovecot.conf
Pigeonhole version 2.4.5 (742bb892)
OS: Linux 4.15.0 x86_64 Debian 13.6
Hostname: db37d808b22b
3 default setting changes since version 2.4.5
dovecot_config_version = 2.4.5 auth_allow_cleartext = yes auth_allow_weak_schemes = yes auth_master_user_separator = * auth_mechanisms = plain login cram-md5 auth_verbose = yes auth_verbose_passwords = yes debug_log_path = /dev/stdout default_internal_user = vmail default_login_user = vmail deliver_log_format = msgid=%{msgid}: %{message} (subject=%{subject} from=%{from} To=%{to_envelope} size=%{size}) dovecot_storage_version = 2.4.5 first_valid_gid = 1000 first_valid_uid = 1000 fts_autoindex = yes fts_autoindex_max_recent_msgs = 999 fts_search_add_missing = yes import_environment { CORE_ERROR = %{env:CORE_ERROR} CORE_OUTOFMEM = %{env:CORE_OUTOFMEM} MALLOC_MMAP_THRESHOLD_ = 131072 PATH = %{env:PATH} TZ = %{env:TZ} } last_valid_gid = 1000 last_valid_uid = 1000 lmtp_rcpt_check_quota = yes lmtp_save_to_detail_mailbox = yes log_debug = category=sieve log_path = /dev/stdout mail_driver = maildir mail_gid = vmail mail_plugins { notify = yes mail_log = yes quota = yes } mail_uid = vmail protocols = imap lmtp sieve quota_message_count = 100000 quota_status_nouser = DUNNO quota_status_overquota = 452 4.2.2 Mailbox is full and cannot receive any more emails quota_status_success = DUNNO quota_storage_size = 3G sieve_execute_bin_dir = /etc/dovecot/sieve sieve_extensions { fileinto = yes reject = yes envelope = yes encoded-character = yes vacation = yes subaddress = yes comparator-i;ascii-numeric = yes relational = yes regex = yes imap4flags = yes copy = yes include = yes body = yes variables = yes enotify = yes environment = yes mailbox = yes date = yes index = yes ihave = yes duplicate = yes mime = yes foreverypart = yes extracttext = yes mboxmetadata = yes vnd.dovecot.debug = yes vnd.dovecot.pipe = yes vnd.dovecot.execute = yes imapsieve = yes } sieve_pipe_bin_dir = /etc/dovecot/sieve sieve_plugins { sieve_imapsieve = yes sieve_extprograms = yes } sieve_trace_debug = yes sieve_trace_dir = /var/mail/sieve-traces sieve_trace_level = matching sql_driver = mysql state_dir = /run/dovecot mysql mimariadb { dbname = xxxxxx password = # hidden, use -P to show it user = xxxxxxx } passdb sql { default_password_scheme = CRYPT query = SELECT username, domain, home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, (CASE WHEN '%{mechanism}' = 'CRAM-MD5' THEN crampassword ELSE password END) AS password, CONCAT('*:bytes=',quota) AS userdb_quota_rule, CONCAT('*:messages=',quotamsgs) AS userdb_quota_rule3 FROM users WHERE username = '%{ user | username | lower }' AND domain = '%{ user | domain | lower }' AND active = 'Y' } userdb sql { iterate_query = SELECT CONCAT(username,'@',domain) AS user FROM users query = SELECT uid, gid, home, CONCAT(username, '@', domain) AS username, crampassword AS password, COALESCE(quota, 0) AS quota_storage_size, COALESCE(quotamsgs, 0) AS quota_message_count FROM users WHERE username = '%{ user | username | lower }' AND domain = '%{ user | domain | lower }' } auth_policy { hash_nonce = # hidden, use -P to show it server_api_header = Authorization: Basic d2ZvcmNlOmllcGE server_url = http://xxxxxxxx:8084 } namespace inbox { inbox = yes mailbox Drafts { special_use = "\\Drafts" } mailbox spam { auto = subscribe special_use = "\\Junk" sieve_script report-spam { cause = copy path = /etc/dovecot/sieve/report-spam.sieve type = before } } mailbox Trash { special_use = "\\Trash" quota_storage_extra = 100M } mailbox Sent { special_use = "\\Sent" } mailbox "Sent Messages" { special_use = "\\Sent" } mailbox SPAM { quota_hidden = yes } imapsieve_from spam { sieve_script report-ham { cause = copy path = /etc/dovecot/sieve/report-ham.sieve type = before } } } service imap { extra_groups = vmail } service imap-postlogin { executable = script-login /dovecot/albertobin/postlogin.sh user = $SET:default_internal_user unix_listener imap-postlogin { } } service imap-login { process_min_avail = 1 inet_listener imap { port = 0 } inet_listener imaps { port = 31993 ssl = yes } } service pop3 { } service pop3-login { inet_listener pop3 { } inet_listener pop3s { } } service submission { } service submission-login { client_limit = 100 process_min_avail = 1 inet_listener submission { port = 31587 } inet_listener submissions { port = 31465 ssl = yes } } service lmtp { executable = lmtp -L extra_groups = vmail unix_listener lmtp { group = vmail user = vmail } inet_listener lmtp { port = 31024 } } service auth { inet_listener auth { port = 12345 } unix_listener auth-userdb { group = mode = 0666 } } service auth-worker { } service dict { unix_listener dict { group = user = vmail } } service dict-async { unix_listener dict-async { group = mode = 0660 user = vmail } } service imap-hibernate { unix_listener imap-hibernate { group = vmail user = vmail } } service imap-urlauth-worker { extra_groups = vmail unix_listener imap-urlauth-worker { group = vmail user = vmail } } service indexer-worker { extra_groups = vmail unix_listener indexer-worker { group = vmail user = vmail } } service doveadm { extra_groups = vmail inet_listener http { port = 8080 ssl = yes } } service stats { process_min_avail = 1 unix_listener stats-writer { group = vmail user = vmail } inet_listener http { port = 9900 ssl = yes } } service anvil { extra_groups = vmail unix_listener anvil { group = vmail user = vmail } unix_listener anvil-auth-penalty { group = vmail user = vmail } unix_listener anvil-connect-limit { group = vmail user = vmail } } metric auth_success { filter = (event=auth_request_finished AND success=yes) } metric auth_failure { exporter = log filter = (event=auth_request_finished AND NOT success=yes) } metric imap_command { filter = event=imap_command_finished metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by tagged_reply_state { metric_group_by_method discrete { } } } metric smtp_command { filter = event=smtp_server_command_finished and protocol=submission metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by status_code { metric_group_by_method discrete { } } metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } metric lmtp_command { filter = event=smtp_server_command_finished and protocol=lmtp metric_group_by cmd_name { metric_group_by_method discrete { } } metric_group_by status_code { metric_group_by_method discrete { } } metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } metric mail_delivery { filter = event=mail_delivery_finished metric_group_by duration { metric_group_by_method exponential { base = 10 max_magnitude = 5 min_magnitude = 1 } } } event_exporter log { format = json time_format = rfc3339 } ssl_server { cert_file = /dovecot/albertocerts/fullchain.cer key_file = # hidden, use -P to show it key_password = # hidden, use -P to show it } protocol imap { mail_plugins { imap_sieve = yes imap_quota = yes last_login = yes } } protocol lmtp { mail_plugins { sieve = yes } } service managesieve-login { inet_listener sieve { port = 34190 } inet_listener sieve_deprecated { port = 2000 } } service managesieve { extra_groups = vmail } last_login { key = # hidden, use -P to show it precision = ms dict proxy { name = sql } } dict_server { dict sql { sql_driver = mysql mysql mimariadb { dbname = xxxxxxxx password = # hidden, use -P to show it user = xxxxxxx } } dict_map "shared/last-login/$service/$user/$remote_ip" { sql_table = last_login dict_map_value_field last_access { type = uint dict_map_key_field userid { value = $user } dict_map_key_field service { value = $service } dict_map_key_field last_ip { value = $remote_ip } } dict mysql { driver = sql sql_driver = mysql dict_map priv/quota/storage { sql_table = quotas username_field = username dict_map_value_field bytes { } } dict_map priv/quota/messages { sql_table = quotas username_field = username dict_map_value_field messages { } } } } quota "User quota" { driver = count quota_warning warn-espacio-95 { quota_storage_percentage = 95 execute quota-warning { args = espacio-95 %{user} } } quota_warning warn-mensajes-95 { quota_message_percentage = 95 execute quota-warning { args = cantidad-95 %{user} } } quota_warning warn-espacio-85 { quota_storage_percentage = 85 execute quota-warning { args = espacio-85 %{user} } } quota_warning warn-mensajes-85 { quota_message_percentage = 85 execute quota-warning { args = cantidad-85 %{user} } } quota_warning warn-espacio-75 { quota_storage_percentage = 75 execute quota-warning { args = espacio-75 %{user} } } quota_warning warn-mensajes-75 { quota_message_percentage = 75 execute quota-warning { args = cantidad-75 %{user} } } } service quota-warning { executable = script /dovecot/albertobin/quota-warning.sh user = vmail unix_listener quota-warning { group = vmail mode = 0660 user = vmail } } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener postfix { port = 12340 } } sieve_script personal { active_path = ~/.dovecot.sieve driver = file path = ~/sieve } sieve_script default { driver = file name = default path = /etc/dovecot/sieve/default/ type = default } sieve_script after { path = /etc/dovecot/sieve-after type = after } sieve_script before { path = /etc/dovecot/sieve-before type = before }
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
El 31/8/26 a las 7:11, Aki Tuomi via dovecot escribió:
On 30/08/2026 21:44 EEST Alberto via dovecot<dovecot@dovecot.org> wrote:
I have dovecot 2.4.5 in a Docker container and warning quota of message count isn't working.
My quota config:
In storage option works ok, but in case of messages no event success. Log not show anything and external script is not call, of course. Any idea?
Best Regards, Alberto How are you delivering mail to dovecot?
Aki
dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
List is not processing my answer, where I attach wide config.
Deliver is with LMTP, do you need any config specifically?
I think the list is not accepting all content, I don't know why
El 31/8/26 a las 7:11, Aki Tuomi via dovecot escribio:
On 30/08/2026 21:44 EEST Alberto via dovecot [1]<dovecot@dovecot.org> wrote:
I have dovecot 2.4.5 in a Docker container and warning quota of message count isn't working.
My quota config:
In storage option works ok, but in case of messages no event success. Log not show anything and external script is not call, of course. Any idea?
Best Regards, Alberto
How are you delivering mail to dovecot?
Aki
dovecot mailing list -- [2]dovecot@dovecot.org To unsubscribe send an email to [3]dovecot-leave@dovecot.org
List is not processing my answer, where I attach wide config.
Deliver is with LMTP, do you need any config specifically?
I think the list is not accepting all content, I don't know why
References
Visible links
- mailto:dovecot@dovecot.org
- mailto:dovecot@dovecot.org
- mailto:dovecot-leave@dovecot.org
my conf in 2.4.4 is done but the same in 2.4.5 i have problem Panic: file quota.c: line 516
2.4.4 (8b687aa65c): /etc/dovecot/dovecot.conf
Pigeonhole version 2.4.4 (3beb331a)
OS: Linux 6.12.107+deb13-amd64 x86_64 Debian 13.6 ext4
Hostname: dovecot.XXXX
dovecot_config_version = 2.4.4 acl_driver = vfile auth_allow_weak_schemes = yes auth_mechanisms = plain login base_dir = /run/dovecot compress_gz_level = 9 debug_log_path = /dev/stdout default_internal_group = vmail default_internal_user = vmail default_login_user = vmail dovecot_storage_version = 2.4.4 first_valid_uid = 5000 info_log_path = /dev/stdout last_valid_uid = 5000 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes lmtp_rcpt_check_quota = yes log_path = /dev/stdout mail_compress_write_method = gz mail_driver = maildir mail_fsync = always mail_gid = vmail mail_home = /var/mail/vmail/home/%{user | domain }/%{user | username } mail_path = /var/mail/vmail/mail/%{user | domain }/%{user | username } mail_plugins = quota acl mail_prefetch_count = 20 mail_privileged_group = vmail mail_uid = vmail postmaster_address = admin@XXXX protocols { imap = yes pop3 = yes lmtp = yes sieve = yes } rejection_reason = Your message to <%t> was automatically rejected:%n%r rejection_subject = Rejected: %s sieve_execute_bin_dir = /usr/local/lib/dovecot/sieve sieve_global_extensions { vnd.dovecot.pipe = yes vnd.dovecot.environment = yes vnd.dovecot.report = yes vnd.dovecot.execute = yes } sieve_pipe_bin_dir = /var/mail/vmail/sieve/global sieve_plugins { sieve_extprograms = yes sieve_imapsieve = yes } sql_driver = mysql ssl = required state_dir = /run/dovecot submission_host = postfix.XXXXX mysql mariadb { dbname = XXXX host = mariadb.XXXXX password = # hidden, use -P to show it user = XXXX } passdb sql { default_password_scheme = SHA512-CRYPT query = SELECT username, password, CONCAT(quota, 'B') AS userdb_quota_storage_size FROM mailbox WHERE username = '%{user}' AND active = '1' } userdb sql { iterate_query = SELECT username FROM mailbox query = SELECT CONCAT('/var/mail/vmail/home/',maildir) AS home, CONCAT('maildir:/var/mail/vmail/mail/',maildir) AS mail, 5000 AS uid, 5000 AS gid, CONCAT(quota, 'B') AS quota_storage_size FROM mailbox WHERE username = '%{user}' AND active = '1' } service director { unix_listener login/director { } fifo_listener login/proxy-notify { } unix_listener director-userdb { } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } } service submission-login { } protocol lmtp { mail_plugins { sieve = yes quota = yes } postmaster_address = admin@XXXX } acl_sharing_map { dict file { path = /var/lib/dovecot/db/shared-mailboxes.db } } namespace shared { mail_access_groups = vmail mail_driver = maildir mail_index_private_path = ~/shared-index/%{owner_user} mail_path = /var/mail/vmail/mail/%{owner_user | domain}/%{owner_user | username} list = children prefix = Shared/$user/ separator = / subscriptions = yes type = shared } namespace public { mail_access_groups = vmail mail_driver = maildir mail_index_path = /var/mail/vmail/mail/public_index mail_path = /var/mail/vmail/mail/public list = children prefix = Public/ separator = / subscriptions = yes type = public mailbox "" { acl "user=admin@XXXXX" { rights = lrswiptekxa } } mailbox * { acl anyone { rights = lrswiptek } acl "user=XXXX" { rights = -lrswiptek } acl "user=XXXX" { rights = lrswiptekx } } mailbox */* { acl anyone { rights = lrswiptek } acl "user=XXXX" { rights = -lrswiptek } acl "user=XXXX" { rights = lrswiptekx } acl "user=XXXXX" { rights = lrswiptekx } } } namespace inbox { inbox = yes prefix = separator = / subscriptions = yes type = private mailbox Drafts { auto = subscribe special_use = "\\Drafts" } mailbox Sent { auto = create special_use = "\\Sent" } mailbox "Sent Messages" { auto = subscribe special_use = "\\Sent" } mailbox Spam { auto = create special_use = "\\Junk" } mailbox Junk { auto = subscribe special_use = "\\Junk" } mailbox Archive { auto = subscribe special_use = "\\Archive" } mailbox Trash { auto = create special_use = "\\Trash" } mailbox "Deleted Messages" { auto = subscribe special_use = "\\Trash" } } maildir { very_dirty_syncs = yes } service lmtp { executable = lmtp -L process_limit = 200 inet_listener lmtp { port = 24 } } service imap { vsz_limit = 1G } service pop3 { } service auth { unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } inet_listener auth { port = 27 } } service auth-worker { user = vmail } service dict { unix_listener dict { group = vmail mode = 0660 user = vmail } } ssl_server { cert_file = /etc/ssl/private/XXX dh_file = /etc/ssl/private/XXXX key_file = /etc/ssl/private/XXX prefer_ciphers = server } ssl_client { ca_dir = /etc/ssl/certs require_valid_cert = yes } protocol lda { mail_plugins = quota } protocol imap { imap_idle_notify_interval = 30 secs mail_max_userip_connections = 30 mail_plugins { acl = yes imap_acl = yes imap_quota = yes imap_sieve = yes quota = yes mail_compress = yes } } service managesieve-login { inet_listener sieve { port = 4190 } } service managesieve { process_limit = 1024 } quota "User quota" { mail_driver = maildir status_nouser = DUNNO status_overquota = 552 5.2.2 Mailbox is full status_success = DUNNO storage_percentage = 10 quota_warning warn-95 { quota_storage_percentage = 95 execute quota-warning { args = 95 %{user} } } quota_warning warn-80 { quota_storage_percentage = 80 execute quota-warning { args = 80 %{user} } } quota_warning warn-under { quota_storage_percentage = 100 threshold = under execute quota-warning { args = below %{user} } } } service quota-warning { executable = script /usr/local/src/quota-warning.sh group = vmail user = vmail unix_listener quota-warning { group = vmail mode = 0660 user = vmail } } quota_over_status { lazy_check = yes mask = TRUE execute quota-warning { args = mismatch %{user} } } sieve_script before { active_path = /var/mail/vmail/sieve/global/before.sieve driver = file name = before path = /var/mail/vmail/sieve/global type = before } sieve_script personal { active_path = ~/personal.sieve driver = file name = personal path = ~/sieve type = personal } mailbox INBOX { sieve_script spam-to-ham { cause = copy path = /var/mail/vmail/sieve/global/report-ham.sieve type = before } } mailbox Archive { sieve_script sam-to-ham { cause = copy path = /var/mail/vmail/sieve/global/report-ham.sieve type = before } } mailbox Junk { sieve_script ham-to-spam { cause = copy path = /var/mail/vmail/sieve/global/report-spam.sieve type = before } } mailbox Spam { sieve_script ham-to-spam { cause = copy path = /var/mail/vmail/sieve/global/report-spam.sieve type = before } }
hello did you have some news ? I test again today
Sep 04 21:40:42 imap(julien@XXXXX.com)<108><J+iXca1aNoIqAoQAByIABgACAAAAAAAK>: Panic: file quota.c: line 516 (quota_root_is_visible): assertion failed: (box->list->ns->type == MAIL_NAMESPACE_TYPE_SHARED) Sep 04 21:40:42 imap(julien@XXXXcom)<108><J+iXca1aNoIqAoQAByIABgACAAAAAAAK>: Error: Raw backtrace: libdovecot.so.0(backtrace_append+0x39) [0x7f5fb05f6229] -> libdovecot.so.0(backtrace_get+0x22) [0x7f5fb05f6362] -> libdovecot.so.0(+0x14ff3c) [0x7f5fb0604f3c] -> libdovecot.so.0(+0x14ffd1) [0x7f5fb0604fd1] -> libdovecot.so.0(+0x6e46f) [0x7f5fb052346f] -> lib10_quota_plugin.so(+0x5c37) [0x7f5fb0071c37] -> lib10_quota_plugin.so(quota_try_alloc+0x14d) [0x7f5fb007528d] -> lib10_quota_plugin.so(+0xda6d) [0x7f5fb0079a6d] -> libdovecot-storage.so.0(mailbox_save_finish+0x71) [0x7f5fb0957ee1] -> libdovecot-storage.so.0(mail_storage_copy+0xc4) [0x7f5fb0946d44] -> lib95_imap_sieve_plugin.so(+0x8197) [0x7f5fb0056197] -> lib10_quota_plugin.so(+0xe0df) [0x7f5fb007a0df] -> lib01_acl_plugin.so(+0xe38d) [0x7f5fb009838d] -> libdovecot-storage.so.0(+0x6b25d) [0x7f5fb095825d] -> libdovecot-storage.so.0(mailbox_move+0x5e) [0x7f5fb095840e] -> imap(+0x170ef) [0x559772e490ef] -> imap(command_exec+0xa4) [0x559772e58774] -> imap(+0x24350) [0x559772e56350] -> imap(+0x243e4) [0x559772e563e4] -> imap(+0x2466b) [0x559772e5666b] -> imap(client_handle_input+0x1d5) [0x559772e56ad5] -> imap(client_input+0x73) [0x559772e57093] -> libdovecot.so.0(io_loop_call_io+0x67) [0x7f5fb061e817] -> libdovecot.so.0(io_loop_handler_run_internal+0x13b) [0x7f5fb061ff8b] -> libdovecot.so.0(io_loop_handler_run+0x50) [0x7f5fb061e8c0] -> libdovecot.so.0(io_loop_run+0x48) [0x7f5fb061eac8] -> libdovecot.so.0(master_service_run+0x17a) [0x7f5fb056a9aa] -> imap(main+0x3f6) [0x559772e467c6] -> libc.so.6(+0x29ca8) [0x7f5fb02eaca8] -> libc.so.6(__libc_start_main+0x85) [0x7f5fb02ead65] Sep 04 21:40:42 imap(julien@XXXXX)<108><J+iXca1aNoIqAoQAByIABgACAAAAAAAK>: Fatal: master: service(imap): child 108 killed with signal 6 (core not dumped - https://dovecot.org/bugreport.html#coredumps - set /proc/sys/fs/suid_dumpable to 2)
participants (4)
-
Aki Tuomi
-
Alberto
-
Bogusław Juza
-
pub@my808.fr