[Dovecot] Soft Quota for moving messages
Hi all,
ok, I have an account that is over quota, but they are unable to move things to the trash, because the system is giving an error because of course it is over quota.
Is there a quota setting that will let them move things to the trash without error? this of course would be so they could decrease their disk usage and become under quota again...
Thanks,
Tim.
Tim Traver schrieb:
Is there a quota setting that will let them move things to the trash without error? this of course would be so they could decrease their disk usage and become under quota again...
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
"Patrick Westenberg" pw@wk-serv.de wrote on 20.11.2010 23:46:14:
Tim Traver schrieb:
Is there a quota setting that will let them move things to the trash without error? this of course would be so they could decrease their disk usage and become under quota again...
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
Patrick you sure, that doesn't mean that the trash quota is 100M? Haven't tested your version, but for sure I know, that the one below is most definitely full quota + 100M Trash:storage=+100M
Regards, Miha
Miha Vrhovnik schrieb:
"Patrick Westenberg"pw@wk-serv.de wrote on 20.11.2010 23:46:14:
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
Patrick you sure, that doesn't mean that the trash quota is 100M? Haven't tested your version, but for sure I know, that the one below is most definitely full quota + 100M Trash:storage=+100M
As far as I remember the "+" is obsolete now. My logfile told me ;-)
And the wiki also says "additional space".
Hi all,
ok, I implemented the feature to allow 100 more MB in the trash, and it appears to work for accounts that have a standard quota, but it appears it doesn't work with an account that comes back with a 0 quota (meaning unlimited).
So, I seemed to have fixed one issue, but then on accounts that have an unlimited quota, I now cannot even move items to the trash.
Help!
So, here's the situation. I now have some accounts that have much more than 100Mb in them with an unlimited quota level (ie 0S in the maildirsize file), and I can't simply delete a message now...
here's my dovecot -n again if its needed :
# 2.0.7: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.1-STABLE i386 auth_username_format = %Lu auth_username_translation = %@ auth_verbose = yes disable_plaintext_auth = no dotlock_use_excl = yes first_valid_uid = 100 listen = * lock_method = dotlock log_path = /local/logs/dovecot.errors mail_fsync = always mail_gid = 100 mail_location = maildir:%h/Maildir mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = " quota" mail_uid = 100 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date imapflags notify mmap_disable = yes passdb { args = /bin/checkpassword_dovecot_auth driver = checkpassword } plugin { quota = maildir:User quota quota_rule = Trash:storage=+100M sieve = ~/.dovecot.sieve sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve sieve_dir = ~/Maildir/sieve sieve_extensions = +notify +imapflags } protocols = imap pop3 sieve service auth { unix_listener auth-userdb { group = sn mode = 0600 user = sn } } ssl_cert =
On 11/21/2010 3:11 AM, Patrick Westenberg wrote:
Miha Vrhovnik schrieb:
"Patrick Westenberg"pw@wk-serv.de wrote on 20.11.2010 23:46:14:
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
Patrick you sure, that doesn't mean that the trash quota is 100M? Haven't tested your version, but for sure I know, that the one below is most definitely full quota + 100M Trash:storage=+100M
As far as I remember the "+" is obsolete now. My logfile told me ;-)
And the wiki also says "additional space".
ok, more info on this one. When I took out the quota_rule that added the extra 100M to the trash quota, the unlimited accounts started working properly again.
So you know, I retrieve the quota values from the userdb lookups instead of having a default configured in the dovecot config files, because they could be all over the map depending on how each of our users is set up.
and of course, from the dovecot -n output, you can see that I'm using Maildirs and the maildirsize file for keeping track of quotas.
Have I run into a possible bug with accounts that return 0 values for the quota? does it accidentally think that the quota is actually 0 when there is a quota_rule?
Thanks,
Tim.
On 11/21/2010 11:39 PM, Tim Traver wrote:
Hi all,
ok, I implemented the feature to allow 100 more MB in the trash, and it appears to work for accounts that have a standard quota, but it appears it doesn't work with an account that comes back with a 0 quota (meaning unlimited).
So, I seemed to have fixed one issue, but then on accounts that have an unlimited quota, I now cannot even move items to the trash.
Help!
So, here's the situation. I now have some accounts that have much more than 100Mb in them with an unlimited quota level (ie 0S in the maildirsize file), and I can't simply delete a message now...
here's my dovecot -n again if its needed :
# 2.0.7: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.1-STABLE i386 auth_username_format = %Lu auth_username_translation = %@ auth_verbose = yes disable_plaintext_auth = no dotlock_use_excl = yes first_valid_uid = 100 listen = * lock_method = dotlock log_path = /local/logs/dovecot.errors mail_fsync = always mail_gid = 100 mail_location = maildir:%h/Maildir mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = " quota" mail_uid = 100 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date imapflags notify mmap_disable = yes passdb { args = /bin/checkpassword_dovecot_auth driver = checkpassword } plugin { quota = maildir:User quota quota_rule = Trash:storage=+100M sieve = ~/.dovecot.sieve sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve sieve_dir = ~/Maildir/sieve sieve_extensions = +notify +imapflags } protocols = imap pop3 sieve service auth { unix_listener auth-userdb { group = sn mode = 0600 user = sn } } ssl_cert =
On 11/21/2010 3:11 AM, Patrick Westenberg wrote:
Miha Vrhovnik schrieb:
"Patrick Westenberg"pw@wk-serv.de wrote on 20.11.2010 23:46:14:
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
Patrick you sure, that doesn't mean that the trash quota is 100M? Haven't tested your version, but for sure I know, that the one below is most definitely full quota + 100M Trash:storage=+100M As far as I remember the "+" is obsolete now. My logfile told me ;-)
And the wiki also says "additional space".
It wasn't really a bug, more like a feature I thought would have been a good idea, but wasn't really. Instead of using 100M, you could use e.g. 10% (10% of 0 is 0 = unlimited). Or apply this patch: http://hg.dovecot.org/dovecot-2.0/rev/3a93121f652a
On Sun, 2010-11-21 at 23:51 -0800, Tim Traver wrote:
ok, more info on this one. When I took out the quota_rule that added the extra 100M to the trash quota, the unlimited accounts started working properly again.
So you know, I retrieve the quota values from the userdb lookups instead of having a default configured in the dovecot config files, because they could be all over the map depending on how each of our users is set up.
and of course, from the dovecot -n output, you can see that I'm using Maildirs and the maildirsize file for keeping track of quotas.
Have I run into a possible bug with accounts that return 0 values for the quota? does it accidentally think that the quota is actually 0 when there is a quota_rule?
Thanks,
Tim.
On 11/21/2010 11:39 PM, Tim Traver wrote:
Hi all,
ok, I implemented the feature to allow 100 more MB in the trash, and it appears to work for accounts that have a standard quota, but it appears it doesn't work with an account that comes back with a 0 quota (meaning unlimited).
So, I seemed to have fixed one issue, but then on accounts that have an unlimited quota, I now cannot even move items to the trash.
Help!
So, here's the situation. I now have some accounts that have much more than 100Mb in them with an unlimited quota level (ie 0S in the maildirsize file), and I can't simply delete a message now...
here's my dovecot -n again if its needed :
# 2.0.7: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.1-STABLE i386 auth_username_format = %Lu auth_username_translation = %@ auth_verbose = yes disable_plaintext_auth = no dotlock_use_excl = yes first_valid_uid = 100 listen = * lock_method = dotlock log_path = /local/logs/dovecot.errors mail_fsync = always mail_gid = 100 mail_location = maildir:%h/Maildir mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = " quota" mail_uid = 100 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date imapflags notify mmap_disable = yes passdb { args = /bin/checkpassword_dovecot_auth driver = checkpassword } plugin { quota = maildir:User quota quota_rule = Trash:storage=+100M sieve = ~/.dovecot.sieve sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve sieve_dir = ~/Maildir/sieve sieve_extensions = +notify +imapflags } protocols = imap pop3 sieve service auth { unix_listener auth-userdb { group = sn mode = 0600 user = sn } } ssl_cert =
On 11/21/2010 3:11 AM, Patrick Westenberg wrote:
Miha Vrhovnik schrieb:
"Patrick Westenberg"pw@wk-serv.de wrote on 20.11.2010 23:46:14:
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
Patrick you sure, that doesn't mean that the trash quota is 100M? Haven't tested your version, but for sure I know, that the one below is most definitely full quota + 100M Trash:storage=+100M As far as I remember the "+" is obsolete now. My logfile told me ;-)
And the wiki also says "additional space".
Thanks Timo! That patch did the trick!
Its great that you are so quick with changes that affect your users.
Tim
On 11/22/2010 10:36 AM, Timo Sirainen wrote:
It wasn't really a bug, more like a feature I thought would have been a good idea, but wasn't really. Instead of using 100M, you could use e.g. 10% (10% of 0 is 0 = unlimited). Or apply this patch: http://hg.dovecot.org/dovecot-2.0/rev/3a93121f652a
On Sun, 2010-11-21 at 23:51 -0800, Tim Traver wrote:
ok, more info on this one. When I took out the quota_rule that added the extra 100M to the trash quota, the unlimited accounts started working properly again.
So you know, I retrieve the quota values from the userdb lookups instead of having a default configured in the dovecot config files, because they could be all over the map depending on how each of our users is set up.
and of course, from the dovecot -n output, you can see that I'm using Maildirs and the maildirsize file for keeping track of quotas.
Have I run into a possible bug with accounts that return 0 values for the quota? does it accidentally think that the quota is actually 0 when there is a quota_rule?
Thanks,
Tim.
On 11/21/2010 11:39 PM, Tim Traver wrote:
Hi all,
ok, I implemented the feature to allow 100 more MB in the trash, and it appears to work for accounts that have a standard quota, but it appears it doesn't work with an account that comes back with a 0 quota (meaning unlimited).
So, I seemed to have fixed one issue, but then on accounts that have an unlimited quota, I now cannot even move items to the trash.
Help!
So, here's the situation. I now have some accounts that have much more than 100Mb in them with an unlimited quota level (ie 0S in the maildirsize file), and I can't simply delete a message now...
here's my dovecot -n again if its needed :
# 2.0.7: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.1-STABLE i386 auth_username_format = %Lu auth_username_translation = %@ auth_verbose = yes disable_plaintext_auth = no dotlock_use_excl = yes first_valid_uid = 100 listen = * lock_method = dotlock log_path = /local/logs/dovecot.errors mail_fsync = always mail_gid = 100 mail_location = maildir:%h/Maildir mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = " quota" mail_uid = 100 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date imapflags notify mmap_disable = yes passdb { args = /bin/checkpassword_dovecot_auth driver = checkpassword } plugin { quota = maildir:User quota quota_rule = Trash:storage=+100M sieve = ~/.dovecot.sieve sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve sieve_dir = ~/Maildir/sieve sieve_extensions = +notify +imapflags } protocols = imap pop3 sieve service auth { unix_listener auth-userdb { group = sn mode = 0600 user = sn } } ssl_cert =
On 11/21/2010 3:11 AM, Patrick Westenberg wrote:
Miha Vrhovnik schrieb:
"Patrick Westenberg"pw@wk-serv.de wrote on 20.11.2010 23:46:14:
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
Patrick you sure, that doesn't mean that the trash quota is 100M? Haven't tested your version, but for sure I know, that the one below is most definitely full quota + 100M Trash:storage=+100M As far as I remember the "+" is obsolete now. My logfile told me ;-)
And the wiki also says "additional space".
On Sun, 2010-11-21 at 12:11 +0100, Patrick Westenberg wrote:
Miha Vrhovnik schrieb:
"Patrick Westenberg"pw@wk-serv.de wrote on 20.11.2010 23:46:14:
You can give additional space to e.g. Trash mailbox: quota_rule2 = Trash:storage=100M
Patrick you sure, that doesn't mean that the trash quota is 100M? Haven't tested your version, but for sure I know, that the one below is most definitely full quota + 100M Trash:storage=+100M
As far as I remember the "+" is obsolete now.
It's the other way around, although both mean the same (for now). +100M is clearer what it means. Perhaps in distant future 100M means exactly 100 MB of quota for that mailbox, not 100 MB additional.
participants (4)
-
Miha Vrhovnik
-
Patrick Westenberg
-
Tim Traver
-
Timo Sirainen