LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-11-2009, 01:11 AM   #1
camry
LQ Newbie
 
Registered: May 2008
Posts: 27

Rep: Reputation: 15
how to emailquota warning


Dears, I just applied my quota to users in my RHEL5 in there home directories, I'm now want them to receive emails when they reach the warning level of the quota, I know It can be don through send mail, But could you please tell me how to do ?
Thanks
 
Old 05-11-2009, 03:29 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Just an example:
Code:
(
 echo "From: admin <admin@hostname>"
 echo "To: Mario Rossi <user@domain>"
 echo "Cc: Luigi Bianchi <user2@domain>"
 echo "Subject: User quota exceeded"
 echo
 $(date +"%A %_d %b %Y %H:%M:%S") - your user quota exceeded"
 $(command to report user quota here)
 echo
 echo Best regards
 echo The system administrator
) | /usr/sbin/sendmail "user@domain"
You can also embed shell variables in the mail body or in the subject.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ld: warning drand Linux - Software 2 05-25-2010 04:03 AM
GC Warning ashlesha Linux - General 3 07-17-2006 03:58 PM
warning! Volcano Linux - Newbie 4 04-24-2006 07:08 AM
Hello/WARNING tn0615 LinuxQuestions.org Member Intro 1 01-09-2006 10:21 PM
what is this warning in C? h/w Programming 7 10-26-2003 11:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration