Results 1 to 7 of 7

Thread: [SOLVED] Monthly messages report?

  1. #1
    halley is offline Senior Member
    Join Date
    Sep 2008
    Location
    Brazil
    Posts
    50
    Rep Power
    6

    Default [SOLVED] Monthly messages report?

    Hi guys
    sup?

    I recieve daily messages report from my server... i need this statistics moth, its is possible?

    Thanks mans...

  2. #2
    Dirk's Avatar
    Dirk is offline Moderator
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    Hello halley, welcome to the forum. Could you clarify your question a little as I dont quite understand it. Thanks.

  3. #3
    halley is offline Senior Member
    Join Date
    Sep 2008
    Location
    Brazil
    Posts
    50
    Rep Power
    6

    Default

    Quote Originally Posted by Dirk View Post
    Hello halley, welcome to the forum. Could you clarify your question a little as I dont quite understand it. Thanks.

    I would like to know the possibility of having the monthly number of how many messages come and go. Currently receive an e-mail messages daily from, I wanted the monthly total.

    Thanks

  4. #4
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    The arguments to zmdailyreport include:
    --user <email_address> Report usage for <email_address> only
    --mail Send report via email, default is stdout
    --now Shortcut for midnight to the current time
    --time <start>,<end> Default is midnight to midnight of the previous day
    Start and end times must be in YYYYMMDD[hhmmss] format

    So you can either-
    A) Run it manually:
    cd /opt/zimbra/libexec
    ./zmdailyreport -m -t start,end
    Comma included or it wont find the end time.
    ./zmdailyreport -m -t 20090301112233,2009031211223

    You also don't have to be that specific:
    ./zmdailyreport -m -t 2009,20090312

    B) Modify cron:
    su - zimbra
    contab -e (opens in vim)
    # Daily reports
    #
    10 1 * * * /opt/zimbra/libexec/zmdailyreport -m
    You'll want to put in values for -t such that it's auto (make yourself a $datefirstmonth & $datecurrent)

    C) Modify /opt/zimbra/libexec/zmdailyreport default to contain *720 or an extra *30 (or so):
    # usage: getTimes( now => $Opt{now}, time => $Opt{time} )
    sub getTimes {
    my &#37;arg = @_;

    my ( $start, $end );
    if ( $arg{time} ) {
    ( $start, $end ) = split( /\s*,\s*/, $arg{time} );
    $start = timeToSqlTime($start);
    $end = timeToSqlTime($end) if ($end);
    }
    elsif ( $arg{now} ) {
    $start = tsToSqlTime( time(), 1 );
    $end = tsToSqlTime( time(), 0 );
    }
    else { # default to the previous day
    $start = tsToSqlTime( ( time() - ( 60 * 60 * 24 ) ), 1 );
    $end = tsToSqlTime( time(), 1 );
    }
    return ( $start, $end );
    Keep in mind it checks the logger DB, so the results you get are going to be limited by:

    zimbraLogRawLifetime (default 31d) - lifetime (nnnnn[hmsd]) of raw log rows in consolidated logger tables
    zimbraLogSummaryLifetime (default 730d)- lifetime (nnnnn[hmsd]) of summarized log rows in consolidated logger tables

    Adjust with: zmprov mcf zimbraLogAttribute Xd
    Last edited by mmorse; 03-12-2009 at 10:37 AM. Reason: note ,

  5. #5
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    I should clarify the comma is important or it wont find the end time.
    A) Run it manually:
    cd /opt/zimbra/libexec
    ./zmdailyreport -m -t 20090301112233,2009031211223
    You also don't have to be that specific:
    ./zmdailyreport -m -t 2009,20090312

  6. #6
    halley is offline Senior Member
    Join Date
    Sep 2008
    Location
    Brazil
    Posts
    50
    Rep Power
    6

    Default

    Work Fine man... very thanks... very...
    Last edited by halley; 03-12-2009 at 11:34 AM.

  7. #7
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Quote Originally Posted by halley View Post
    Edit: Work Fine man... very thanks... very...
    Cool
    Quote Originally Posted by halley View Post
    Thanks Mmorse, i exec this command [zimbra@mail libexec]$ ./zmdailyreport -m -t 20081219000000,20090311000000

    and not recieve any result, this send mail for admin@mail.com ? Thanks man
    Without -m presents it to your console/stdout.

    Specifying -m sends it to the email specified in localconfig:
    zmlocalconfig -e smtp_destination=admin@domain.com

    Also relevant to that is:
    smtp_source=admin@domain.com (the from)
    smtp_notify=yes
    zimbra_mtareport_max_recipients=50
    zimbra_mtareport_max_senders=50

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Re-creating the spam training e-mail account
    By richard-hdd in forum Administrators
    Replies: 21
    Last Post: 03-20-2012, 07:34 AM
  2. Replies: 27
    Last Post: 01-23-2011, 09:49 AM
  3. [SOLVED] Mailserver down when send file attach of 50Mb
    By ZMilton in forum Administrators
    Replies: 20
    Last Post: 04-10-2008, 11:44 AM
  4. Replies: 5
    Last Post: 02-12-2007, 08:58 AM
  5. Spam assassain not traiing properly!
    By Mike T in forum Administrators
    Replies: 1
    Last Post: 10-09-2006, 01:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •