• Home
  • Free Stuff
  • About
  • Contact

Zimbra Tips : Rate-Limit Sending Message with PolicyD

February 9, 2014

Previous Article :

  1. Zimbra Tips : Installing & Configuring PolicyD on Zimbra 8
  2. Zimbra Tips : Securing PolicyD Web Admin

After installing, configuring and securing PolicyD, we can apply some policy rule on PolicyD, such as setting up maximum number of emails that can be sent by any account in a certain time interval. For example, each user can only send a maximum of 300 emails per hour, so if there are some compromised account they cannot send email beyond the limit.

policyd_logo

CONFIGURING POLICY

  1. Open the Administration Web PolicyD page, http://lpServerZimbra:7780/webui/index.php
  2. Select Quotas | Configure menu
  3. In the Action options, select Add and enter the details as below :
    Name : Delivery Per User
    Track : Select Sender@domain. This means that policy will be applies to each user on the domain
    Period : The length of time that given in seconds. Ideally is in counts per hour or 3600 seconds
    Link to policy : Select Default
    Verdict : The rules that will be apply if it meets the period, such as defer (hold the messages until next time interval)
    Data : Information that is given if it meets the rule, for example the information is a “Maximum 2 email delivery per minute” or “Maximum 300 emails delivery  per hour”
    Stop processing here : choose Yes, means that rule will not processing another rule
    Comment : can be filled with anything you like
    vavai-setting-up-policyd-rule
  4. Click Submit
  5. by default, the newly created rule set in the disabled state. Set it enable by choose PolicyD that you just created, and then on the Action option, select change
    vavai-enable-policyd-rule
  6. Change the parameter Disable=’Yes’ to Disable=’No’ on the Disabled option and click submit
  7. Select the newly created policy again  and then select Limits on the Action option
  8. Select Add, then select the Message Count and fill in with the number of maximum emails  on Counter Limit
    vavai-set-policyd-rule-limits
  9. Click Back to Limits and choose the rule that you have just created. Select Change In the Action option
  10. Change the parameter ‘Yes’ to ‘No’ on the Disabled option and click submit

Try to send emails beyond the limit. On the above screenshot, I’ve set maximum 2 emails for each user per minute. This is for example only so it wasn’t too long to see match condition for the above rule. for production use, better to set maximum emails limit  per hour rather than per minutes, to consider the possibility email in CC or BCC which also counted as a single email.

The following is an example screenshot while PolicyD block email from being sent because because the sender has exceeded the maximum limit of sending email quota.

PolicyDRate-LimitZimbra
Share

Linux

Masim "Vavai" Sugianto
Traveller, Open Source Enthusiast & Book Lover. Works as Independent Worker & Self-Employer.

8 Comments


Alessio
June 5, 2014 at 20:58
Reply

On point 3 in third line correct with:
Track : Select Sender:user@domain.

or I think it will cont number of messages for sender domain, not for single users.



Victory Audu
November 15, 2014 at 14:13
Reply

Hello sir. thank you for your guides they have been helpful. i want to know if it also counts the email items and the bcc and cc field ? because most users put their bulk email in the BCC field. thank you.



Carl Nguyen
May 19, 2016 at 12:36
Reply

Hi Vavai,

I did install policyd like this topic http://v2.vavai.net/2014/02/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/ then create a access control list but look like it doesn’t work.
My zimbra version is 8.0.5 and build on Centos 6.4. Any ideas with this?

Thanks



Masim "Vavai" Sugianto
May 19, 2016 at 13:23
Reply

@Car Nguyen,

1. Why don’t take a time to updating your OS and Zimbra into latest update?
2. If you don’t mind, would you please attach/paste some images/screenshot regarding your settings? You can send me some screenshot and send it using my personal email vavai [at] excellent [dot] co [dot] id



dinusha
July 5, 2019 at 12:34
Reply

Sir, Can we use rate limit per specific users using policyD



A.P.Doss
July 31, 2019 at 14:45
Reply

Dear Vavai,

Thank you for CBPolicyD explaination,
I need one help from you, How to create the multiple policy for email sending limits?
ex:-
email Id Per day Limit
xxx@Vavai.com 150
yyy@Vavai.com 150
zzz@Vavai.com 500
mmm@Vavai.com 500
nnn@Vavai.com 1000

Is it possible to configure in cbpolicyd? if yes kindly share the details about step by step configuration.

Thank you,
A.P.Doss



    George
    August 6, 2019 at 20:52
    Reply

    Hi A.P.Doss,

    Did you find any solution for create the multiple policy for email sending limits. Kindly reply to me
    My mail id : george.jebaraj@galaxyweblinks.in

George
August 6, 2019 at 20:50
Reply

Dear Vavai,

Thank you for CBPolicyD explaination,
I need one help from you, How to create the multiple policy for email Receiving / Sending limits?
ex:-
we use rate limit per specific users using policyD
xxx@Vavai.com 150
yyy@Vavai.com 150
zzz@Vavai.com 500
mmm@Vavai.com 500
nnn@Vavai.com 1000

Is it possible to configure in cbpolicyd? if yes kindly share the details about step by step configuration.

Thank you,
George



Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Recent Posts

    • Upgrading Zimbra 8.8.12 into 8.8.15 LTS
    • Docker Apps for Warming Up SMTP IP Address
    • Rsyslog Warning on Docker : rsyslogd: imklog: cannot open kernel log (/proc/kmsg)
    • Automatically Setting Timezone on Dockerfile
    • Create a Crontab Through a Script
    • Error debconf: unable to initialize frontend: Dialog
    • Custom SSL Certificate Deployment on vCenter Server 6.7
    • Commercial SSL Certificate Deployment on vSphere Host 6.7
    • VMware vSphere 6.7 Ebook (Indonesian)
    • Pursuing FIRE in Indonesia : Expenses and Living Cost



© Copyright LetsBlog Theme Demo - Theme by ThemeGoods