576bbc
From 67a0dbf6434552e720b0d311597553b3a76f779e Mon Sep 17 00:00:00 2001
4b1641
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
4b1641
Date: Tue, 23 Aug 2011 13:45:15 +0200
4b1641
Subject: [PATCH] warnquota configuration tunes
c75f5e
MIME-Version: 1.0
c75f5e
Content-Type: text/plain; charset=UTF-8
c75f5e
Content-Transfer-Encoding: 8bit
4b1641
4b1641
Rest of changes (378a64006bb1e818e84a1c77808563b802b028fa) not
3e3ab3
accepted by upstream (we had root@... addresses and more enterprise
3e3ab3
wordings usually there).
c75f5e
c75f5e
Signed-off-by: Petr Písař <ppisar@redhat.com>
4b1641
---
442211
 warnquota.c    |  2 +-
442211
 warnquota.conf | 17 ++++++++---------
442211
 2 files changed, 9 insertions(+), 10 deletions(-)
4b1641
4b1641
diff --git a/warnquota.c b/warnquota.c
576bbc
index 0d911e4..2c8e084 100644
4b1641
--- a/warnquota.c
4b1641
+++ b/warnquota.c
576bbc
@@ -837,7 +837,7 @@ cc_parse_err:
4b1641
 			}
576bbc
 #ifdef USE_LDAP_MAIL_LOOKUP
4b1641
 			else if (!strcmp(var, "LDAP_MAIL")) {
4b1641
-				if(strcasecmp(value, "true") == 0) 
576bbc
+				if(strncasecmp(value, "true", 4) == 0)
4b1641
 					config->use_ldap_mail = 1;
4b1641
 				else
4b1641
 					config->use_ldap_mail = 0;
4b1641
diff --git a/warnquota.conf b/warnquota.conf
67a767
index b06f81f..7e00947 100644
4b1641
--- a/warnquota.conf
4b1641
+++ b/warnquota.conf
442211
@@ -4,17 +4,16 @@
cvsdist 7cac73
 # and even blank lines
cvsdist 7cac73
 
cvsdist 7cac73
 # values can be quoted:
442211
-#MAIL_CMD 	= "/usr/my/sendmail/instead/sendmail -t"
442211
-MAIL_CMD 	= "/bin/echo"
4b1641
-FROM 		= "bas@example.com"
cvsdist 7cac73
+MAIL_CMD 	= "/usr/sbin/sendmail -t"
3e3ab3
+FROM 		= "root@example.com"
cvsdist 7cac73
 # but they don't have to be:
cvsdist 7cac73
-SUBJECT 	= Hey, user, clean up your account!
4b1641
-CC_TO 		= "sysadm@example.com"
768a01
+SUBJECT 	= NOTE: You are exceeding your allocated disk space limits
3e3ab3
+CC_TO 		= "root@example.com"
503564
 # If you set this variable CC will be used only when user has less than
503564
 # specified grace time left (examples of possible times: 5 seconds, 1 minute,
503564
 # 12 hours, 5 days)
503564
 # CC_BEFORE = 2 days
4b1641
-SUPPORT 	= "support@example.com"
3e3ab3
+SUPPORT 	= "root@example.com"
cvsdist 7cac73
 PHONE 		= "(123) 456-1111 or (222) 333-4444"
cvsdist 7cac73
 # Text in the beginning of the mail (if not specified, default text is used)
cvsdist 7cac73
 # This way text can be split to more lines
442211
@@ -22,11 +21,11 @@ PHONE 		= "(123) 456-1111 or (222) 333-4444"
aa88b6
 # The expressions %i, %h, %d, and %% are substituted for user/group name,
aa88b6
 # host name, domain name, and '%' respectively. For backward compatibility
aa88b6
 # %s behaves as %i but is deprecated.
aa88b6
-MESSAGE         = Hello user %i, I've noticed you use too much space\
aa88b6
- on my disk in %h.%d.|Delete your files on the following filesystems:|
768a01
+MESSAGE         = Your disk usage has exceeded the agreed limits\
cvsdist 7cac73
+ on this server|Please delete any unnecessary files on following filesystems:|
cvsdist 7cac73
 # Text in the end of the mail (if not specified, default text using SUPPORT and PHONE
cvsdist 7cac73
 # is created)
aa88b6
-SIGNATURE	= See you!|			Your admin of %h|
3e3ab3
+SIGNATURE	= root@example.com
cvsdist 902fba
 # Following text is used for mails about group exceeding quotas
c75f5e
 GROUP_MESSAGE	= Hello,|\
c75f5e
 your group %i is using too much disk space at %h.|\
4b1641
-- 
576bbc
2.13.5
4b1641