Howto: Configure Linux Warnquota for Fedora / Ubuntu / RHEL / CentOS

Hello,

In Linux, Most of the People Implement User Quota and Group Quota on Linux and The Might want to send e-mail warnings to the User by e-mail.

It Becomes very Important when the Mail Server is Running and You have implemented Disk Quota / User Quota / Group Quota for Users, So Its the First Basic requirement that We have to inform Users on Their Quota Usage at the Limit which we have configured.

So I am writing this article for Those Who have implemented a Quota and Do not know How to configure quota warning by e-mail.

quota

 

 

1. quota / quota-warnquota package must be Installed.

To Confirm :-

On RHEL / CentOS :- [root@tejas-barot-linux-support ~]# rpm -qa | grep quota # Output should not be empty

On Ubuntu :- root@tejas-barot-linux-support:~# dpkg –list | grep quota # Output should not be empty

2. Partition / Device must be mounted with usrquota

On RHEL / CentOS / Ubuntu :- [root@tejas-barot-linux-support ~]#mount | grep quota # Output should not be empty

3. Quota Must be Enabled on Partition.

4. If Above command is giving you proper output then you are good to go for Further Configuration.

5. Now Open /etc/warnquota.conf and Modify Following values as per your requirement.

Enjoy Disk Quotas :) Enjoy WarnQuota :) Enjoy Linux :) Enjoy Open Source :)

   MAIL_CMD        = "/usr/sbin/sendmail -t"
   FROM            = "linuxsupport@tejasbarot.com"
   SUBJECT         = NOTE: Your mailbox has exceeded allocatted disk space limits
   CC_TO           = "ahmedabad@tejasbarot.com"
   SUPPORT         = "linuxblog@tejasbarot.com"
   PHONE           = "000 111-2222"
   MESSAGE         = Your mailbox has exceeded the allotted limit\
    on this server|Please delete any unnecessary email in your mailbox on:|
   SIGNATURE       = This message is automatically generated by the mail system.

Once you are done with Configuring this Parameters Save and Exit from File

Description of above Configurations :-

MAIL_CMD = Command which used to send an e-mail.

FROM = Which E-Mail ID it will display to Recipient.

SUBJECT = Subject line which you want to Mention for Warning e-mail.

CC_TO = On Which ID it will Send Carbon Copy of the Mail.

SUPPORT =  Email ID which you have to mentioned as Support or anybody else where it should inform too.

PHONE = Of-course It will be a Number which you want to display as your Contact Number.

MESSAGE = Detailed Message OR Instructions Which you want to Send to the User. In Short, Body of the Mail.

SIGNATURE = Text which you have to set as your Signature.

6. Once It is configured properly, then To Send E-mail to all those users who exceeded quota then Execute Following command :-

Execute Command To Send E-Mail to All Those Users / Groups who exceeded quota or Grace Limit :-

[root@tejas-barot-linux-support ~]# warnquota

Execute Command To Send E-Mail to Particular User who exceeded quota or Grace Limit :-

[root@tejas-barot-linux-support ~]# warnquota -u <user-name>

Execute Command To Send E-Mail to Particular Group who exceeded quota or Grace Limit :-

[root@tejas-barot-linux-support ~]# warnquota -g <user-name>

7. That’s IT. Warning for Quota is configured.

Hope this will helps you all, If you face any issue regarding the same or its not working for your some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy Disk Quotas :) Enjoy WarnQuota :) Enjoy Linux :) Enjoy Open Source :)

Content Protection by DMCA.com

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


1 Comment »

 
  • Holger Krause says:

    Hi,

    Do you know, by chance, how to inform users of exceeded XFS project quota?

    Thanks in advance,

    Holger

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


one + 8 =