-#!/bin/sh
+#!/bin/bash
set -e
PERCENT=$1
-FROM="{{postfix.dovecot.postmaster}}"
+USER=$2
+FROM="{{postfix.postmaster}}"
msg="From: $FROM
To: $USER
Your mailbox is now $PERCENT% full. Please clean it up a bit!"
-echo -e "$msg" | /usr/sbin/sendmail -f "$FROM" "$USER" "$FROM"
+echo "$msg" | /usr/sbin/sendmail -f "$FROM" "$USER" "$FROM"
exit 0