cbpolicy quota module - working via Zimbra web client, not working with smtp emails

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
phoenix
Ambassador
Ambassador
Posts: 26283
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

cbpolicy quota module - working via Zimbra web client, not working with smtp emails

Postby phoenix » Fri Jun 27, 2014 6:37 am

[quote user="minhhoang"]Could you please share your work? I wish I can control rate limit for outgoing mail basing on SASLusername too. [/QUOTE]You should always provide the exact version of ZCS that you're using (and update your forum profile with that information) by posting the output of the following command:
zmcontrol -v[/quote]If you're not on the most recent version of ZCS then I suggest you upgrade. You should also tell us which of the forum thread and wiki articles you've used to try and solve your problem and what happened, have you looked at any of those threads or articles?


Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
minhhoang
Posts: 28
Joined: Sat Sep 13, 2014 3:14 am

cbpolicy quota module - working via Zimbra web client, not working with smtp emails

Postby minhhoang » Sat Jun 28, 2014 1:31 am

Dear phoenix,
Thank for your remind. I have just updated my profile with info: Release 8.0.7_GA_6021.RHEL6_64_20140408123911 RHEL6_64 FOSS edition.

I followed Postfix Policyd - Zimbra :: Wiki .

Unfortunately rate limit doesn't work at all. I can send a lot of mails (over 20 message per 60s). Here are my configuration:

[QUOTE]sqlite> select * from policy_members;

1|1||||0

2|2|%internal_ips,%internal_domains|!%internal_domains||0

3|3|!%internal_ips,!%internal_domains|%internal_domains||0

4|4|%internal_ips,%internal_domains|%internal_domains||0

5|5|@example.net|||0

6|6|any|any||0

[/QUOTE]

[QUOTE]sqlite> select * from policy_group_members;

1|1|192.168.0.0/16|0|

2|2|@abc.vn|0|

3|2|@abc.vn|0|

4|1|10.10.10.0/8|0|

[/QUOTE]

[QUOTE]sqlite> select * from quotas;

1|5|Recipient quotas|Recipient:user@domain|3600|REJECT||0||0

2|5|Quota on all /24s|SenderIP:/24|3600|REJECT||0||0

7|6|Sender:user@domain|Sender:user@domain|60|DEFER|Deferring: Too many messages from sender in last 60s|0||0

8|6|Recipient:@domain|Recipient:@domain|60|REJECT||0||0

[/QUOTE]

[QUOTE]sqlite> select * from quotas_limits;

1|1|MessageCount|10||0

2|1|MessageCumulativeSize|8000||0

3|2|MessageCount|12||0

8|7|MessageCount|20||0

9|8|MessageCount|300||0

[/QUOTE]

[QUOTE][zimbra@mta01 ~]$ zmlocalconfig | grep -i cbpolicy

cbpolicyd_bind_port = 10031

cbpolicyd_bypass_mode = tempfail

cbpolicyd_bypass_timeout = 30

cbpolicyd_cache_file = ${zimbra_home}/data/cache

cbpolicyd_db_file = ${zimbra_home}/data/cbpolicyd/db/cbpolicyd.sqlitedb

cbpolicyd_log_detail = modules

cbpolicyd_log_file = ${zimbra_log_directory}/cbpolicyd.log

cbpolicyd_log_level = 3

cbpolicyd_log_mail = main

cbpolicyd_max_requests = 1000

cbpolicyd_max_servers = 64

cbpolicyd_max_spare_servers = 16

cbpolicyd_min_servers = 8

cbpolicyd_min_spare_servers = 8

cbpolicyd_module_accesscontrol = 0

cbpolicyd_module_accounting = 0

cbpolicyd_module_amavis = 0

cbpolicyd_module_checkhelo = 0

cbpolicyd_module_checkspf = 1

cbpolicyd_module_greylisting = 1

cbpolicyd_module_greylisting_blacklist_msg = Greylisting in effect, sending server blacklisted

cbpolicyd_module_greylisting_defer_msg = Greylisting in effect, please come back later

cbpolicyd_module_greylisting_training = 1

cbpolicyd_module_quotas = 1

cbpolicyd_pid_file = ${zimbra_log_directory}/cbpolicyd.pid

cbpolicyd_timeout_busy = 120

cbpolicyd_timeout_idle = 1020

[/QUOTE]
Hope that you can point me to right way.
Regards,

Minh.
minhhoang
Posts: 28
Joined: Sat Sep 13, 2014 3:14 am

cbpolicy quota module - working via Zimbra web client, not working with smtp emails

Postby minhhoang » Mon Jun 30, 2014 1:37 am

I see that there are no "check_policy_service inet:localhost:10031" in postconf. This maybe the reason that cbpolicyd doesn't receive any message from postfix and therefore no log in cbpolicyd.log? I don't know why this happen. Can I manually add this parameter to main.cf file?
Regards,

Minh.
minhhoang
Posts: 28
Joined: Sat Sep 13, 2014 3:14 am

cbpolicy quota module - working via Zimbra web client, not working with smtp emails

Postby minhhoang » Tue Jul 01, 2014 11:58 pm

I solved my problem by disabale and then re-enable cbpolicyd service.

Regards,

Minh.

Return to “Administrators”

Who is online

Users browsing this forum: fayaz and 8 guests