This discussion is archived
3 Replies Latest reply: Mar 6, 2013 10:43 AM by kmac RSS

tracking mailbox size, growth

kmac Newbie
Currently Being Moderated
Before I get too far into writing something myself, I would like to ask if there's any existing code or methods to track mailbox size and growth over time.

I'd like to track the average size of all mailboxes (not their quota but actual usage in kB) and then compare that on a daily/weekly/monthly basis to the previous time period.

I would think this data would be derived from quota.db. That has all the info for mailbox size/quota/# of messages and last access (in order to optionally exclude "inactive" mailboxes as well as create separate growth values from IMAP users vs POP only).

I'm reasonably confident I could craft this kind of report or data input and analysis mechanism but I would like to know if there's anything already out in the wild that could do this.

Edited by: kmac on Mar 6, 2013 7:00 AM
  • 1. Re: tracking mailbox size, growth
    901854 Newbie
    Currently Being Moderated
    Hello,

    The imquotacheck command gives you this kind of information.

    imquotacheck -u bobby.brown

    Name Quota(K) Usage(K) % Quota# Usage# % OverDate WarnDate
    bobby.brown 1048576 241658 23 - 310 - 01/18/13 02/13/13


    Run with --help for help.

    You may need to run reconstruct -q to refresh the quota from your LDAP directory.


    Wrapping all this with standard unix commands (awk or sed, cron, etc.), you can achieve what you want.

    I hope this helps.

    Edited by: diesmo on 6 mars 2013 10:12
  • 2. Re: tracking mailbox size, growth
    kellyc-Oracle Journeyer
    Currently Being Moderated
    Rather than reconstruct -q, I would recommend iminitquota -u <userid>; if you think there is a discrepancy.

    For more discussion around how discrepancies can happen (or appear to exist) see the following MOS knowledge article:

    Changing mailQuota LDAP Attribute Has No Effect on User's Quota (Doc ID 1314111.1)
  • 3. Re: tracking mailbox size, growth
    kmac Newbie
    Currently Being Moderated
    well imcheck -d quota.db gives a dump of all mailboxes so that's the base data one would need, I think.

    I was more curious if there were any analysis tools already in existence, similar to how imslog.pl analyzes MTA logs, to generate a report.

    If not I'll certainly write something up and share here :)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points