steffen: server/kolabd/kolabd kolabquotawarn, 1.2, 1.3 quotawarning.txt, 1.1.1.1, 1.2
cvs at intevation.de
cvs at intevation.de
Mon Jun 6 23:27:27 CEST 2005
Author: steffen
Update of /kolabrepository/server/kolabd/kolabd
In directory doto:/tmp/cvs-serv24618/kolabd
Modified Files:
kolabquotawarn quotawarning.txt
Log Message:
Issue779 (german quota warning)
Index: kolabquotawarn
===================================================================
RCS file: /kolabrepository/server/kolabd/kolabd/kolabquotawarn,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- kolabquotawarn 24 Mar 2005 10:13:34 -0000 1.2
+++ kolabquotawarn 6 Jun 2005 21:27:25 -0000 1.3
@@ -47,7 +47,7 @@
foreach my $key (sort keys %Kolab::config) {
print "$key : " . $Kolab::config{$key} . "\n";
}
- exit 0;
+ #exit 0;
}
#
@@ -119,15 +119,20 @@
my $msg = $warnmessage;
my ($user) = ( $mailbox =~ /.*\/(.*)/ );
- $msg =~ s/<user>/$user/;
- $msg =~ s/<mailbox>/$mailbox/;
- $msg =~ s/<percent>/$pct/;
- $msg =~ s/<used>/$used/;
- $msg =~ s/<total>/$total/;
+
+ print "mailbox=$mailbox, user=$user, used=$used, pct=$pct\n" if $opt_d;
+
+ $msg =~ s/<user>/$user/g;
+ $msg =~ s/<mailbox>/$mailbox/g;
+ $msg =~ s/<percent>/$pct/g;
+ $msg =~ s/<used>/$used/g;
+ $msg =~ s/<total>/$total/g;
my $mail = Mail::Message->build( From => "MAILER-DAEMON",
- To => $user,
- Subject => "Quota warning",
- data => $msg );
+ To => $user,
+ Subject => "Quota warning",
+ Charset => "utf-8",
+ data => $msg );
+ $mail->print if $opt_d;
$mail->send();
}
@@ -144,7 +149,9 @@
my $total = $quota{'STORAGE'}[1];
my $pct = $used * 100 / $total;
if( $pct >= $warnpct ) {
+ print "$name is at $pct\n" if $opt_d;
my $ts = $quotawarn_db{$name};
+ print "ts=$ts\n" if $opt_d;
if( defined($ts) ) {
if( $ts eq "permanent" ) {
next;
Index: quotawarning.txt
===================================================================
RCS file: /kolabrepository/server/kolabd/kolabd/quotawarning.txt,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- quotawarning.txt 23 Nov 2004 20:26:47 -0000 1.1.1.1
+++ quotawarning.txt 6 Jun 2005 21:27:25 -0000 1.2
@@ -1,6 +1,15 @@
[This is an automatically generated message.]
The mailbox for <user> is <percent>% full, please clean it up.
-The size of the mailbox is currently <used> KB out of a total allowed <total> KB.
+The size of the mailbox is currently <used> KB out of a total
+allowed <total> KB.
+
+<admin>
+
+[Dies ist eine automatisch generierte Nachricht]
+
+Das Postfach für <user> ist zu <percent>% gefüllt. Bitte
+räumen Sie es auf.
+Das Postfach belegt zurzeit <used> KB von erlaubten <total> KB.
<admin>
More information about the commits
mailing list