Assign Global space per domain using Domain Quota: Difference between revisions

m (Protected "Assign Global space per domain using Domain Quota": Protected for only Zimbra employees edit. ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(adjusting explanation of zimbraDomainAggregateQuota and adding note for zimbraDomainAdminMaxMailQuota)
 
(5 intermediate revisions by one other user not shown)
Line 5: Line 5:
{{KB|{{WIP}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0}}|}}
{{KB|{{WIP}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0}}|}}
==Purpose==
==Purpose==
Learn how to assign Global space per domain using Domain Quota. An interesting feature to control the Total space per domain, instead per each Mailbox.
Learn how to assign Global space per domain using Domain Quota. This is an interesting feature used to control the Total space per domain instead of per each Mailbox.


==Resolution==
==Resolution==
Since Zimbra Collaboration 8.0.x, you can restrict the Global space per Domain, instead per account, this could be nice for some Customer cases, or Service Providers that can sell a global Space to share between all accounts, instead do it per account.
Since Zimbra Collaboration 8.0.x, you can restrict the Global space per Domain instead of per account. This is a useful feature for some Customer cases and for Service Providers who sell a global Space to share between all accounts; they can instead do it per account.


During this Wiki article we will use the domain zimbralab.local, but you need to follow the steps using your own domain:
During this Wiki article we will use the domain zimbralab.local, but you need to follow the steps using your own domain:
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/6/62/Zimbra-global-space-domain-quota-001.png</div><br />
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/6/62/Zimbra-global-space-domain-quota-001.png</div><br />


Then, you must go under Home > Configure > Domains > zimbralab.local > Advanced where you must add the desired values, please note that the fields are based in byte (B)
Then, go to Home > Configure > Domains > zimbralab.local > Advanced where you add the desired values. Please note that the fields are based in bytes (B).
* Domain Quota (Bytes) - '''zimbraMailDomainQuota''' - If you want to assign 20MB for the whole domain, just to check, you need to introduce 20971520 in the Domain Quota (Bytes) field.
* Domain Quota (Bytes) - '''zimbraMailDomainQuota''' - This specifies a default quota for each account in the domain (for any account that does not have zimbraMailQuota explicitly set). When set to 20100200, for example, each account in the domain will have a quota around 20MB.
* Domain Aggregate Quota (Bytes) - '''zimbraDomainAggregateQuota''' - In this field you can add the "extra" space that the Domain can have after the Quota is reached. In this example, 5MB or 5242880 B.
 
* Domain Aggregate Quota Warning Percent - '''zimbraDomainAggregateQuotaWarnPercent''' - In this field you need to add the % that the domain should fill to send an email to the Email Account that you can configure in the next field. In this example, 75%.
* Domain Aggregate Quota (Bytes) - '''zimbraDomainAggregateQuota''' - In this field you can specify an aggregate quota for the entire domain. If the value is 100200300400, for example, then the total used by all mailboxes cannot exceed about 100GB. ''(Note: this guide previously referred to this field as a configuration for extra space as a buffer once the domain quota was reached.)''
 
* Domain Aggregate Quota Warning Percent - '''zimbraDomainAggregateQuotaWarnPercent''' - In this field you add the % that the domain should fill to send an email to the Email Account that you configure in the next field. In this example, 75%.
* Domain Aggregate Quota Warning Email Recipient - '''zimbraDomainAggregateQuotaWarnEmailRecipient''' - The email contact to send the warning message once the percent is reached.
* Domain Aggregate Quota Warning Email Recipient - '''zimbraDomainAggregateQuotaWarnEmailRecipient''' - The email contact to send the warning message once the percent is reached.
* Domain Aggregate Quota Policy - '''zimbraDomainAggregateQuotaPolicy''' - In this drop menu you need to select what to do once the Quota is reached, you have 3 different options:
* Domain Aggregate Quota Policy - '''zimbraDomainAggregateQuotaPolicy''' - In this menu, select what to do once the Quota is reached. You have 3 different options:
** allow send/receive
** allow send/receive
** block send
** block send
** block send/receive
** block send/receive
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/1/1d/Zimbra-global-space-domain-quota-002.png</div><br />
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/1/1d/Zimbra-global-space-domain-quota-002.png</div><br />
When configuring an admin account (Home > Manage > Accounts):
* Maximum Quota (MB) administrator can specify - '''zimbraDomainAdminMaxMailQuota''' - This controls the maximum quota that the administrator can set for a user.


===Lab example===
===Lab example===
Line 36: Line 41:
  userc@zimbralab.local 20971520 0
  userc@zimbralab.local 20971520 0
  virus-quarantine.b35czscroj@zimbralab.local 20971520 0
  virus-quarantine.b35czscroj@zimbralab.local 20971520 0
In this case we can see that the Domain has a Global Domain Quota set at 20MB, from which between all users are using 877744 bytes in total, less than 1MB.
In this case, we can see that the Domain has a Global Domain Quota set at 20MB, from which all users are using 877744 bytes in total, less than 1MB.


====Filling the domain up to the 75%====
====Filling the domain up to the 75%====
Let's send some 5MB message between the accounts, to reach the quota quickly. The Quota cron job is scheduled at 02.15am, but you can force it to see the real Quota right now, so the domain right now is using 15164444 bytes, that means around 15MB:
Let's send some 5MB message between the accounts to reach the quota quickly. The Quota cron job is scheduled at 02.15am, but you can force it to see the real Quota right now. The domain right now is using 15164444 bytes, around 15MB:
<pre>/opt/zimbra/libexec/zmcomputequotausage
<pre>/opt/zimbra/libexec/zmcomputequotausage
<ComputeAggregateQuotaUsageResponse xmlns="urn:zimbraAdmin">
<ComputeAggregateQuotaUsageResponse xmlns="urn:zimbraAdmin">
Line 45: Line 50:
</ComputeAggregateQuotaUsageResponse></pre>
</ComputeAggregateQuotaUsageResponse></pre>


In this example we've set to 20MB plus 5MB more, and don't allow send or receive messages, so once the the Quota Warning % is reached you will receive an email like this:
In this example, we've set to 20MB plus 5MB more, and we don't allow sending or receiving messages, so once the the Quota Warning % is reached you will receive an email like this:
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/7/7c/Zimbra-global-space-domain-quota-003.png</div><br />
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/7/7c/Zimbra-global-space-domain-quota-003.png</div><br />
====Error message after reach the 100%====
====Error message after reaching 100%====
If you deny to send messages once the Domain Quota is filled, the users will see the next message while they want to send messages:
If you deny sending messages once the Domain Quota is reached, the users will see the next warning when they attempt to send messages:
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/d/da/Zimbra-global-space-domain-quota-004.png</div><br />
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/d/da/Zimbra-global-space-domain-quota-004.png</div><br />


=====Log trace if the domain reaches the 100%=====
=====Log trace if the domain reaches 100%=====
<pre>2015-07-07 15:20:44,542 INFO  [qtp509886383-1225:https://192.168.211.20:8443/service/soap/SendMsgRequest] [name=admin@zimbralab.local;mid=2;ip=192.168.211.20;ua=ZimbraWebClient - GC45 (Mac)/8.6.0_GA_1178;] SoapEngine - handler exception
<pre>2015-07-07 15:20:44,542 INFO  [qtp509886383-1225:https://192.168.211.20:8443/service/soap/SendMsgRequest] [name=admin@zimbralab.local;mid=2;ip=192.168.211.20;ua=ZimbraWebClient - GC45 (Mac)/8.6.0_GA_1178;] SoapEngine - handler exception
com.zimbra.cs.mailbox.MailServiceException: domain exceeded aggregate quota of 5242880 bytes
com.zimbra.cs.mailbox.MailServiceException: domain exceeded aggregate quota of 5242880 bytes

Latest revision as of 20:26, 28 June 2017

Assign Global space per domain using Domain Quota

   KB 22320        Last updated on 2017-06-28  




0.00
(0 votes)

Purpose

Learn how to assign Global space per domain using Domain Quota. This is an interesting feature used to control the Total space per domain instead of per each Mailbox.

Resolution

Since Zimbra Collaboration 8.0.x, you can restrict the Global space per Domain instead of per account. This is a useful feature for some Customer cases and for Service Providers who sell a global Space to share between all accounts; they can instead do it per account.

During this Wiki article we will use the domain zimbralab.local, but you need to follow the steps using your own domain:

Zimbra-global-space-domain-quota-001.png

Then, go to Home > Configure > Domains > zimbralab.local > Advanced where you add the desired values. Please note that the fields are based in bytes (B).

  • Domain Quota (Bytes) - zimbraMailDomainQuota - This specifies a default quota for each account in the domain (for any account that does not have zimbraMailQuota explicitly set). When set to 20100200, for example, each account in the domain will have a quota around 20MB.
  • Domain Aggregate Quota (Bytes) - zimbraDomainAggregateQuota - In this field you can specify an aggregate quota for the entire domain. If the value is 100200300400, for example, then the total used by all mailboxes cannot exceed about 100GB. (Note: this guide previously referred to this field as a configuration for extra space as a buffer once the domain quota was reached.)
  • Domain Aggregate Quota Warning Percent - zimbraDomainAggregateQuotaWarnPercent - In this field you add the % that the domain should fill to send an email to the Email Account that you configure in the next field. In this example, 75%.
  • Domain Aggregate Quota Warning Email Recipient - zimbraDomainAggregateQuotaWarnEmailRecipient - The email contact to send the warning message once the percent is reached.
  • Domain Aggregate Quota Policy - zimbraDomainAggregateQuotaPolicy - In this menu, select what to do once the Quota is reached. You have 3 different options:
    • allow send/receive
    • block send
    • block send/receive
Zimbra-global-space-domain-quota-002.png

When configuring an admin account (Home > Manage > Accounts):

  • Maximum Quota (MB) administrator can specify - zimbraDomainAdminMaxMailQuota - This controls the maximum quota that the administrator can set for a user.

Lab example

You can check the Domain Quota as well as the space that each account is using with the next command:

zimbra@zimbra-sn-u14-10:~$ zmprov gqu `zmhostname` |grep zimbralab.local
admin@zimbralab.local 20971520 850834
userb@zimbralab.local 20971520 16464
usera@zimbralab.local 20971520 8070
user30@zimbralab.local 20971520 2376
galsync.i4aqxpuk4s@zimbralab.local 20971520 0
ham.tqii1zmg7x@zimbralab.local 20971520 0
spam.9xvljn5ppc@zimbralab.local 20971520 0
userc@zimbralab.local 20971520 0
virus-quarantine.b35czscroj@zimbralab.local 20971520 0

In this case, we can see that the Domain has a Global Domain Quota set at 20MB, from which all users are using 877744 bytes in total, less than 1MB.

Filling the domain up to the 75%

Let's send some 5MB message between the accounts to reach the quota quickly. The Quota cron job is scheduled at 02.15am, but you can force it to see the real Quota right now. The domain right now is using 15164444 bytes, around 15MB:

/opt/zimbra/libexec/zmcomputequotausage
<ComputeAggregateQuotaUsageResponse xmlns="urn:zimbraAdmin">
  <domain name="zimbralab.local" id="c8c355cd-d76d-449a-bd2e-8e25b6b51e02" used="15164444"/>
</ComputeAggregateQuotaUsageResponse>

In this example, we've set to 20MB plus 5MB more, and we don't allow sending or receiving messages, so once the the Quota Warning % is reached you will receive an email like this:

Zimbra-global-space-domain-quota-003.png

Error message after reaching 100%

If you deny sending messages once the Domain Quota is reached, the users will see the next warning when they attempt to send messages:

Zimbra-global-space-domain-quota-004.png

Log trace if the domain reaches 100%
2015-07-07 15:20:44,542 INFO  [qtp509886383-1225:https://192.168.211.20:8443/service/soap/SendMsgRequest] [name=admin@zimbralab.local;mid=2;ip=192.168.211.20;ua=ZimbraWebClient - GC45 (Mac)/8.6.0_GA_1178;] SoapEngine - handler exception
com.zimbra.cs.mailbox.MailServiceException: domain exceeded aggregate quota of 5242880 bytes
ExceptionId:qtp509886383-1225:https://192.168.211.20:8443/service/soap/SendMsgRequest:1436278844542:090b76b3080b4319
Code:mail.DOMAIN_QUOTA_EXCEEDED Arg:(limit, NUM, "5242880")
        at com.zimbra.cs.mailbox.MailServiceException.DOMAIN_QUOTA_EXCEEDED(MailServiceException.java:359)
        at com.zimbra.cs.util.AccountUtil.checkQuotaWhenSendMail(AccountUtil.java:107)
        at com.zimbra.cs.service.mail.SendMsg.handle(SendMsg.java:103)
        at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEngine.java:569)
        at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:432)
        at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:266)
        at com.zimbra.soap.SoapServlet.doWork(SoapServlet.java:303)
        at com.zimbra.soap.SoapServlet.doPost(SoapServlet.java:213)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:206)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651)
        at com.zimbra.cs.servlet.CsrfFilter.doFilter(CsrfFilter.java:176)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at com.zimbra.cs.servlet.RequestStringFilter.doFilter(RequestStringFilter.java:54)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at com.zimbra.cs.servlet.SetHeaderFilter.doFilter(SetHeaderFilter.java:59)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)
        at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:351)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at com.zimbra.cs.servlet.ETagHeaderFilter.doFilter(ETagHeaderFilter.java:47)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at com.zimbra.cs.servlet.ContextPathBasedThreadPoolBalancerFilter.doFilter(ContextPathBasedThreadPoolBalancerFilter.java:107)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at com.zimbra.cs.servlet.ZimbraQoSFilter.doFilter(ZimbraQoSFilter.java:116)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at com.zimbra.cs.servlet.ZimbraInvalidLoginFilter.doFilter(ZimbraInvalidLoginFilter.java:117)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at org.eclipse.jetty.servlets.DoSFilter.doFilterChain(DoSFilter.java:457)
        at org.eclipse.jetty.servlets.DoSFilter.doFilter(DoSFilter.java:326)
        at org.eclipse.jetty.servlets.DoSFilter.doFilter(DoSFilter.java:299)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:544)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:309)
        at org.eclipse.jetty.server.handler.DebugHandler.handle(DebugHandler.java:81)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:462)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
        at java.lang.Thread.run(Thread.java:745)

Additional Content

  • No related content
Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 09/09/2015
Article ID: https://wiki.zimbra.com/index.php?title=Assign_Global_space_per_domain_using_Domain_Quota Date Modified: 2017-06-28



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by SME1 SME2 Copyeditor Last edit by Bobby
Jump to: navigation, search