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