<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Ok not sure if I'm going to actually use any of this was just curious,
it's for the manager types to decide. <br>
<br>
Thanks<br>
Justin<br>
<br>
<br>
Robert Meyer wrote:<br>
<blockquote type="cite"
 cite="mid20030923041444.16573.qmail@web41511.mail.yahoo.com">
  <pre wrap="">Oops, dropped a piece of the code out...  Revised piece below...

--- Robert Meyer <a class="moz-txt-link-rfc2396E" href="mailto:meyer_rm@yahoo.com">&lt;meyer_rm@yahoo.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Why not just whip up a script to check the sizes of the users' directories
and
send them hate mail when it gets above a certain size?  Judicious use of 'du
-sk' can give you all sorts of information and you can write something that
checks to see if the output of the 'du' commands yields something over your
limit and send an Email to the user (and a summary to the admin) each night. 
If it's just single mbox type files, you can use the output of 'du', 'ls -s',
'find', just to name a few.  Actually, 'find' might do it like this:
----- start of /usr/sbin/mailquotacheck -----
#/bin/sh
#
# script to find all of the Email files bigger than 5 meg and mail the user
# and the admin
#

# start a file with people over quota to send to admin
touch /var/tmp/quota$$

# go to the place to start the festivities
cd /var/spool/mail

# locate every file here over 5 meg in size
find . -size +5120k -exec '/usr/sbin/quotamail' /var/tmp/quota$$ '{}' ';'

/bin/mail -s "mail quota statistics" root &lt; /var/tmp/quota$$
/bin/rm -f /var/tmp/quota$$
----- end of /usr/sbin/mailquotacheck -----

    </pre>
  </blockquote>
  <pre wrap=""><!---->----- start of /usr/sbin/quotamail -----
#!/bin/sh
echo "You are currently over quota on your Email account" &gt;
/var/tmp/quotamail$$
echo "We have a limit of 5120 kilobytes per account" &gt;&gt; /var/tmp/quotamail$$
echo -n "You are currently using: " &gt;&gt; /var/tmp/quotamail$$
mailsize=`/bin/ls -s /var/spool/mail/$2 | awk '{print $1};'`
echo $mailsize kilobytes of disk space &gt;&gt; /var/tmp/quotamail$$
echo &gt;&gt;/var/tmp/quotamail$$
echo Please clean up your Email space &gt;&gt;/var/tmp/quotamail$$
echo &gt;&gt;/var/tmp/quotamail$$
echo Thank you &gt;&gt;/var/tmp/quotamail$$
echo  &gt;&gt; /var/tmp/quotamail$$
echo The Administrative Core &gt;&gt; /var/tmp/quotamail$$
/bin/mail -s "Your Email account is overquota" &lt;&lt; /var/tmp/quotamail$$
/bin/rm /var/tmp/quotamail$$
echo $2 $mailsize &gt;&gt; $1

-----end of /usr/sbin/quotamail -----
  </pre>
  <blockquote type="cite">
    <pre wrap="">--- Justin Bennett <a class="moz-txt-link-rfc2396E" href="mailto:justin.bennett@dynabrade.com">&lt;justin.bennett@dynabrade.com&gt;</a> wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">I'm pretty familiar with FS quotas we don't currently use them, this was 
a popup an imap generated message. I was hoping to set some soft limits, 
maybe have a warning when the user has an extraordinary amount of 
mail... This would just be for email, not on the users home directory as 
a whole. Just something I saw, was just curious.

Justin


Robert Meyer wrote:

      </pre>
      <blockquote type="cite">
        <pre wrap="">There are a series of things involved here.  First, the use of the quota
        </pre>
      </blockquote>
      <pre wrap="">system
      </pre>
      <blockquote type="cite">
        <pre wrap="">to limit the amount of space a user is allowed to take up on a filesystem,
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">A
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">series of scripts that cruise the quota list and sends Email and an email
system.

I'm not a real big fan of quotas 'cuz I've had situations where the user
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">ran
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">out of quota space just as the big RPF for a proposal came in and it
        </pre>
      </blockquote>
      <pre wrap="">bounced. 
      </pre>
      <blockquote type="cite">
        <pre wrap="">Mad scramble to clean out space and then get the program sponsor to resend
        </pre>
      </blockquote>
      <pre wrap="">the
      </pre>
      <blockquote type="cite">
        <pre wrap="">RFP.  Does not present the professional image...

Cheers!

Bob

--- Justin Bennett <a class="moz-txt-link-rfc2396E" href="mailto:justin.bennett@dynabrade.com">&lt;justin.bennett@dynabrade.com&gt;</a> wrote:
 

        </pre>
        <blockquote type="cite">
          <pre wrap="">I'm playing with Courier Imap as some of you know, I'm going to deploy 
it in the next few months, I'm running sendmail/procmail with courier. I 
noticed my wife had a message when checking her UB mail, that she was 
90% of quota. Is this setup on the courier imap side or is this a MDA 
thing? Basically could I set this up with my setup? If not no biggie.
Justin


   

          </pre>
        </blockquote>
        <pre wrap="">
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
<a class="moz-txt-link-freetext" href="http://sitebuilder.yahoo.com">http://sitebuilder.yahoo.com</a>
 

        </pre>
      </blockquote>
      <pre wrap="">
      </pre>
    </blockquote>
    <pre wrap="">
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
<a class="moz-txt-link-freetext" href="http://sitebuilder.yahoo.com">http://sitebuilder.yahoo.com</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
<a class="moz-txt-link-freetext" href="http://sitebuilder.yahoo.com">http://sitebuilder.yahoo.com</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Justin Bennett
Network Administrator
RHCE (Redhat Certified Linux Engineer)
Dynabrade, Inc.
8989 Sheridan Dr.
Clarence, NY 14031
 
</pre>
</body>
</html>