Am 15.02.2012 09:07, schrieb Adam Szpakowski:
On 15.02.2012 08:47, Robert Schetterer wrote:
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. My fault, I should add some "big picture" info. We are using admin panel based on iRedMail Panel, and want to show quota usage on the domain level. Quota enforcing is only on user level and this part works nicely. What I need is to have in dbase live data which allows me to get quota usage on the domain level to show it in the admin panel. The problem is, that this operation must not by db intensive. Getting entire db and the processing it with some script is fine for daily reports but not for "live" view.
as workaround it should be possible to calculate filllevel by domain with some bash script and cron sending an info mail to you might be not exact, but enough to see whats going on ( depends on your real domain/mailbox setup...maildir etc)
i.e like du -sch schetterer.org/ 1,7G schetterer.org/
or
du -sch schetterer.org/* 24K schetterer.org/....@schetterer.org 431M schetterer.org/...@schetterer.org 1,3G schetterer.org/....@schetterer.org 1,7G sum
perhaps the same works with getting it out from sql
My example with doveadm for quota recalc was only a way to show how the problem can be triggered. We are not using doveadm for this purpose.
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 In future the quota enforcement on domain level could be a nice add-on, but for now it is not so important for us.
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria