Difference between revisions of "Assign Global space per domain using Domain Quota"

(Purpose)
(Resolution)
Line 8: Line 8:
  
 
==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:

Revision as of 16:44, 9 September 2015

Assign Global space per domain using Domain Quota

   KB 22320        Last updated on 2015-09-9  




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, 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)

  • 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 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 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:
    • allow send/receive
    • block send
    • block send/receive
Zimbra-global-space-domain-quota-002.png

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 between 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, so the domain right now is using 15164444 bytes, that means 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 don't allow send or receive 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 reach the 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:

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

Log trace if the domain reaches the 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: 2015-09-09



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 Gayle Billat
Jump to: navigation, search