Difference between revisions of "CBpolicyd"

(How to configure quotas/groups for cbpolicyd (sqlite).)
(How to configure quotas/groups for cbpolicyd (sqlite).)
Line 8: Line 8:
 
Sqlite contains couple of tables, which are used for the configuration of zbpolicyd:  
 
Sqlite contains couple of tables, which are used for the configuration of zbpolicyd:  
  
'''sqlite> .tables'''
+
sqlite> .tables
 
access_control            greylisting_tracking
 
access_control            greylisting_tracking
 
accounting                greylisting_whitelist
 
accounting                greylisting_whitelist

Revision as of 12:48, 10 November 2014

How to configure quotas/groups for cbpolicyd (sqlite).

PolicyD v2 (codenamed "cluebringer") is a multi-platform policy server for popular MTAs. The main goal is to implement as many spam combating and email compliance features as possible. The configuration of cbpolicyd under Zimbra is done by editing the sqlite database as shown in the examples below.

Sqlite contains couple of tables, which are used for the configuration of zbpolicyd:

sqlite> .tables access_control greylisting_tracking accounting greylisting_whitelist accounting_tracking policies checkhelo policy_group_members checkhelo_blacklist policy_groups checkhelo_tracking policy_members checkhelo_whitelist quotas checkspf quotas_limits greylisting quotas_tracking greylisting_autoblacklist session_tracking greylisting_autowhitelist



To configure the quotas, we will predominantly work with the policies, policy_members, policy_groups, policy_group_members, quotas and quotas_limits tables.

First, we need to navigate and enter the sqlite database:

$ cd /opt/zimbra/data/cbpolicyd/db/

$ sqlite3 cbpolicyd.sqlitedb SQLite version 3.6.20 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite>


The next step is to list the tables which are used for the configuration:


The first step is to create our own policy:

sqlite> insert into policies(Name,Priority,Disabled) VALUES ('test_policy',0,0);

The above command will create a policy named test_policy, it will be enabled and will have priority 0, which means it will be picked up first from the list of the policies. The priorities goes as 1, then 2 and so on. Here is our newly created policy:

sqlite> select * from policies; 1|test_policy|0||0


The next thing to do is to edit the policy_members table, to specify what members will be included in the policy.


--IN PROGRESS--

Jump to: navigation, search