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. Best Regards, Thanos Chatziathanassiou -------------- next part -------------- A non-text attachment was scrubbed... Name: quota-dirsize.patch Type: text/x-diff Size: 2162 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20090821/4f82f10b/attachment-0004.bin> -------------- 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/20090821/4f82f10b/attachment-0005.bin>
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. 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". -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090824/50afddaf/attachment-0002.bin>
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-0002.bin>