[Dovecot] Glued-together private namespaces
I've been goofing with this all day with 2.0.15 and I'm starting to realize that either a) I'm not that smart, b) it's been so long since I messed with namespaces that I'm going about it completely wrong, or c) it's just not possible. I haven't posted 'doveconf -n' and other details, because mainly I'm just looking for 'yes, this is possible' or 'no, you're smoking crack' before posting further details. At this point, it's all maildir and moving to mdbox, while highly desirable in the future, is not possible in the near- to medium-term.
I'm trying to glue a namespace underneath INBOX:
namespace INBOX { type = private separator = . prefix = INBOX. # Yes, this used to be on Courier inbox = yes list = yes hidden = no subscriptions = yes location = maildir:~/Maildir } namespace archive { type = private separator = . prefix = INBOX.Archives. inbox = no list = children subscriptions = yes location = maildir:~/Maildir-Archive }
I've tried putting namespace archive's 'prefix' as just "Archives", but Tbird doesn't seem to see this namespace, regardless of how much I futz with the imap settings in tbird.
With the above setup, it actually seems to work correctly (provided ~/Maildir-Archive exists), though I'm sure a big gotcha is waiting in the wings. I can move messages around, create subfolders, subscribe to folders in ~/Maildir-Archive). The only thing I can't seem to get working is quotas. With my password_query like:
password_query = ...
CONCAT( '*:bytes=', "1M" ) AS 'userdb_quota_rule',
CONCAT( '*:messages=10' ) AS 'userdb_quota_rule2',
CONCAT( 'INBOX.Archives:bytes=+4900M' ) AS 'userdb_quota_rule3',
CONCAT( 'INBOX.Archives:messages=+3900' ) AS 'userdb_quota_rule4'
...
only the default quota seems to be in place for any subfolder of INBOX.Archives and for INBOX.Archives itself, i.e. *:bytes still applies to INBOX.Archives. The debug log show that:
Debug: Quota root: name=User quota backend=maildir args= Debug: Quota rule: root=User quota mailbox=* bytes=1048576 messages=0 Debug: Quota rule: root=User quota mailbox=* bytes=1048576 messages=10 Debug: Quota rule: root=User quota mailbox=INBOX.Archives bytes=+5138022400 messages=0 Debug: Quota rule: root=User quota mailbox=INBOX.Archives bytes=+5138022400 messages=+3900
These are wildly stupid quotas but they're just there to test. With INBOX already at capacity (byte-wise; only set to a meg), copying large messages inside INBOX.Archives fails (only copying a 800k message but the quota should be 5gig now).
Again, before I post configs, I'm just curious if what I'm trying to do isn't remotely possible, or that I'm approaching this entirely wrongly. Thanks!
On Fri, Sep 23, 2011 at 3:35 PM, Mark Moseley <moseleymark@gmail.com> wrote:
I've been goofing with this all day with 2.0.15 and I'm starting to realize that either a) I'm not that smart, b) it's been so long since I messed with namespaces that I'm going about it completely wrong, or c) it's just not possible. I haven't posted 'doveconf -n' and other details, because mainly I'm just looking for 'yes, this is possible' or 'no, you're smoking crack' before posting further details. At this point, it's all maildir and moving to mdbox, while highly desirable in the future, is not possible in the near- to medium-term.
I'm trying to glue a namespace underneath INBOX:
namespace INBOX { type = private separator = . prefix = INBOX. # Yes, this used to be on Courier inbox = yes list = yes hidden = no subscriptions = yes location = maildir:~/Maildir } namespace archive { type = private separator = . prefix = INBOX.Archives. inbox = no list = children subscriptions = yes location = maildir:~/Maildir-Archive }
I've tried putting namespace archive's 'prefix' as just "Archives", but Tbird doesn't seem to see this namespace, regardless of how much I futz with the imap settings in tbird.
With the above setup, it actually seems to work correctly (provided ~/Maildir-Archive exists), though I'm sure a big gotcha is waiting in the wings. I can move messages around, create subfolders, subscribe to folders in ~/Maildir-Archive). The only thing I can't seem to get working is quotas. With my password_query like:
password_query = ... CONCAT( '*:bytes=', "1M" ) AS 'userdb_quota_rule',
CONCAT( '*:messages=10' ) AS 'userdb_quota_rule2',
CONCAT( 'INBOX.Archives:bytes=+4900M' ) AS 'userdb_quota_rule3',
CONCAT( 'INBOX.Archives:messages=+3900' ) AS 'userdb_quota_rule4' ...only the default quota seems to be in place for any subfolder of INBOX.Archives and for INBOX.Archives itself, i.e. *:bytes still applies to INBOX.Archives. The debug log show that:
Debug: Quota root: name=User quota backend=maildir args= Debug: Quota rule: root=User quota mailbox=* bytes=1048576 messages=0 Debug: Quota rule: root=User quota mailbox=* bytes=1048576 messages=10 Debug: Quota rule: root=User quota mailbox=INBOX.Archives bytes=+5138022400 messages=0 Debug: Quota rule: root=User quota mailbox=INBOX.Archives bytes=+5138022400 messages=+3900
These are wildly stupid quotas but they're just there to test. With INBOX already at capacity (byte-wise; only set to a meg), copying large messages inside INBOX.Archives fails (only copying a 800k message but the quota should be 5gig now).
Again, before I post configs, I'm just curious if what I'm trying to do isn't remotely possible, or that I'm approaching this entirely wrongly. Thanks!
Thanks to a fortuitously unrelated thread ("how to disable quota for second namespace"), I got the quota part figured out and that seems to be working: Add a second entry to plugin {}, e.g. "quota2 = maildir:Archive quota:ns=INBOX.Archives." and add rules for userdb_quota2_rule, userdb_quota2_rule2, etc.
My real question now is: Are there any fatal gotchas in this that I'm just not thinking of?
On Mon, Sep 26, 2011 at 10:11 AM, Mark Moseley <moseleymark@gmail.com> wrote:
On Fri, Sep 23, 2011 at 3:35 PM, Mark Moseley <moseleymark@gmail.com> wrote:
I've been goofing with this all day with 2.0.15 and I'm starting to realize that either a) I'm not that smart, b) it's been so long since I messed with namespaces that I'm going about it completely wrong, or c) it's just not possible. I haven't posted 'doveconf -n' and other details, because mainly I'm just looking for 'yes, this is possible' or 'no, you're smoking crack' before posting further details. At this point, it's all maildir and moving to mdbox, while highly desirable in the future, is not possible in the near- to medium-term.
I'm trying to glue a namespace underneath INBOX:
namespace INBOX { type = private separator = . prefix = INBOX. # Yes, this used to be on Courier inbox = yes list = yes hidden = no subscriptions = yes location = maildir:~/Maildir } namespace archive { type = private separator = . prefix = INBOX.Archives. inbox = no list = children subscriptions = yes location = maildir:~/Maildir-Archive }
I've tried putting namespace archive's 'prefix' as just "Archives", but Tbird doesn't seem to see this namespace, regardless of how much I futz with the imap settings in tbird.
With the above setup, it actually seems to work correctly (provided ~/Maildir-Archive exists), though I'm sure a big gotcha is waiting in the wings. I can move messages around, create subfolders, subscribe to folders in ~/Maildir-Archive). The only thing I can't seem to get working is quotas. With my password_query like:
password_query = ... CONCAT( '*:bytes=', "1M" ) AS 'userdb_quota_rule',
CONCAT( '*:messages=10' ) AS 'userdb_quota_rule2',
CONCAT( 'INBOX.Archives:bytes=+4900M' ) AS 'userdb_quota_rule3',
CONCAT( 'INBOX.Archives:messages=+3900' ) AS 'userdb_quota_rule4' ...only the default quota seems to be in place for any subfolder of INBOX.Archives and for INBOX.Archives itself, i.e. *:bytes still applies to INBOX.Archives. The debug log show that:
Debug: Quota root: name=User quota backend=maildir args= Debug: Quota rule: root=User quota mailbox=* bytes=1048576 messages=0 Debug: Quota rule: root=User quota mailbox=* bytes=1048576 messages=10 Debug: Quota rule: root=User quota mailbox=INBOX.Archives bytes=+5138022400 messages=0 Debug: Quota rule: root=User quota mailbox=INBOX.Archives bytes=+5138022400 messages=+3900
These are wildly stupid quotas but they're just there to test. With INBOX already at capacity (byte-wise; only set to a meg), copying large messages inside INBOX.Archives fails (only copying a 800k message but the quota should be 5gig now).
Again, before I post configs, I'm just curious if what I'm trying to do isn't remotely possible, or that I'm approaching this entirely wrongly. Thanks!
Thanks to a fortuitously unrelated thread ("how to disable quota for second namespace"), I got the quota part figured out and that seems to be working: Add a second entry to plugin {}, e.g. "quota2 = maildir:Archive quota:ns=INBOX.Archives." and add rules for userdb_quota2_rule, userdb_quota2_rule2, etc.
My real question now is: Are there any fatal gotchas in this that I'm just not thinking of?
Haven't had a chance to try this large-scale yet. Anybody have any thoughts on it?
On Mon, 2011-11-14 at 10:23 -0800, Mark Moseley wrote:
Thanks to a fortuitously unrelated thread ("how to disable quota for second namespace"), I got the quota part figured out and that seems to be working: Add a second entry to plugin {}, e.g. "quota2 = maildir:Archive quota:ns=INBOX.Archives." and add rules for userdb_quota2_rule, userdb_quota2_rule2, etc.
My real question now is: Are there any fatal gotchas in this that I'm just not thinking of?
Haven't had a chance to try this large-scale yet. Anybody have any thoughts on it?
The gotcha is that you have two completely independent quotas with independent usage/limits for the INBOX and Archive namespaces. If that is what you want, it should all be fine.
On Tue, Nov 15, 2011 at 11:39 AM, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2011-11-14 at 10:23 -0800, Mark Moseley wrote:
Thanks to a fortuitously unrelated thread ("how to disable quota for second namespace"), I got the quota part figured out and that seems to be working: Add a second entry to plugin {}, e.g. "quota2 = maildir:Archive quota:ns=INBOX.Archives." and add rules for userdb_quota2_rule, userdb_quota2_rule2, etc.
My real question now is: Are there any fatal gotchas in this that I'm just not thinking of?
Haven't had a chance to try this large-scale yet. Anybody have any thoughts on it?
The gotcha is that you have two completely independent quotas with independent usage/limits for the INBOX and Archive namespaces. If that is what you want, it should all be fine.
Nope, that's totally fine. The idea is to put Archive on cheaper (slower) storage and then grant more generous quotas there to make it worth their while to use, without slowing down their Inbox. Another application would be to put their Spam in another namespace (for people who choose to have it put in a separate folder) with a lower quota, again to offload it onto cheaper storage, since hardly anyone actually looks at it.
Or is this something that I could be doing more transparently in 2.1 with imapc?
On Tue, 2011-11-15 at 16:04 -0800, Mark Moseley wrote:
The gotcha is that you have two completely independent quotas with independent usage/limits for the INBOX and Archive namespaces. If that is what you want, it should all be fine.
Nope, that's totally fine. The idea is to put Archive on cheaper (slower) storage and then grant more generous quotas there to make it worth their while to use, without slowing down their Inbox. Another application would be to put their Spam in another namespace (for people who choose to have it put in a separate folder) with a lower quota, again to offload it onto cheaper storage, since hardly anyone actually looks at it.
Should be fine then.
Or is this something that I could be doing more transparently in 2.1 with imapc?
I don't really see how that could help.
On Wed, Nov 16, 2011 at 10:34 AM, Timo Sirainen <tss@iki.fi> wrote:
On Tue, 2011-11-15 at 16:04 -0800, Mark Moseley wrote:
The gotcha is that you have two completely independent quotas with independent usage/limits for the INBOX and Archive namespaces. If that is what you want, it should all be fine.
Nope, that's totally fine. The idea is to put Archive on cheaper (slower) storage and then grant more generous quotas there to make it worth their while to use, without slowing down their Inbox. Another application would be to put their Spam in another namespace (for people who choose to have it put in a separate folder) with a lower quota, again to offload it onto cheaper storage, since hardly anyone actually looks at it.
Should be fine then.
Or is this something that I could be doing more transparently in 2.1 with imapc?
I don't really see how that could help.
Ah, bummer. I thought maybe 2.1 could proxy to a separate folder or namespace (but I've also barely had a chance to look at it), like so certain folders would be grabbed from a proxy. Haven't really thought that through though :)
participants (2)
-
Mark Moseley
-
Timo Sirainen