Configure and enable policyd on Zimbra
PolicyD can be used for rate limiting emails in Zimbra based on sender, receiver, username, IP, etc. per interval. Emails which exceed limit can be Defered or Rejected. The limit can be both on message count or message bytes. Thus, we can limit both number of emails or amount of data sent by particular user/IP using policyd.
To configure and enable policyd use following steps:
- As zimbra user
- zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd
- As root
- cd /opt/zimbra/httpd/htdocs/ && ln -s ../../cbpolicyd/share/webui
- Edit '/opt/zimbra/cbpolicyd/share/webui/includes/config.php' and change DB_DSN from mysql value to
- As root user run:
- su - zimbra -c "zmcontrol restart"
- su - zimbra -c "zmapachectl restart"
- Open http://<zimbra-server>:7780/webui/index.php
- Learned from https://imanudin.net/2014/09/08/how-to-install-policyd-on-zimbra-8-5/
- Also refer https://imanudin.net/2014/09/29/how-to-restrict-users-sending-to-certain-usersdomains-with-policyd/
- Some information on https://wiki.zimbra.com/wiki/Postfix_Policyd might also be useful