7c06a3
From d2f7a6be1526a6f46cbf37aa27587a51e4d5990f Mon Sep 17 00:00:00 2001
7c06a3
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
7c06a3
Date: Tue, 23 Aug 2011 13:45:15 +0200
7c06a3
Subject: [PATCH] warnquota configuration tunes
7c06a3
7c06a3
Rest of changes (378a64006bb1e818e84a1c77808563b802b028fa) not
7c06a3
accepted by upstream (we had root@... addresses and more enterprise
7c06a3
wordings usually there).
7c06a3
---
7c06a3
 warnquota.c    |  2 +-
7c06a3
 warnquota.conf | 17 ++++++++---------
7c06a3
 2 files changed, 9 insertions(+), 10 deletions(-)
7c06a3
7c06a3
diff --git a/warnquota.c b/warnquota.c
7c06a3
index 08827f2..c7ca6f2 100644
7c06a3
--- a/warnquota.c
7c06a3
+++ b/warnquota.c
7c06a3
@@ -806,7 +806,7 @@ static int readconfigfile(const char *filename, struct configparams *config)
7c06a3
 				verify_format(config->group_signature, "GROUP_SIGNATURE");
7c06a3
 			}
7c06a3
 			else if (!strcmp(var, "LDAP_MAIL")) {
7c06a3
-				if(strcasecmp(value, "true") == 0) 
7c06a3
+				if(strncasecmp(value, "true", 4) == 0) 
7c06a3
 					config->use_ldap_mail = 1;
7c06a3
 				else
7c06a3
 					config->use_ldap_mail = 0;
7c06a3
diff --git a/warnquota.conf b/warnquota.conf
7c06a3
index 2a72b78..77f6a75 100644
7c06a3
--- a/warnquota.conf
7c06a3
+++ b/warnquota.conf
7c06a3
@@ -4,17 +4,16 @@
7c06a3
 # and even blank lines
7c06a3
 
7c06a3
 # values can be quoted:
7c06a3
-#MAIL_CMD 	= "/usr/my/sendmail/instead/sendmail -t"
7c06a3
-MAIL_CMD 	= "/bin/echo"
7c06a3
-FROM 		= "bas@example.com"
7c06a3
+MAIL_CMD 	= "/usr/sbin/sendmail -t"
7c06a3
+FROM 		= "root@example.com"
7c06a3
 # but they don't have to be:
7c06a3
-SUBJECT 	= Hey, user, clean up your account!
7c06a3
-CC_TO 		= "sysadm@example.com"
7c06a3
+SUBJECT 	= NOTE: You are exceeding your allocated disk space limits
7c06a3
+CC_TO 		= "root@example.com"
7c06a3
 # If you set this variable CC will be used only when user has less than
7c06a3
 # specified grace time left (examples of possible times: 5 seconds, 1 minute,
7c06a3
 # 12 hours, 5 days)
7c06a3
 # CC_BEFORE = 2 days
7c06a3
-SUPPORT 	= "support@example.com"
7c06a3
+SUPPORT 	= "root@example.com"
7c06a3
 PHONE 		= "(123) 456-1111 or (222) 333-4444"
7c06a3
 # Text in the beginning of the mail (if not specified, default text is used)
7c06a3
 # This way text can be split to more lines
7c06a3
@@ -22,11 +21,11 @@ PHONE 		= "(123) 456-1111 or (222) 333-4444"
7c06a3
 # The expressions %i, %h, %d, and %% are substituted for user/group name,
7c06a3
 # host name, domain name, and '%' respectively. For backward compatibility
7c06a3
 # %s behaves as %i but is deprecated.
7c06a3
-MESSAGE         = Hello user %i, I've noticed you use too much space\
7c06a3
- on my disk in %h.%d.|Delete your files on the following filesystems:|
7c06a3
+MESSAGE         = Your disk usage has exceeded the agreed limits\
7c06a3
+ on this server|Please delete any unnecessary files on following filesystems:|
7c06a3
 # Text in the end of the mail (if not specified, default text using SUPPORT and PHONE
7c06a3
 # is created)
7c06a3
-SIGNATURE	= See you!|			Your admin of %h|
7c06a3
+SIGNATURE	= root@example.com
7c06a3
 # Following text is used for mails about group exceeding quotas
7c06a3
 GROUP_MESSAGE	= Hello, a group '%i' you're member of use too much space at %h.|\
7c06a3
 I chose you to do the cleanup.|Delete group files on the following filesystems:|
7c06a3
-- 
7c06a3
1.7.11.4
7c06a3