How to enable PolicyD on Zimbra server


Lets take a look at how to activate policyd
1. Enable policy

su – zimbra
zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd

2. Activate web interface
Activate Policyd WebUI ( must run as root )

cd /opt/zimbra/data/httpd/htdocs/
ln -s /opt/zimbra/common/share/webui/ .

3. Edit configuration file

edit /opt/zimbra/common/share/webui/includes/config.php
#$DB_DSN=”sqlite:////tmp/cluebringer.sqlite”;
#$DB_DSN=”mysql:host=localhost;dbname=cluebringer”;
$DB_DSN=”sqlite:/opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb”;
$DB_USER=”root”;

4. Setup .htaccess file

#cd /opt/zimbra/common/share/webui/
# vi .htaccess
AuthUserFile /opt/zimbra/cbpolicyd-2.0.10/share/webui/.htpasswd
AuthGroupFile /dev/null
AuthName “User and Password”
AuthType Basic


require valid-user

5. Setup password file

Create htpasswd file, username and password

#touch .htpasswd
#/opt/zimbra/common/bin/htpasswd -cb .htpasswd username password

6. Add content to httpd.conf file
Add the following contents at the end of “httpd.conf” file

#vi /opt/zimbra/conf/httpd.conf
Alias /webui /opt/zimbra/common/share/webui/

AllowOverride AuthConfig
Order Deny,Allow
Allow from all

Restart apache

#su – zimbra
#zmapachectl restart

Access to WebUI

http://ipaddress:7780/webui/index.php