On Fri, 11 Mar 2005 [EMAIL PROTECTED] wrote:

this is a listing of a sample Maildir directory on my server. it has all these files and directories that have to do with courier IMAP. while they don't take much in some cases, sometimes they can take a couple of percent from the overall quota. in addition there are two directories (IMAP folders) .Junk (where all spam is forwarded) and .Trash (courier IMAP/squirrelmail default trash +folder).

Doh! Now I see why I'm off so much. I forgot about .Trash not being counted. I'll have to revamp things to account for that.


Thanks!

Charles


--
Igor


On Thu, Mar 10, 2005 at 07:26:10PM -0500, Charles Sprickman wrote: -> On Wed, 9 Mar 2005 [EMAIL PROTECTED] wrote: -> -> >this method is of course fast and dirty, but it might not work for -> >everyone out there. -> > -> >the best aproach is to write a perl script that runs queries on a -> >database, gets path to a user's mailbox on the server, uses File::Find -> >to include only files in Maildir/cur and Maildir/new as well as -> >:subfolders:/cur and :subfolders:/new with the exception of trash -> >folders. that should give a much clearer picture. in addition it can -> >scale better. -> -> I have something similar, but it's not very generic, so I don't know if -> anyone would be interested. I've added a few fields to the vpopmail table -> to record when they first hit quota so I can get a report (quick php page) -> of who's over and for how long. -> -> To get usage, I'm just hitting the user's homedir with du, can you comment -> a bit on why I would need to count only the mail? There shouldn't really -> be anything of note in the user's directory besides the mail... -> -> It is quite interesting to see how much the "real" usage (provided by du) -> can differ from the maildirsize info. -> -> Charles -> -> >-- -> >Igor -> > -> > -> >On Wed, Mar 09, 2005 at 08:08:10AM -0800, Charles J. Boening wrote: -> >-> Here's what I do. I don't have too many domains or users do it doesn't -> >-> take too long. -> >-> -> >-> du -sk /home/vpopmail/domains/*/*/Maildir > /tmp/maildirusage && du -sk -> >-> /home/vpopmail/domains/*/*/*/Maildir >> /tmp/maildirusage && cat -> >-> /tmp/maildirusage | sort -n | tail -n50 | sort -n -r | mail -s "Mail -> >-> User Quota" <your-email-here> -> >-> -> >-> -> >-> This only gets the top 50 users. You can change it easily. I don't -> >-> think it would be very efficient for multiple domains. In that case you -> >-> may want to break it up into a run for each domain. -> >-> -> >-> I'd definitely like to see something more efficient :) -> >-> -> >-> -> >-> Charlie -> >-> -> >-> -> >-> -> >-> ________________________________ -> >-> -> >-> From: Tanmaya Anand [mailto:[EMAIL PROTECTED] -> >-> Sent: Tuesday, March 08, 2005 11:44 PM -> >-> To: vchkpw@inter7.com -> >-> Subject: [vchkpw] listing over-quota users -> >-> -> >-> -> >-> -> >-> Hi -> >-> -> >-> I need to list all over-quota users on the system for all -> >-> domains. -> >-> Can anyone help me with some similiar perl / shell script to get -> >-> this done. -> >-> -> >-> Regards, -> >-> Tanmaya -> >-> -> >-> -> >-> -> >-> <http://clients.rediff.com/signature/track_sig.asp> -> >-> -> >-> -> >

Reply via email to