[Dovecot] Quota on unlimited mailboxes (More info)

Timo Sirainen tss at iki.fi
Mon Nov 22 20:36:11 EET 2010


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 = </etc/ssl/certs/dovecot.pem
> > ssl_key = </etc/ssl/private/dovecot.pem
> > userdb {
> >   driver = prefetch
> > }
> > userdb {
> >   args = /bin/checkpassword_dovecot_deliver
> >   driver = checkpassword
> > }
> > verbose_proctitle = yes
> > protocol pop3 {
> >   pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
> > }
> > protocol lda {
> >   info_log_path = /local/logs/dovecot-deliver.log
> >   log_path = /local/logs/dovecot-deliver-errors.log
> >   mail_plugins = " quota sieve"
> > }
> > protocol imap {
> >   mail_plugins = " quota imap_quota"
> > }
> > protocol sieve {
> >   managesieve_sieve_capability = comparator-i;ascii-numeric fileinto
> > reject vacation imap4flags notify include envelope body relational regex
> > subaddress copy
> > }
> >
> >
> > On 11/21/2010 3:11 AM, Patrick Westenberg wrote:
> >> Miha Vrhovnik schrieb:
> >>> "Patrick Westenberg"<pw at 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".
> >>
> 




More information about the dovecot mailing list