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