[wplug] Script to check mailbox size

Vance Kochenderfer vkochend at nyx.net
Thu Aug 7 12:42:45 EDT 2008


Vance Kochenderfer <vkochend at nyx.net> wrote:
> This command generates a list of usernames whose mbox file
> exceeds 80MB and feeds it to our script:

Ah, thought of a couple more things to consider.  Certain shells
may have a limit on the number of parameters that can be passed
to a script (don't know for sure whether this is the case).  You
can limit this with the -n option to xargs.  Also, if you want to
exclude certain mailboxes (e.g., system mailboxes like root, ftp,
daemon, etc.) you can add egrep to the pipeline for that:

find /usr/spool/mail -follow -type f -size +83886080c -exec basename \{\} \; | egrep -v 'root|bin|daemon|ftp' | xargs -n 9 /path/to/quotamail.sh

Vance Kochenderfer        |  "Get me out of these ropes and into a
vkochend at nyx.net          |   good belt of Scotch"    -Nick Danger


More information about the wplug mailing list