1 (edited by nicola.braccia 2014-01-03 16:24:21)

Topic: [SOLVED] dashboard statistics pgsql 1.4.1

==== Required information ====
- iRedMail version: 1.4.1 upgraded from 1.4.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: debian 7 64bit
- Related log if you're reporting an issue:
====

Hi, Happy New Year to everybody

after updating, the "Statistics Of Latest 24 Hours" in the dashboard remain at zero.

the lo of my postgres "/var/log/postgresql/postgresql-9.1-main.log"

2014-01-02 17:29:05 CET ERROR:  column "C" does not exist at character 463
2014-01-02 17:29:05 CET STATEMENT:
                    -- Get number of incoming mails.
                    SELECT COUNT(msgs.mail_id) AS total
                    FROM msgs
                    LEFT JOIN msgrcpt ON (msgs.mail_id = msgrcpt.mail_id)
                    -- LEFT JOIN maddr AS sender ON (msgs.sid = sender.id)
                    LEFT JOIN maddr AS recip ON (msgrcpt.rid = recip.id)
                    WHERE
                        -- msgs.content NOT IN ('S', 's', 'Y', 'V', 'B')
                        msgs.content="C"
                         AND recip.domain IN ('com.xxx', 'it.xxx', 'net.xxx', 'de.xxx', 'br.com.xxx', 'org.xxx', 'eu.xxx') AND msgs.time_iso > CURRENT_TIMESTAMP - INTERVAL '86400 seconds'

2014-01-02 17:29:05 CET ERROR:  column "C" does not exist at character 393
2014-01-02 17:29:05 CET STATEMENT:
                    -- Get number of outgoing mails.
                    SELECT COUNT(msgs.mail_id) AS total
                    FROM msgs
                    RIGHT JOIN msgrcpt ON (msgs.mail_id = msgrcpt.mail_id)
                    RIGHT JOIN maddr AS sender ON (msgs.sid = sender.id)
                    WHERE
                        -- msgs.content NOT IN ('S', 's', 'Y', 'V', 'B')
                        msgs.content="C"
                         AND sender.domain IN ('com.xxx', 'it.xxx', 'net.xxx', 'de.xxx', 'br.com.xxx', 'org.xxx', 'eu.xxx') AND msgs.time_iso > CURRENT_TIMESTAMP - INTERVAL '86400 seconds'

thanks

----

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

2

Re: [SOLVED] dashboard statistics pgsql 1.4.1

So sorry about this bug, it's totally my fault. Please replace all msgs.content="C" by msgs.content='C' in file libs/amavisd/log.py, then restart Apache service.

3

Re: [SOLVED] dashboard statistics pgsql 1.4.1

No problem, thank you

4 (edited by orphans 2014-01-03 18:37:11)

Re: [SOLVED] dashboard statistics pgsql 1.4.1

I'm getting the same on the CentOS LDAP version 2.1.1.

Making the changes mentioned above did not seem to solve the problem for me.

EDIT: Fixed myself... the issue was that the migration script for some reason had changed my amavisd database name from "amavisd" to "amavisd " (note the extra space)