Quota warning email. How does it work?

8 posts / 0 new
Last post
#1 Mon, 10/19/2009 - 11:02
arjones85

Quota warning email. How does it work?

I see the following email script under Module Config for disk quotas:

Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the allowed quota.

${USED} of disk space is being used, out of a maximum of ${QUOTA}.

Where is that set? How is that called? How do I set the percentage that it warns on?

Thanks

Mon, 10/19/2009 - 15:44
andreychek

You can tweak the quota settings in Limits and Validation -> Disk Quota Monitoring.

There is a quota monitoring cron job which runs each night, that uses those settings to determine when to send out notifications.

-Eric

Mon, 10/19/2009 - 17:02
arjones85

Yeah, its my understanding that is a Pro-only feature. I am using GPL, hence why I wanted to see how the webmin one worked. Any ideas?

It looks like the email accounts are created as their own users and given their own separate quotas, so I am sure the webmin quota checker would work if I could just figure out how exactly it does its thing.

Mon, 10/19/2009 - 22:28
arjones85

I can see in the email.pl script the following:

Check if over threshold

$upercent = 100.0*$user{$i,'ublocks'}/$limit; next if ($upercent < $config{'email_percent_'.$f});

But where oh where is email_percent_ set at?

Mon, 10/19/2009 - 22:33
arjones85

Ah, figured it out!

"Email Notifications" tab in the Disk Quotas section. It was hiding right in front of me =)

Now time to test it.

Mon, 10/19/2009 - 22:49
arjones85

Super, it worked perfectly!

Disk usage for user russell@example.com on filesystem / has reached 98% of the allowed quota.

1.96 MB of disk space is being used, out of a maximum of 2 MB.

Virtualmin + Webmin = wonderful software!

Fri, 05/08/2015 - 14:47
Cristian Rico

Hello, I have to send an automatic email to the administrator of the disk quotas when a group quota is Exed ... what would be the variable? example

Disk usage for group ${GROUP} on filesystem ${FS} has reached ${PERCENT}% of the allowed quota.

${USER} of disk space is being used, out of a maximum of ${QUOTA}.

user = $USER group = $??

i try this and didn't work

copy of the mail >> Disk usage for group on filesystem /DATA has reached 98% of the allowed quota.

191.41 GB of disk space is being used, out of a maximum of 195 GB.

Tue, 03/15/2016 - 20:22
mwilliamsr

I also would like to send custom email to users, which will also include the "soft limit" , "hard limit" and the "grace time"... e.g.

Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the allowed quota. ==> (This is the percentage of the Soft Limit)

${USED} of disk space is being used, out of a "Soft Limit" of ${QUOTA}. ==> (This is the Soft Limit Quota) ${USED} has a "Hard Limit" of ${QUOTA -hard???}, in which writing to the ${FS} will be inhibited. ==> (Can this be the "Hard Limit" Quota?)

You currently have a grace period of ${GRACE???} days. ==> (Can this be the "Grace" time?)

  • Tech Support

Is the following available / do-able?

Topic locked