These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Quota warning email. How does it work? on the new forum.
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
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
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.
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?
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.
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!
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.
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?)
Is the following available / do-able?