Prevent a User from allowing more than 50MB of quota per E-Mail
Use '%' for wildcards and quotes for "exact phrases"
|Prevent a User from allowing more than 50MB of quota per E-Mail||Last Modified: Mar 17, 2015, 2:54 pm|
|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/customand in that script, add this code:
#!/bin/shThen chmod the script to 755, and also create a link for the modification hook:
if [ "$quota" != "" ]; then
if [ "$quota" -gt "50" ]; then
echo "Cannot set quota greater than 50MB";
chmod 755 email_create_pre.sh
ln -s email_create_pre.sh email_change_pass_pre.sh
Test it out by both trying to create and also change an E-Mail account to have more than 50 Meg of quota.
2018 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB
T8N 1P7 Canada. Mon-Fri 9AM-5PM MST