<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><link rel='stylesheet' type='text/css' href='manpage.css'> <!-- $Id: maildirquota.sgml,v 1.2 2002/06/10 00:43:23 mrsam Exp $ --> <!-- Copyright 1998 - 2001 Double Precision, Inc. See COPYING for --> <!-- distribution information. --> <meta name="MSSmartTagsPreventParsing" content="TRUE"> <link rel="icon" href="icon.gif" type="image/gif" /> <TITLE >maildirquota</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><H1 ><A NAME="MAILDIRQUOTA" ></A >maildirquota</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN10" ></A ><H2 >Name</H2 >maildirquota -- voluntary Maildir quotas</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN13" ></A ><H2 >Synopsis</H2 ><P ><B CLASS="COMMAND" >maildirmake</B > {-q} {10000000S} {./Maildir}</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN19" ></A ><H2 >DESCRIPTION</H2 ><P ><B CLASS="COMMAND" >maildrop</B > has an experimental quota enforcement implementation. This is an option that is set at configuration time, and may be disabled.</P ><P >Filesystem-based quotas should be used whenever possible. However filesystem-based quotas cannot be used in some situations, such as virtual mailboxes. If this experimental feature is enabled, approximate quota enforcement can be implemented by <B CLASS="COMMAND" >maildrop</B > or <B CLASS="COMMAND" >deliverquota</B > to whatever extent it's possible to do so. Quotas are enabled by the <VAR CLASS="OPTION" >-q</VAR > option to <B CLASS="COMMAND" >maildirmake</B >. Both <B CLASS="COMMAND" >maildrop</B > and <B CLASS="COMMAND" >deliverquota</B > will observe any <B CLASS="COMMAND" >maildirmake</B >-requested quota.</P ><DIV CLASS="REFSECT2" ><A NAME="AEN31" ></A ><H3 >LIMITATIONS</H3 ><P >This quota mechanism will only work as long as <B CLASS="COMMAND" >maildrop</B > (or <B CLASS="COMMAND" >deliverquota</B >) are the only applications that deliver messages to the maildir, or as long as other applications implement the same quota enforcement mechanism. The quota enforcement mechanism is described separately in the <TT CLASS="FILENAME" >README.maildirquota.html</TT > file in the source code distribution.</P ><P >Quota enforcement will still work, to some extent, if there are other applications that deliver or modify messages in the maildir. However, quota enforcement may not kick in immediately when the maildir goes over quota, in fact the maildir can go over quota by a noticeable amount. But eventually, as long as <B CLASS="COMMAND" >maildrop</B > or <B CLASS="COMMAND" >deliverquota</B > are responsible for delivering the majority of messages, quota enforcement will kick in. Also, other sources of messages may also result in noticeable performance degradation, because quote recalculation will become noticeably more expensive.</P ><P >Also keep in mind that this quota mechanism is generally useless if mail recipients have direct access to their maildirs.</P ><P >Finally even under the best conditions this quota enforcement does have a small chance of a race condition where a maildir will go over quota by some amount. maildirs are designed for speed, and this quota implementation was designed to have as little additional overhead as possible, compared to regular maildirs. To enforce an exact quota you would have to use some kind of a locking facility, which will impose a drastic performance degradation on the overall maildir performance. A decision has been made to avoid locking, with the only negative side effect being a possibility of going over quota in very low probability situations.</P ><P >A way to minimize the risk of going over quota is to set reasonable quotas, in relation to maximum message sizes supported by your mail server. If you set your maildir quota to five megabytes, for example, it makes very little sense to configure your mail server to accept messages up to three megabytes long. Your maildir quota should be chosen so that it makes sense when compared to the maximum message size allowed by your mail server.</P ></DIV ><DIV CLASS="REFSECT2" ><A NAME="AEN43" ></A ><H3 >FOLDERS</H3 ><P >This quota implementation is compatible with a popular extension to maildir which defines individual mail folders within a single maildir. However, in order to create a compatible folder, you MUST use the <B CLASS="COMMAND" >maildirmake</B > command that comes with <B CLASS="COMMAND" >maildrop</B >, and you MUST use the <VAR CLASS="OPTION" >-f</VAR > option to <B CLASS="COMMAND" >maildirmake</B >, giving the name of the folder. Do not use <B CLASS="COMMAND" >maildirmake</B > and specify the directory name of the maildir folder. Quota enforcement will not work if you do that.</P ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN51" ></A ><H2 >SEE ALSO</H2 ><P ><A HREF="maildrop.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildrop</SPAN >(1)</SPAN ></A >, <A HREF="maildirmake.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildirmake</SPAN >(1)</SPAN ></A >, <A HREF="maildropfilter.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildropfilter</SPAN >(5)</SPAN ></A >, <A HREF="deliverquota.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >deliverquota</SPAN >(8)</SPAN ></A >.</P ></DIV ></BODY ></HTML >