Powered by Blogger.

Zimbra Tips : PolicyD & Rate-Limit Sending Message Implementation on Zimbra 8

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.

PolicyD 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

01.su - zimbra
02.zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd
03.zmlocalconfig -e postfix_enable_smtpd_policyd=yes
04.zmprov mcf +zimbraMtaRestriction "check_policy_service inet:127.0.0.1:10031"
05. 
06.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
07. 
08.zmcontrol restart
09.exit

WEB UI ACTIVATION FOR POLICYD MANAGEMENT
Run the following command by using root permission

1.cd /opt/zimbra/httpd/htdocs/ && ln -s ../../cbpolicyd/share/webui

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

1.$DB_DSN="sqlite:/opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb";

Reload Web UI (http) service with the following command :

1.cd /srv/
3.tar -zxvf cluebringer-snapshot-2.1.x-201205100639.tar.gz
4.cd cluebringer-snapshot-2.1.x-201205100639/webui/
5.cp *.php *.css /opt/zimbra/cbpolicyd/share/webui/
6.su - zimbra -c "zmapachectl restart"

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 :

    Blogger Comment
    Facebook Comment