Home | Comics | Gallery | (Amazon| ThinkGeek) wishlist | Donations | Impressum | The Book of Postfix | Postfix - Einrichtung, Betrieb und Wartung | Blog


Multiple quota warnings with Dovecot 1.0.x

Prerequisite

You need to patch your dovecot 1.0.x sourcecode with this patch: quota-warning.patch

Config changes

Add the following to the plugin section in your dovecot.conf:
  quota_warning  = storage=10%% /usr/local/scripts/quota-warning 90
  quota_warning2 = storage=5%% /usr/local/scripts/quota-warning 95
  quota_warning3 = storage=1%% /usr/local/scripts/quota-warning 99

How does it work?

When the free storage falls below 10%, /usr/local/scripts/quota-warning 90 is being invoked using the system() syscall.
When the free storage falls below 5%, /usr/local/scripts/quota-warning 95 is being invoked using the system() syscall.
When the free storage falls below 1%, /usr/local/scripts/quota-warning 99 is being invoked using the system() syscall.

The script /usr/local/scripts/quota-warning

/usr/local/scripts/quota-warning is a script written by Doug Council (dcouncil at nethere dot com), which I adapted for use with Linux (the parameters for the stat command are different from FreeBSD).
It puts a quota warning message directly into the user's Maildir.
I also added an additional parameter (the percentage), which is being used in the quota warning message and in the log output.
© by Ralf Hildebrandt
This document contains links to external information sources that I do neither monitor nor control. I explicitly disclaim any liabilities in respect to external references.
You are getting this document without any guarantees. Any methods shown above are meant as demonstration and may be wrong in some place. You may damage your system if you try to follow my hints and instructions. You do this at your own risk!

Valid HTML 4.01 Strict

Windows 7 Sins

Locations of visitors to this page

This file was last modified 20. Jul 2007 by root