input license here

Instructions for installing PolicyD and configuring the email limit sent from the zimbra mail server


I. Install PolicyD



#su - zimbra
#zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd


  • Install policyd webUI (run as root)


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


#vi /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";


  • Create a .htaccess file with the following content to create an authentication layer when accessing WebUI:


#cd /opt/zimbra/common/share/webui/
#vi .htaccess
AuthUserFile /opt/zimbra/common/share/webui/.htpasswd
AuthGroupFile /dev/null
AuthName "User and Password"
AuthType Basic
<LIMIT GET>
require valid-user
</LIMIT>


  • Create htpasswd file, containing secure username and password information for policyd webUI page.


#touch .htpasswd
#/opt/zimbra/common/bin/htpasswd -cb .htpasswd admin admin123


  • Add the following configuration at the end of the httpd.conf . file


#vi /opt/zimbra/conf/httpd.conf
Alias /webui /opt/zimbra/common/share/webui/
<Directory /opt/zimbra/common/share/webui>
AllowOverride AuthConfig
Order Deny,Allow
Allow from all
</Directory>


  • Restart Zimbra's apache


#su - zimbra
#zmapachectl restart


  • Truy cập WebUI kiểm tra: http://ipaddress:7780/webui/index.php



II. Configure PolicyD to limit sending mail in zimbra mail server



  • Choose Policies | Groups section Action choose Add To add a new group, here create a group with the name limit. Select the newly created group, at Action choose members and enter the domain in the mail server. Change state disabled to state no in group and members groups.





  • Choose Policies | Main create a new policy with the name limit email, priority 20.




  • Select the newly created policy, at Action, choose members and create rules as shown below, change the state disabled sang no.




  • Choose Quotas | Configure, item action | add To create a rule to limit the number of emails:




  • Choose action | Limits To calculate the amount of mail will add the newly created rule:



Change state disabled sang no


Above are the configuration steps to limit sending email from the mail server to the outside and from the outside to the mail server with a limit of 400 emails / user / 2 hours.


Email check log is restricted to file: /opt/zimbra/log/cbpolicyd.log


Good luck!


Hoangtd


Related Posts
Diệp Quân
Nguyen Manh Cuong is the author and founder of the vmwareplayerfree blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Sticky