1

Topic: Don't get web-ui cluebringer and don't work quota (Throttling)

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
============ Required information ====
- iRedMail version: 0.9.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Linux/BSD distribution name and version: ubuntu 14.04 LTS
- Related log if you're reporting an issue:
====
Hi.
1. I can't look cluebringer web interface.
I can't setup a quota for user in web-interface iRedAdmin-Pro (v2.3.1 (LDAP))
Throttling for user - 200 000 Byte per 1 minute (for test) and ser from this user 2Mb and message is pass...
in mail.log:
=======================
Jun 10 14:40:48 post- cbpolicyd[3839]: module=Quotas, mode=update, host=1.2.3.4, helo=[1.2.3.4], from=foss@dom.com, to=jon-doo.doo@yandex.ru, reason=quota_update, policy=10, quota=2, limit=5, track=Sender:foss@dom.com, counter=MessageCount, quota=1/1 (100.0%)
Jun 10 14:40:48 post-lin64-1404-s6-mail cbpolicyd[3839]: module=Quotas, mode=update, host=1.2.3.4, helo=[1.2.3.4], from=foss@dom.com, to=jon-doo.doo@yandex.ru, reason=quota_update, policy=10, quota=2, limit=2, track=Sender:foss@dom.com, counter=MessageCumulativeSize, quota=0/200000 (0.0%)
Jun 10 14:40:49 post-lin64-1404-s6-mail cbpolicyd[4082]: module=Quotas, mode=update, host=1.2.3.4, helo=[1.2.3.4], from=foss@dom.com, to=jon-doo.doo@yandex.ru, reason=quota_update, policy=10, quota=2, limit=2, track=Sender:foss@dom.com, counter=MessageCumulativeSize, quota=2739816/200000 (1369.9%)
=======================
quota=2739816/200000 (1369.9%) - the message pass sad
What wrong?


2. Sogo is sending letters every 5 min
===============
2015-06-10 14:27:01.153 sogo-ealarms-notify[3943] Failed to create lock directory '/var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck' - /var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck
==================

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Don't get web-ui cluebringer and don't work quota (Throttling)

1) Please turn on debug mode in Cluebringer, send some more testing emails, then paste full debug log in /var/log/cbpolicyd.org here so that others can help troubleshoot.

2) Does sogo daemon user own '/var/lib/sogo/GNUstep/Defaults/.lck/' (or parent directories)?

3

Re: Don't get web-ui cluebringer and don't work quota (Throttling)

1. #tailf /var/log/cbpolicyd.log
==================
[2015/06/10-17:00:48 - 5336] [CORE] INFO: 2015/06/10-17:00:48 CONNECT TCP Peer: "[127.0.0.1]:35682" Local: "[127.0.0.1]:10031"
[2015/06/10-17:00:48 - 2729] [CORE] INFO: Starting "1" children
[2015/06/10-17:00:48 - 6589] [CORE] DEBUG: Child Preforked (6589)
[2015/06/10-17:00:48 - 6589] [CBPOLICYD] DEBUG: Starting up caching engine
[2015/06/10-17:00:48 - 5336] [POLICIES] WARNING: [ID:6/Name:whitelists]: No group members for source group 'whitelists'
[2015/06/10-17:00:48 - 5336] [POLICIES] WARNING: [ID:7/Name:blacklists]: No group members for source group 'blacklists'
[2015/06/10-17:00:48 - 5336] [POLICIES] WARNING: [ID:8/Name:no_greylisting]: No group members for destination group 'no_greylisting_for_internal'
[2015/06/10-17:00:48 - 5336] [POLICIES] WARNING: [ID:9/Name:no_greylisting]: No group members for source group 'no_greylisting_for_external'
[2015/06/10-17:00:48 - 5336] [POLICIES] WARNING: [ID:11/Name:throttle_outbound_foss@dom.com]=>(group:internal_ips): - Destination '10.0.0.0/8' is not a valid specification
[2015/06/10-17:00:49 - 5480] [CORE] INFO: 2015/06/10-17:00:49 CONNECT TCP Peer: "[127.0.0.1]:35685" Local: "[127.0.0.1]:10031"
=====================
2.
# ls -la /var/lib/sogo/GNUstep/
total 12
drwxr-xr-x 3 sogo sogo 4096 июня   9 11:13 .
drwxr-x--- 3 sogo sogo 4096 июня   9 11:13 ..
drwxr-xr-x 3 sogo sogo 4096 июня   9 11:13 Defaults

# ls -la /var/lib/sogo/GNUstep/Defaults/
total 12
drwxr-xr-x 3 sogo sogo 4096 июня   9 11:13 .
drwxr-xr-x 3 sogo sogo 4096 июня   9 11:13 ..
drwxr-xr-x 2 sogo sogo 4096 июня  10 17:02 .lck

# ls -la /var/lib/sogo/GNUstep/Defaults/.lck/
total 8
drwxr-xr-x 2 sogo sogo 4096 июня  10 17:04 .
drwxr-xr-x 3 sogo sogo 4096 июня   9 11:13 ..

4

Re: Don't get web-ui cluebringer and don't work quota (Throttling)

1) After enabled debug mode in Cluebringer, please send one testing email. we need log to see how it works and why it doesn't work as expected.
2) does it work if you create directory '/var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck' manually with owner 'sogo:sogo'?

5

Re: Don't get web-ui cluebringer and don't work quota (Throttling)

1. I did it
in file /etc/cluebringer/cluebringer.conf
===
...
log_level=4

# File to log to instead of stdout
log_file=/var/log/cbpolicyd.log
...
===
And reboot server

I send message 2Mb from foss@dom.com to jon-doo.doo@yandex.ru
Look log /var/log/mail.log

# tailf /var/log/mail.log
...
Jun 11 09:21:45 post-lin64-1404-s6-mail postfix/smtpd[30273]: connect from unknown[1.2.3.4]
Jun 11 09:21:45 post-lin64-1404-s6-mail cbpolicyd[30160]: module=Quotas, mode=update, host=1.2.3.4, helo=[1.2.3.4], from=foss@dom.com, to=jon-doo.doo@yandex.ru, reason=quota_update, policy=10, quota=2, limit=5, track=Sender:foss@dom.com, counter=MessageCount, quota=1/1 (100.0%)
Jun 11 09:21:45 post-lin64-1404-s6-mail cbpolicyd[30160]: module=Quotas, mode=update, host=1.2.3.4, helo=[1.2.3.4], from=foss@dom.com, to=jon-doo.doo@yandex.ru, reason=quota_update, policy=10, quota=2, limit=2, track=Sender:foss@dom.com, counter=MessageCumulativeSize, quota=0/200000 (0.0%)
Jun 11 09:21:45 post-lin64-1404-s6-mail postfix/smtpd[30273]: 60D7E20234: client=unknown[1.2.3.4], sasl_method=PLAIN, sasl_username=foss@dom.com
Jun 11 09:21:45 post-lin64-1404-s6-mail postfix/cleanup[30277]: 60D7E20234: message-id=<557928F9.3060504@dom.com>
Jun 11 09:21:46 post-lin64-1404-s6-mail cbpolicyd[15595]: module=Quotas, mode=update, host=1.2.3.4, helo=[1.2.3.4], from=foss@dom.com, to=jon-doo.doo@yandex.ru, reason=quota_update, policy=10, quota=2, limit=2, track=Sender:foss@dom.com, counter=MessageCumulativeSize, quota=2739819/200000 (1369.9%)
Jun 11 09:21:46 post-lin64-1404-s6-mail postfix/qmgr[1927]: 60D7E20234: from=<foss@dom.com>, size=2740017, nrcpt=2 (queue active)
Jun 11 09:21:46 post-lin64-1404-s6-mail postfix/smtpd[30273]: disconnect from unknown[1.2.3.4]
...

Look log /var/log/cbpolicyd.log

tailf /var/log/cbpolicyd.log
...
[2015/06/11-09:21:45 - 30160] [CORE] INFO: 2015/06/11-09:21:45 CONNECT TCP Peer: "[127.0.0.1]:52402" Local: "[127.0.0.1]:10031"
[2015/06/11-09:21:45 - 1948] [CORE] INFO: Starting "1" children
[2015/06/11-09:21:45 - 30276] [CORE] DEBUG: Child Preforked (30276)
[2015/06/11-09:21:45 - 30276] [CBPOLICYD] DEBUG: Starting up caching engine
[2015/06/11-09:21:45 - 30160] [POLICIES] WARNING: [ID:6/Name:whitelists]: No group members for source group 'whitelists'
[2015/06/11-09:21:45 - 30160] [POLICIES] WARNING: [ID:7/Name:blacklists]: No group members for source group 'blacklists'
[2015/06/11-09:21:45 - 30160] [POLICIES] WARNING: [ID:8/Name:no_greylisting]: No group members for destination group 'no_greylisting_for_internal'
[2015/06/11-09:21:45 - 30160] [POLICIES] WARNING: [ID:9/Name:no_greylisting]: No group members for source group 'no_greylisting_for_external'
[2015/06/11-09:21:45 - 30160] [POLICIES] WARNING: [ID:11/Name:throttle_outbound_foss@dom.com]=>(group:internal_ips): - Destination '10.0.0.0/8' is not a valid specification
[2015/06/11-09:21:46 - 15595] [CORE] INFO: 2015/06/11-09:21:46 CONNECT TCP Peer: "[127.0.0.1]:52405" Local: "[127.0.0.1]:10031"


[2015/06/11-09:22:16 - 1948] [CORE] INFO: Killing "1" children
[2015/06/11-09:22:16 - 15595] [CBPOLICYD] DEBUG: Shutting down caching engine (15595)
...

2. I make dir /var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck

# ls -la
total 12
drwxr-xr-x 3 sogo sogo 4096 июня  11 09:34 .
drwxr-xr-x 3 sogo sogo 4096 июня   9 11:13 ..
drwxr-xr-x 2 sogo sogo 4096 июня  11 09:34 .GNUstepDefaults.lck
but a few sec it auto remove (disappeared)
# ls -la
total 12
drwxr-xr-x 2 sogo sogo 4096 июня  11 09:35 .
drwxr-xr-x 3 sogo sogo 4096 июня   9 11:13 ..
Post's attachments

1.png
1.png 35.78 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

6

Re: Don't get web-ui cluebringer and don't work quota (Throttling)

*) Could you please follow this tutorial to enable debug mode in Cluebringer? You don't have 'log_detail=' enabled.
http://www.iredmail.org/docs/debug.cluebringer.html

*) What happen if you send several more testing emails to the same account? Cluebringer calculates the quota not very precisely, check its document:
http://wiki.policyd.org/quotas#complete_example