Limit Sending/Receipt Email Per day, Per Week or Per Month

For activating module accounting, open webui via browser


choose accounting | configure. Select add, and fill with the following example

Name : Rate limit perday
Link to policy : Default
Track : Sender:@domain . You can choose with your choice
Period : Daily
Message Count Limit : 5000
Message Cumulative Size Limit : empty. I am not using cumulative size
Verdict : HOLD.
Data : You can fill with information if policy has been fulfilled. for example, you can fill with "Sorry, your maximum email perday have been full"
Stop processing here : No
Comment : You can fill with comment or emptied
Disabled : No

If no tables for module accounting and get information “no such table” while create rule, you can manually adding tables accounting to sqlite.

cd /opt/zimbra/cbpolicyd/share/database/
./convert-tsql sqlite accounting.tsql > /tmp/accounting.sql
vi /tmp/accounting.sql

Delete all lines starting with # (comment) and saved. Inject database to sqlite

sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb < /tmp/accounting.sql

Don’t forget to enable accounting module on Zimbra

su - zimbra
zmprov ms `zmhostname` zimbraCBPolicydAccountingEnabled TRUE
zmcbpolicydctl restart

please check log cbpolicyd.log and you can get information like below

[2014/11/29-21:33:37 - 27354] [CORE] INFO: module=Accounting, mode=update, host=,,,, reason=accounting_update, policy=1, accounting=2,, period=2014-11-29, count=2/5000 (0.0%), size=0/-


How To Limit Sending/Receipt Email Per day, Per Week or Per Month

Zimbra Tips : How To Configure Rate Limit Sending Message on PolicyD


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.