summaryrefslogtreecommitdiff
path: root/files/quota/quota-warning.sh
diff options
context:
space:
mode:
Diffstat (limited to 'files/quota/quota-warning.sh')
-rw-r--r--files/quota/quota-warning.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/files/quota/quota-warning.sh b/files/quota/quota-warning.sh
new file mode 100644
index 0000000..8cdaa77
--- /dev/null
+++ b/files/quota/quota-warning.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+PERCENT=$1
+FROM="postmaster@example.com"
+qwf="/tmp/quota.warning.$$"
+
+echo "From: $FROM
+To: $USER
+Subject: Your email quota is $PERCENT% full
+Content-Type: text/plain; charset="UTF-8"
+
+Deine Mailbox ist nun $PERCENT% full.
+Your mailbox is now $PERCENT% full.
+
+Bitte räume deine Mailbox auf.
+Please clean up your mailbox.
+
+Volle Mailboxen werden keine Emails mehr empfangen.
+Full mailboxes will reject emails." >> $qwf
+
+cat $qwf | /usr/sbin/sendmail -f $FROM "$USER"
+rm -f $qwf
+
+exit 0