summaryrefslogtreecommitdiff
path: root/files/quota/quota-warning.sh
blob: 8cdaa7788e0368d9b5cabd5c91e2c5c7ef1a47c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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