[Dovecot] domain quota in sql

Robert Schetterer robert at schetterer.org
Wed Feb 15 09:47:22 EET 2012


Am 15.02.2012 08:26, schrieb Adam Szpakowski:
> On 15.02.2012 02:55, Timo Sirainen wrote:
>> On 15.2.2012, at 3.54, Timo Sirainen wrote:
>>
>>> Domain-quota support in Dovecot is only partial. Recalculating domain
>>> quota would require more code. Last time when someone asked about
>>> this I wasn't even sure how it could be implemented, but nowadays it
>>> actually would be possible to do with:
>> Oh, and you could actually already do this with a doveadm script:
> [cut]
> I'm using something like this, but directly on the dbase level.
> Unfortunately such operation is quite db intensive, so I'm looking for a
> simpler solution.
> 
> Is there a way to add domainname as another collumn in dbase? This will
> simplify the SQL query and the GROUP BY could be used.
> 
>> Of course it would be nice if Dovecot internally supported this.
> I was under impression, that dovecot does support this. In examples one
> can see:
> 
> /usr/share/doc/dovecot-core/example-config/conf.d/90-quota.conf:
> 
> # Multiple quota roots are also possible, for example this gives each user
> # their own 100MB quota and one shared 1GB quota within the domain:
> plugin {
>   #quota = dict:user::proxy::quota
>   #quota2 = dict:domain:%d:proxy::quota_domain
> }
> 
> Also on dovecot2 wiki we can see (http://wiki2.dovecot.org/Quota/Dict):
> 
> "If username is left empty, the logged in username is used (this is
> typically what you want). Another useful username is '%d' for supporting
> domain-wide quotas."
> 
> 

Hi i am not sure what are trying to goal
with domain quota, if you setup your accounts i.e with postfixadmin etc
then its up to the gui logic , stopping postmasters to setup more
accounts ( with quotas ) as you ( the superadmin ) want.

For everything else user quotas usally are enough

thinkable maybe calculation of all users quotas in dict from one domain
in a sql postfix query table to stop deliver in more mail, but i dont
think this makes real sense

sorry if i missunderstand your question..
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria



More information about the dovecot mailing list