[Dovecot] quota-dirsize and mailbox rules

Thanos Chatziathanassiou tchatzi at arx.net
Fri Sep 4 17:29:57 EEST 2009


O/H Timo Sirainen έγραψε:
> On Fri, 2009-08-21 at 16:05 +0300, Thanos Chatziathanassiou wrote:
>   
>> I noticed that the dirsize backend for quota didn't support any rules 
>> and figured it should be easy enough to add ``ignore'' at least.
>> Using mbox storage and only tested with that, but it seems to work as 
>> expected for the time being.
>> I'm attaching a relatively small patch for quota-dirsize.c against 
>> dovecot-1.1.18 just in case anyone's interested.
>>     
>
> The only problem with that is that it should be checking the full
> mailbox name instead of just the file name. So there are two issues
> here:
>
> 1. If you're ignoring "foo/bar", your patch currently looks up only to
> see if "bar" is ignored.
>   
I've done that but now I stumbled upon a (logical) problem. Supposing 
user has ``very/deep/path/to/mbox_file''.
If the rules specify ``path/to/mbox_file'', should it be ignored or not ?
I currently only match ``very/deep/path/to/mbox_file'' exactly only.
I originally meant to ignore only standard mboxes, like ``INBOX'' 
(because my MTA already checks this), ``Trash'', ``Ham'' and ``Spam'' 
(because a cronjob expires the former and auto-learns as ham/spam from 
the latters)
But what if the user moves these to e.g. ``Uninteresting/Trash'', 
``SpamFilter/Ham'' and ``SpamFilter/Spam''.
> 2. Namespace prefixes need to be used. So for example if you're using
> namespace { prefix = INBOX/ } and you see a file "foo", you should look
> for rule "INBOX/foo".
>   
I'm afraid I lack some understanding of namespaces to do this. I read 
http://wiki.dovecot.org/Namespaces but still can't get it...



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3242 bytes
Desc: S/MIME Cryptographic Signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20090904/7ab5cc74/attachment.bin 


More information about the dovecot mailing list