How To Determine Mailbox Size

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How To Determine Mailbox Size

Carlwill
I am using Postfix 2.2.10-1 email server. Right now there is no
mailbox quota limit size but I think 2048M is more than enough for the
average user on my email server. Right now everyone has their email in
their own home directory folder called Maildir (maildir style) and I
was wondering how I can find each users mailbox size besides having to
do "du -h /home/user/Maildir" command individually for all 300 users.
Plus running that command is verbose to all sub-folders which gets
super messy so I wanted to just have it tally the size recursively
nice and neat for me.

Does anyone have any suggestions as I have no experience with bash /
shell scripts and would not know where to start.

I assume many of you guys manage / admin a large robust Postfix email
server and would know some tips and or tricks to help me filter and
get the data I am looking for.

--
Man your battle stations...
Reply | Threaded
Open this post in threaded view
|

OT: Re: How To Determine Mailbox Size

Brian Evans - Postfix List
Carlos Williams wrote:
> I am using Postfix 2.2.10-1 email server. Right now there is no
> mailbox quota limit size but I think 2048M is more than enough for the
> average user on my email server. Right now everyone has their email in
> their own home directory folder called Maildir (maildir style) and I
> was wondering how I can find each users mailbox size besides having to
> do "du -h /home/user/Maildir" command individually for all 300 users.
>  
Try "du -sh /home/user/Maildir"

Run it in a bash script or cron job to simplify things.
If you don't know how to do this yourself, you can always run Webmin for
it's "Read User Mail" function which does this.

Brian

> Plus running that command is verbose to all sub-folders which gets
> super messy so I wanted to just have it tally the size recursively
> nice and neat for me.
>
> Does anyone have any suggestions as I have no experience with bash /
> shell scripts and would not know where to start.
>
> I assume many of you guys manage / admin a large robust Postfix email
> server and would know some tips and or tricks to help me filter and
> get the data I am looking for.
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: How To Determine Mailbox Size

Michael Monnerie-4
In reply to this post by Carlwill
On Mittwoch, 4. Juni 2008 Carlos Williams wrote:
> "du -h /home/user/Maildir" command individually for all 300 users.

du -s /home/*/Maildir

could be what you want, using "-h" you cannot see the sizes so quickly,
with a big list "1GB" looks smaller than "987KB".

mfg zmi
--
// Michael Monnerie, Ing.BSc    -----      http://it-management.at
// Tel: 0660 / 415 65 31                      .network.your.ideas.
// PGP Key:         "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38  500E CE14 91F7 1C12 09B4
// Keyserver: www.keyserver.net                   Key-ID: 1C1209B4

signature.asc (201 bytes) Download Attachment