docker-mailserver/target/dovecot/scripts/quota-warning.sh

16 lines
324 B
Bash
Raw Normal View History

2020-11-06 14:04:23 +01:00
#! /usr/bin/env sh
# Report a quota usage warning to an user
PERCENT="${1}"
USER="${2}"
DOMAIN="${3}"
# shellcheck disable=SC2250
cat << EOF | /usr/lib/dovecot/dovecot-lda -d "$USER" -o "plugin/quota=maildir:User quota:noenforcing"
From: postmaster@$DOMAIN
Subject: quota warning
Your mailbox is now $PERCENT% full.
EOF