[Dovecot] Quota handling - v2 - updated FR

Timo Sirainen tss at iki.fi
Mon Jun 4 04:46:43 EEST 2007


On Wed, 2007-05-23 at 07:30 -0400, Charles Marcus wrote:
> *** 3. When user is over quota, have LDA deliver to the folder 
> referenced above (# 1) - (yes, accept the message for final delivery 
> from the sending mta), and then update the Quota Status message and move 
> it to the Inbox.
> 
> Optionally, a bounce/notification could be generated to the sender, 
> informing them that their message is being 'held in queue' or something 
> to that effect, due to the recipient being over-quota.
> 
> *** 4. Once the user deletes enough mail to come back under quota, 
> dovecot would then move messages from the 'over-quota' folder to his Inbox.

I think most of this could be scripted.

deliver.sh:

# -e is v1.1+
deliver -e -d $USER
if [ $? = $EX_NOPERM ]; then
  # over quota is the only reason why it can fail
  deliver -c /etc/dovecot-noquota.conf -d $USER -m overquota
  # create your over quota email using some special maildir filename and
  # delete the existing one from the user's INBOX
  new_filename=overquota.$$.`date +%s`
  rm /home/$USER/Maildir/cur/overquota.*
fi
exit $?

Then create a global ACL for the overquota mailbox so that it can't be
accessed at all. Once user is under quota move the messages to INBOX,
for example when logging in.

The only problem is knowing easily when user is under quota. Maybe
quota-warning.patch could be modified to support under-quota hooking as
well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070604/2b8d7aca/attachment.bin 


More information about the dovecot mailing list