AlternC/src/quota-warning.sh

17 lines
297 B
Bash
Raw Normal View History

2012-12-04 11:09:22 +00:00
#!/bin/bash
PERCENT=$1
DOM="`echo $USER | sed -e 's/.*@//'`"
FROM="postmaster@$DOM"
msg="From: $FROM
To: $USER
Subject: Your email quota is $PERCENT% full
Content-Type: text/plain; charset=UTF-8
Your mailbox is now $PERCENT% full."
echo -e "$msg" | /usr/sbin/sendmail -f $FROM "$USER"
exit 0