King0770-Notes-Setup-RateLimiting-with-CBPOLICYD: Difference between revisions

No edit summary
Line 1: Line 1:
This is an simple example of how-to setup rate limiting for your users.  
This is an simple example of how-to setup rate limiting for your users.  
See my article if you are interested in using cbpolicyd's webui, see https://wiki.zimbra.com/wiki/King0770-Notes-Enable-webui-for-cbpolicyd-Unsupported
See my article if you are interested in using cbpolicyd's webui, see https://wiki.zimbra.com/wiki/King0770-Notes-Enable-webui-for-cbpolicyd-Unsupported


== Create Default Outbound Policy ==
== Create Default Outbound Policy ==
[[CbpolicyDefaultOutboundPolicy.png|900px|Image: 900 pixels]]
[[File:CbpolicyDefaultOutboundPolicy.png|900px|Image: 900 pixels]]


== Add Member to Default Oubound Policy ==
== Add Member to Default Oubound Policy ==

Revision as of 19:01, 19 March 2020

This is an simple example of how-to setup rate limiting for your users. See my article if you are interested in using cbpolicyd's webui, see https://wiki.zimbra.com/wiki/King0770-Notes-Enable-webui-for-cbpolicyd-Unsupported

Create Default Outbound Policy

Image: 900 pixels

Add Member to Default Oubound Policy

Image: 900 pixels

Add Internal Domain Policy Group

Image: 900 pixels


Add Domain as a Member to the Internal Domain

Image: 900 pixels

Add Quota for Rate Limiting

Image: 900 pixels

Image: 900 pixels

Add Quota

Image: 900 pixels

Add Quota Limit

Image: 900 pixels


Enabled the zimbraCBPolicydQuotasEnabled Setting

Enable cbpolicyd (run from the zimbra-MTA)
-------------------------------------------

zmprov ms `zmhostname` +zimbraServiceEnabled cbpolicyd   <<==note the use of the plus sign character

zmprov ms `zmhostname` zimbraCBPolicydQuotasEnabled TRUE

zmprov mcf zimbraCBPolicydQuotasEnabled TRUE

zmconfigdctl restart

zmmtactl restart

zmcbpolicydctl restart


Disable cbpolicyd
------------------
zmprov ms `zmhostname` -zimbraServiceEnabled cbpolicyd  <<==note the use of the minus character

zmconfigdctl restart

zmmtactl restart

zmcbpolicydctl stop

Things To Know

Add the following to Zimbra's crontab

00 3 * * * /opt/zimbra/common/bin/cbpadmin --config=/opt/zimbra/conf/cbpolicyd.conf  --cleanup
  • You will need to re-add the cbpadmin command back into zimbra's crontab after each upgrade
  • When you test, pay extra close attention to the /opt/zimbra/log/cbpolicyd.log & /var/log/zimbra.log in the next few days
  • cbpolicyd's backend is sqlite3, which has it's own limitations. there is an RFE to change cbpolicyd's backend from sqlite3 to mysql (not available yet).

Raw Code if you want to copy & paste and import and edit

More articles written by me, https://wiki.zimbra.com/wiki/King0770-Notes

Jump to: navigation, search