Alternc  latest
Alternc logiel libre pour l'hébergement
quota-warning.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 PERCENT=$1
4 DOM="`echo $USER | sed -e 's/.*@//'`"
5 FROM="postmaster@$DOM"
6 
7 msg="From: $FROM
8 To: $USER
9 Subject: Your email quota is $PERCENT% full
10 Content-Type: text/plain; charset=UTF-8
11 
12 Your mailbox is now $PERCENT% full."
13 
14 echo -e "$msg" | /usr/sbin/sendmail -f $FROM "$USER"
15 
16 exit 0