mail traffic stats not working since 3.1

Discussion in 'ISPConfig 3 Priority Support' started by radim_h, May 24, 2017.

  1. radim_h

    radim_h Member HowtoForge Supporter

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Other stats like website traffic are working? Does the mail log file contains recent data?
     
  3. radim_h

    radim_h Member HowtoForge Supporter

    yes, all other stats are OK,
    How is ISPC collecting data ? was there changes in database regarding stats? i had some problems with upgrade to 3.1 and there maybe some patch not aplied to DB..
    mail.log is on separate mail server, working OK

    mail_traffic table (on main server, there is no data on mailserver) ends with 2016-12
    I updated in half of JAnuary, suppose there has to be at least some data for 2017-01 ? or table is populated at end of the month ?

    EDIT: SQL table seems to be OK, i checked againt fresh isntall of ISPC
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    So you are using a multiserver system? Did you choose to reconfigure permissions in master database during update f one of the slaves? If not, then it might be that permissions are missing to write the statistics data from mail server into the master database. In that case, redo the update on one of the slaves by downloading the ispconfig.tar.gz and running the update.php and choose t reconfigure permissions in master database during update.

    The data is updated once a night if I remember correctly.
     
  5. radim_h

    radim_h Member HowtoForge Supporter

    i have reinstalled yesterday from 3.1.2 to 3.1.3, reconfigured permissions on master a nothing happened, no mailbox traffic data :(
    supopse rights of read users as defined in /usr/local/ispconfig/server/lib/config.inc.php

    as

    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type'] = 'mysql';
    $conf['dbmaster_host'] = 'host.domain.tld';
    $conf['dbmaster_port'] = '3306';
    $conf['dbmaster_database'] = 'dbispconfig';
    $conf['dbmaster_user'] = 'ispcsrv2';
    $conf['dbmaster_password'] = 'xxxxxxxxxxxxxxxxxxxx';
    $conf['dbmaster_new_link'] = false;
    $conf['dbmaster_client_flags'] = 0;

    are configured autoamtically by update ? or do i have to replace those with root ?
     
  6. radim_h

    radim_h Member HowtoForge Supporter

    Hello,
    it is still not working in 3.1.5, even if i give slave server root permission to master db. All data in mail_traffic table on master server ends 2016-12. No data in mail_traffic table on mail server (suppose it is OK)
    Is it possbile that i'm missing some packages in my Debian 8 or something else ?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    If I remember correctly, there are no special packages needed. Which lines do you have in the root crontab? run:

    crontab -l

    as root to get the content.
     
  8. radim_h

    radim_h Member HowtoForge Supporter

    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, that's ok. The mail.log of the server file contains the current data?
     
  10. radim_h

    radim_h Member HowtoForge Supporter

    yes, everything is in the place
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    I must admit that I'm a bit out of ideas... Most likely the only remaining option is to try to debug the cron plugin 100-mailbox_stats.inc.php from PHP to see why it fails to collect or save the statistics. There is a cron_debug.php file in the server folder in ISPConfig that can be used to run a cron plugin manually out of schedule:

    Usage example: php cron_debug.php --cronjob=100-mailbox_stats.inc.php
     
  12. radim_h

    radim_h Member HowtoForge Supporter

    Hello,
    does it log somewhere ? There is no screen output for the script ..
    I found just file /usr/local/ispconfig/server/temp/rescue_module_serverconfig.ser.txt
    root@mail:/usr/local/ispconfig/server/temp# cat rescue_module_serverconfig.ser.txt
    a:1:{s:12:"serverconfig";a:2:{s:6:"server";a:1:{s:8:"loglevel";i:1;}s:6:"rescue";a:5:{s:10:"try_rescue";s:0:"";s:23:"do_not_try_rescue_httpd";s:0:"";s:23:"do_not_try_rescue_mysql";s:0:"";s:22:"do_not_try_rescue_mail";s:0:"";s:25:"do_not_try_rescue_mongodb";s:1:"n";}}}
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    You should see some log output on the screen when you have set log level to debug in ispconfig for the slave node.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, no. The code of this plugin does not contain any debug log. looked at the wrong file first.
     
  15. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Did you see any files when you run
    find /var/vmail -name ispconfig_mailsize
    ?
     
  16. radim_h

    radim_h Member HowtoForge Supporter

    Helo,
    no.

    FYI: this server was updated since first stable release of ISPConfig 3, which is i think 7 years or so ??
    maybe something from past ?
     
    Last edited: Jul 10, 2017
  17. radim_h

    radim_h Member HowtoForge Supporter

    root of mailbox:

    drwx------ 13 vmail vmail 4096 Jun 22 17:58 Maildir
    -rw------- 1 vmail vmail 53 Jun 22 17:09 .quotausage
    -rw-r--r-- 1 vmail vmail 222 Sep 16 2012 .sieve
    -rw-r--r-- 1 vmail vmail 244 Oct 28 2015 .sieve.svbin

    Maildir folder

    drwx------ 2 vmail vmail 118784 Jul 9 22:42 cur
    drwx------ 5 vmail vmail 4096 Jul 9 22:42 .Deleted Messages
    -rw------- 1 vmail vmail 24304 Jul 4 00:44 dovecot.index
    -rw------- 1 vmail vmail 1203592 Jul 10 15:52 dovecot.index.cache
    -rw------- 1 vmail vmail 19332 Jul 10 15:52 dovecot.index.log
    -rw------- 1 vmail vmail 21 Aug 4 2016 dovecot-keywords
    -rw------- 1 vmail vmail 96 Aug 4 2016 dovecot.mailbox.log
    -rw------- 1 vmail vmail 74908 Jul 10 15:52 dovecot-uidlist
    -rw------- 1 vmail vmail 8 Aug 4 2016 dovecot-uidvalidity
    -r--r--r-- 1 vmail vmail 0 Aug 4 2015 dovecot-uidvalidity.55c0af2b
    drwx------ 5 vmail vmail 4096 Jun 29 17:32 .Drafts
    drwx------ 5 vmail vmail 4096 Aug 4 2016 .Junk
    drwx------ 2 vmail vmail 4096 Jul 10 15:52 new
    drwx------ 5 vmail vmail 4096 Jun 29 17:32 .Notes
    drwx------ 5 vmail vmail 4096 Jun 29 17:32 .Sent
    drwx------ 5 vmail vmail 4096 Jul 7 11:29 .Sent Messages
    drwx------ 5 vmail vmail 4096 Jul 9 13:22 .Spam
    -rw------- 1 vmail vmail 65 Feb 21 11:08 subscriptions
    drwx------ 2 vmail vmail 4096 Jul 10 15:52 tmp
    drwx------ 5 vmail vmail 4096 Aug 4 2015 .Trash
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    That's why Florian asked for that file as it will block mail stats when it is set on a dovecot server as that's a courier server feature.

    Do you use courier or dovecot?
     
  19. radim_h

    radim_h Member HowtoForge Supporter

    in some of the older mailboxes, there is also file
    courierimapsubscribed (with 2013 date)
    ?

    i use dovecot
     
  20. radim_h

    radim_h Member HowtoForge Supporter

    older mailbox

    drwx------ 5 vmail vmail 4096 Oct 14 2013 .Archives
    -rwxr--r-- 1 vmail vmail 48 Oct 13 2013 courierimapsubscribed
    drwx------ 2 vmail vmail 335872 Jul 10 16:09 cur
    -rw------- 1 vmail vmail 69128 Jul 5 08:15 dovecot.index
    -rw------- 1 vmail vmail 2214300 Jul 10 18:18 dovecot.index.cache
    -rw------- 1 vmail vmail 2868 Jul 10 18:18 dovecot.index.log
    -rw------- 1 vmail vmail 194 Jul 30 2012 dovecot-keywords
    -rw------- 1 vmail vmail 1152 Jan 24 2015 dovecot.mailbox.log
    -rw------- 1 vmail vmail 132453 Jul 10 18:18 dovecot-uidlist
    -rw------- 1 vmail vmail 8 Nov 9 2016 dovecot-uidvalidity
    -rw------- 1 vmail vmail 0 Oct 31 2011 dovecot-uidvalidity.4eae9c87
    drwx------ 5 vmail vmail 4096 May 23 09:27 .Drafts
    drwx------ 5 vmail vmail 4096 Nov 9 2016 .Junk
    -rw------- 1 vmail vmail 2051 Nov 28 2011 maildirsize
    drwx------ 2 vmail vmail 4096 Jul 10 18:18 new
    drwx------ 5 vmail vmail 4096 Jul 10 16:09 .Sent
    drwx------ 5 vmail vmail 4096 Jul 13 2016 .Spam
    -rw------- 1 vmail vmail 54 Feb 21 11:07 subscriptions
    drwx------ 2 vmail vmail 4096 Jul 10 18:18 tmp
    drwx------ 5 vmail vmail 4096 Jul 10 08:34 .Trash
     

Share This Page