Add to Favourites Add to Favourites    Print this Article Print this Article

Prevent a User from allowing more than 50MB of quota per E-Mail

If you'd like to keep E-Mail quotas in check, you can prevent any User from setting a quota value higher than MB by creating this script:

cd /usr/local/directadmin/scripts/custom

and in that script, add this code:

if [ "$quota" != "" ]; then
   if [ "$quota" -gt "50" ]; then
       echo "Cannot set quota greater than 50MB";
       exit 1;
exit 0;

Then chmod the script to 755, and also create a link for the modification hook:

chmod 755
ln -s

Test it out by both trying to create and also change an E-Mail account to have more than 50 Meg of quota.

Was this answer helpful?

Also Read