#!/bin/bash

PERCENT=$1
USER=$2

cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=dict:User quota::noenforcing:proxy::sqlquota"
From: postmaster@898.ro
Subject: Mailbox quota warning

Your mailbox is now $PERCENT% full.
EOF
