Files
ansible/roles/mkt-scripts/files/dovecot/quota-warning.sh

22 lines
396 B
Bash
Executable File

#!/bin/sh
PERCENT=$1
FROM="postmaster@maketank.net"
msg="From: $FROM
To: $USER
To: postmaster@maketank.net
Subject: Your email quota is $PERCENT% full
Content-Type: text/plain; charset=UTF-8
Your mailbox is now $PERCENT% full.
Please free up some space, or increase the quota settings for this account.
Regards,
your IMAP-Mailbox.
"
echo "$msg" | /usr/sbin/sendmail -f $FROM "$USER"
exit 0