[HowTo] Enabling CB...
 
Notifications
Clear all

[Sticky] [HowTo] Enabling CBPolicyD in Zimbra 8.0.0 and 8.0.1

1 Posts
1 Users
0 Likes
640 Views
 Cine
(@cine)
Posts: 25
Topic starter
 

WARNING: This guide applies to Zimbra 8.0.0 and 8.0.1. If you are running Zimbra 8.0.2+ please find the official docs at Postfix Policyd - Zimbra :: Wiki

Hello everybody!Due to popular demand, I took some time to check out how to enable CBPolicyD in Zimbra 8 (right now this applies for both version 8.0.0 and 8.0.1)! Luckily the steps haven't changed a bit since Zimbra 7.1.1, so the guide posted HERE is still valid...


HOWEVER!!!

Two additional steps are required:

Step 1: Retrieving the WebUI files
It looks like most of the files comprising the Web Interface for CBPolicyD are missing in the Zimbra 8.0.0 and 8.0.1 packages. If you want to obtain the missing files you should do the following:

- Point your browser at Download | Policyd
- Locate the "Unstable v2.1.x Snapshot" box and click on Download Now
- Download the "v2.1.x-201205100639" package in your favourite format (.tar.bz2, .tar.gz, .tar.xz or .zip)
- Unpack the package. You'll see that it contains 3 folders and a lot of .php and .css files.
- Copy the .php and .css files in the /opt/zimbra/cbpolicyd/share/webui/ directory in your Zimbra server

Now that you have all the files you need you can enable the WebUI in one of the 2 ways described in the original post.

Step 2: Initializing the database
Before enabling the CBPolicyD module you need to initialize it's database.
The initialization procedure for a SQLite Database is the following:

cd /opt/zimbra/cbpolicyd/share/database/

for i in core.tsql access_control.tsql quotas.tsql amavis.tsql checkhelo.tsql checkspf.tsql greylisting.tsql accounting.tsql
do
./convert-tsql sqlite $i
done > /tmp/db1.sql

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

Special thanks to Mishikal for contributing some nice suggestions!

Enjoy!
Cine


cd /opt/zimbra/cbpolicyd/share/database/


for i in core.tsql access_control.tsql quotas.tsql amavis.tsql checkhelo.tsql checkspf.tsql greylisting.tsql accounting.tsql
do
./convert-tsql sqlite $i
done > /tmp/db1.sql

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

Special thanks to Mishikal for contributing some nice suggestions!

Enjoy!
Cine

 
Posted : 12/04/2012 19:02