Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED whmapi1 emailtrack_user_stats showing very high numbers in v76.0.5-6

Discussion in 'General Discussion' started by domeneas, Nov 13, 2018.

  1. domeneas

    domeneas Active Member

    Joined:
    Sep 20, 2013
    Messages:
    40
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi,

    I wrote my own little spam tracking script based on data from "whmapi1 emailtrack_user_stats". I dump the results of the previous 24 hours every morning, format what I want to see a bit a, just to see that all the values are in-line and nothing is suspicious.

    After the upgrade to v76, all my servers that are upgraded show very inflated number, almost 10 fold in SENDCOUNT and SUCCESSCOUNT for example, compared to mail I can see in "View Relayers" and "Mail Delivery Reports". The non-upgraded servers continue to do as they always have, showing numbers that are quite close to the "View Relayers" in WHM.

    I run
    Code:
    /usr/sbin/whmapi1 emailtrack_user_stats starttime UNIXTIME_OF_24_HOURS_AGO
    v76:
    45 emails in "View Relayers" gives a sendcount 428, successcount of 599.
    1 email in "View Relayers" gives a sendcount 7, successcount of 7.

    v74:
    106 emails in "View Relayers", gives a sendcount 57, successcount 126
    1 email in "View Relayers" gives a sendcount 1, successcount of 1.


    All my servers have the "Standard Node" role. I use CloudLinux and get the same result if I use the complete path
    Code:
    /usr/local/cpanel/bin/whmapi1
    -or if I use-
    Code:
    /usr/sbin/whmapi1
    Any idea what could be causing this? I know the numbers should not be identical, but this is a huge difference and has made my script go haywire overnight when the server is upgraded.

    Thank you for any input.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,555
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @domeneas,

    Could you open a support ticket so we can take a closer look at the system and determine where the difference in the reported numbers stems from? You can post the ticket number here and we'll link this thread to it.

    Thank you.
     
  3. domeneas

    domeneas Active Member

    Joined:
    Sep 20, 2013
    Messages:
    40
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    The fix was that the syntax needs an "=" sign between the "starttime" and the UNIX_DATE

    /usr/sbin/whmapi1 emailtrack_user_stats starttime=UNIXTIME_OF_24_HOURS_AGO

    works just fine. This has apparently been patched now so it should throw an error if you try to do what I did originally.
     
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,555
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @domeneas,

    Thanks for sharing the outcome. Here's the case you referenced that's included in version 76.0.9:

    Fixed case CPANEL-23950: Only attempt to process argument values that are defined with the API tooling.

    Thanks!
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice