Problem with fs:User quota: Postfix quota-status returns always DUNNO
I installed a mail server on a Debian GNU/Linux 10 Buster, which provide Dovecot 2.3.4.1.
It works almost everything, but I'm unable to make the Postfix quota service to work as expected.
First of all I verify that the Dovecot idea of quota is OK:
doveadm quota get -u username@example.org Quota name Type Value Limit % User quota STORAGE 2752 3500 78
Then I ask the Postfix quota-status service:
printf "recipient=username@example.org\nsize=3000000\n\n"
| nc localhost 12340
action=DUNNO
But a size of 3 Mb should trigger the "action=554 5.2.2 Quota exceeded" message.
I find a workaround for this problem: just adding the following section will "fix" the problem:
plugin { quota_over_flag_value = FALSE quota_over_script = quota-warning mismatch %u }
How the quota_over_flag_value is related to the quota over filesystem? Why should I add both the quota_over_flag_value AND the quota_over_script options?
The script is executed always for each SMTP check (regardless of the quota_over_flag_value is FALSE or TRUE), obviously I provided a "do nothing" quota-warning script.
Here the relevant parts of "dovecot -n" output:
plugin { quota = fs:User quota:user quota_grace = 5%% quota_over_flag_value = FALSE quota_over_script = quota-warning mismatch %u quota_status_nouser = DUNNO quota_status_overquota = 554 5.2.2 Quota exceeded quota_status_success = DUNNO quota_warning = storage=90%% quota-warning 90 %u quota_warning2 = storage=80%% quota-warning 80 %u sieve = file:~/sieve;active=~/.dovecot.sieve sieve_before = ~/sieve_before.d/ sieve_extensions = +vnd.dovecot.filter sieve_filter_bin_dir = /usr/local/lib/dovecot/sieve-filter sieve_filter_socket_dir = sieve-filter sieve_plugins = sieve_extprograms }
service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener { port = 12340 } }
service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { group = dovecot mode = 0666 user = dovecot } user = root }
-- Niccolo Rigacci - http://www.rigacci.net/ Firenze/Prato - Italy Tel. Mobile: +39-327-5619352
participants (1)
-
Niccolo Rigacci