Multiple namespaces with individual quota values from LDAP
Hi all,
I have successfully managed to get individual user qota for inboxes with values from LDAP working on Dovecot 2.4. I achieved this with the help of a posting from Aki Tuomi:
<-- I'd recommend moving the storage_size out of quota "User Quota", since it's then easier to override:
quota "User quota" { driver = count ... } quota_storage_size = 10G
Aki -->
However, in my setup I am using a separate namespace for mail "archiving" on a slower storage. I would like to also restrict the available storage space for users individually in this namespace. To achieve this I ideally would like to fetch the value from a different LDAP attribute.
Can this be achieved with dovecot 2.4 ? In version 2.3 this was not a problem.
Thank you very much for your kind help.
Best regards Andraes
On 10. Apr 2025, at 13.20, Andreas Oster via dovecot <dovecot@dovecot.org> wrote:
However, in my setup I am using a separate namespace for mail "archiving" on a slower storage. I would like to also restrict the available storage space for users individually in this namespace. To achieve this I ideally would like to fetch the value from a different LDAP attribute.
Can this be achieved with dovecot 2.4 ? In version 2.3 this was not a problem.
This should work:
quota global_quota { storage_size = 1G } namespace foo { quota foo_quota { storage_size = 2G } }
and then return from userdb quota/global_quota/storage_size=10G or quota/foo_quota/storage_size=20G.
If you use "User quota" or other such quota root name with spaces, it may be easier to do:
quota global_quota { name = User quota storage_size = 1G }
So you can still use quota/global_quota/storage_size to override.
On 10. Apr 2025, at 13.43, Timo Sirainen via dovecot <dovecot@dovecot.org> wrote:
This should work:
quota global_quota { storage_size = 1G } namespace foo { quota foo_quota { storage_size = 2G } }
and then return from userdb quota/global_quota/storage_size=10G or quota/foo_quota/storage_size=20G.
If you use "User quota" or other such quota root name with spaces, it may be easier to do:
quota global_quota { name = User quota storage_size = 1G }
So you can still use quota/global_quota/storage_size to override.
And you can actually even do:
quota_storage_size = 1G quota global_quota { }
namespace foo { quota foo_quota { storage_size = 2G } }
And then userdb can override quota_storage_size for global_quota and quota/foo_quota/storage_size for foo_quota. Returning only quota_storage_size wouldn't apply to foo_quota.
participants (2)
-
Andreas Oster
-
Timo Sirainen