From PolicyD website : Policyd v2 (codenamed “cluebringer”) is a multi-platform policy server for popular MTAs. This policy daemon is designed mostly for large scale mail hosting environments. The main goal is to implement as many spam combating and email compliance features as possible while at the same time maintaining the portability, stability and performance required for mission critical email hosting of today. Most of the ideas and methods implemented in Policyd v2 stem from Policyd v1 as well as the authors’ long time involvement in large scale mail hosting industry.
PolicyD can be integrated into Zimbra to add an anti spam layer, especially for rate-limit sending message. We can set maximum messages both for receiving and sending policy and prevent mail server IP address to be blacklisted due to spam message to outside network.
vmware_zimbra_logoPolicyD activation procedure on Zimbra 8 is slightly different from the procedures on previous version. Some of  features on PolicyD include Access Control, amavis, CheckHelo, CheckSPF, Greylisting, Quotas and Accounting. The new features can be configured through the Web Administration Policyd as well as standard feature.
Below are PolicyD activation procedure on Zimbra 8, fully tested on Zimbra 8.0.6, the latest version of the time this article was written.
ACTIVATING POLICYD ADDON
[code language=”bash”]
su – zimbra
zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd
zmlocalconfig -e postfix_enable_smtpd_policyd=yes
zmprov mcf +zimbraMtaRestriction “check_policy_service inet:127.0.0.1:10031”
zmlocalconfig -e cbpolicyd_log_level=4; zmlocalconfig -e cbpolicyd_log_detail=modules,tracking,policies; zmlocalconfig -e cbpolicyd_module_accesscontrol=1 cbpolicyd_module_checkhelo=1 cbpolicyd_module_checkspf=1 cbpolicyd_module_greylisting=1 cbpolicyd_module_quotas=1
zmcontrol restart
exit
[/code]
WEB UI ACTIVATION FOR POLICYD MANAGEMENT
Run the following command by using root permission
[code language=”bash”]
cd /opt/zimbra/httpd/htdocs/ && ln -s ../../cbpolicyd/share/webui
[/code]
Modify file /opt/zimbra/cbpolicyd-2.1.0-beta/share/webui/includes/config.php (vi /opt/zimbra/cbpolicyd-2.1.0-beta/share/webui/includes/config.php) and mark a comment (#) to the line begining with: $DB_DSN and add the following code before line begining with : $DB_USER
[code language=”bash”]
$DB_DSN=”sqlite:/opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb”;
[/code]
Reload Web UI (http) service with the following command :
[code language=”bash”]
cd /srv/
wget -c http://devlabs.linuxassist.net/attachments/download/230/cluebringer-snapshot-2.1.x-201205100639.tar.gz
tar -zxvf cluebringer-snapshot-2.1.x-201205100639.tar.gz
cd cluebringer-snapshot-2.1.x-201205100639/webui/
cp *.php *.css /opt/zimbra/cbpolicyd/share/webui/
su – zimbra -c “zmapachectl restart”
[/code]
Try to open PolicyD web management by accessing the following URL : http://IpAddressOfZimbra:7780/webui/index.php, the correct result should be similar as below :
policyD_webadmin

Leave a Reply

Your email address will not be published.