lmtp delivery if over quota
simon.matter at invoca.ch
Wed Jun 24 14:42:38 EDT 2009
> On Wed, 24 Jun 2009, Rudy Gevaert wrote:
>> Citeren Rudy Gevaert <rudy.gevaert at ugent.be>:
>>> I was wondering if it is possible to deliver an email to a mailbox
>>> even when the mailbox is over quota.
>>> We sometimes have users emailing us 'we are over quota', but we can't
>>> reply because they are over quota :). We then temporary increase the
>>> quota till the users cleans up his mailbox.
>>> However it would be easy to still deliver email in certain cases.
>>> Any ideas?
> We kinda bruteforce it here:
> open(OUT, "| ssh root\@$location /usr/local/cyrus/bin/deliver -q
> -r osuhelpdesk\@oregonstate.edu $username");
> (where $location is the backend holding $username's mailbox)
> Then we pipe in our prepared overquota warning message to it.
>> And now I see that lmtp has an IGNOREQUOTA extension! :)
> Is anyone using this? I don't have a script which speaks LMTP, so some
> example code would be useful.
Yes I do with my quotawarn.sh script. Basically it calls 'deliver -l' and
sends something like
echo "warning mailbox $owner with $pct% quota"
cat << EOF | submit
RCPT TO:<$owner> IGNOREQUOTA
Subject: WARNING: Your mailbox has reached $pct% quota.
Your server mailbox has reached $pct% of your available quota
for storing messages. This will not cause any immediate problem,
but if the size of your inbox exceeds your quota, you will not be
able to receive any new email until some messages are removed
from your server mailbox, either by deleting them or saving them
to a local folder.
If you need assistance cleaning up your inbox, please contact the
Help Desk on tel. $helptel or by email at $helpmail.
More information about the Info-cyrus