[Dovecot] Glued-together private namespaces

Mark Moseley moseleymark at gmail.com
Mon Sep 26 20:11:45 EEST 2011


On Fri, Sep 23, 2011 at 3:35 PM, Mark Moseley <moseleymark at 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?


More information about the dovecot mailing list