summaryrefslogtreecommitdiff
path: root/files/quota
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-12-06 23:02:23 +0100
committermh <mh@immerda.ch>2009-12-06 23:02:23 +0100
commit0d1a1fdb690cd88496776f1571416e468a51ce71 (patch)
tree9aa1baa428492f67afcf4a02d018fc3d466f961e /files/quota
parentc2b7e2af0438975e8b8b4c8d2532c383a8125e3f (diff)
initial release of the new dovecot module
Diffstat (limited to 'files/quota')
-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