'\" t .\" .\" .\" Title: maildirquota .\" Author: Sam Varshavchik .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 10/28/2020 .\" Manual: Double Precision, Inc. .\" Source: Courier Mail Server .\" Language: English .\" .TH "MAILDIRQUOTA" "7" "10/28/2020" "Courier Mail Server" "Double Precision, Inc\&." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" maildirquota \- voluntary Maildir quotas .SH "SYNOPSIS" .HP \w'\fBmaildirmake\fR\ 'u \fBmaildirmake\fR {\-q} {10000000S} {\&./Maildir} .SH "DESCRIPTION" .PP \fBmaildrop\fR has a manual quota enforcement implementation that does use the quota facilities of the host operating system (filesystem\-based quotas)\&. This is an option that is set at configuration time, and may be disabled\&. .PP Using filesystem quotas sometimes leads to problems\&. After a hard quota is hit, most commands issued by mail clients fail, including some commands that poorly\-written mail software may not expect to fail, and therefore be unable to gracefully handle the unexpected failure\&. .PP With manual quotas, the only operations that fail are the ones that most mail clients expect to fail, when the mailbox is full\&. 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 \fBmaildrop\fR or \fBdeliverquota\fR to whatever extent it\*(Aqs possible to do so\&. Quotas are enabled by the \fB\-q\fR option to \fBmaildirmake\fR\&. Both \fBmaildrop\fR and \fBdeliverquota\fR will observe any \fBmaildirmake\fR\-requested quota\&. .SS "LIMITATIONS" .PP This quota mechanism will only work as long as \fBmaildrop\fR (or \fBdeliverquota\fR) 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 README\&.maildirquota\&.html file in the source code distribution\&. .PP 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 \fBmaildrop\fR or \fBdeliverquota\fR 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\&. .PP Also keep in mind that this quota mechanism is generally useless if mail recipients have direct access to their maildirs\&. .PP 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\&. .PP 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 gigabytes, for example, it makes very little sense to configure your mail server to accept messages up to three gigabytes in size\&. Your maildir quota should be chosen so that it makes sense when compared to the maximum message size allowed by your mail server\&. .SS "FOLDERS" .PP 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 \fBmaildirmake\fR command that comes with \fBmaildrop\fR, and you MUST use the \fB\-f\fR option to \fBmaildirmake\fR, giving the name of the folder\&. Do not use \fBmaildirmake\fR and specify the directory name of the maildir folder\&. Quota enforcement will not work if you do that\&. .SH "SEE ALSO" .PP \m[blue]\fB\fBmaildrop\fR(1)\fR\m[]\&\s-2\u[1]\d\s+2, \m[blue]\fB\fBmaildirmake\fR(1)\fR\m[]\&\s-2\u[2]\d\s+2, \m[blue]\fB\fBmaildropfilter\fR(5)\fR\m[]\&\s-2\u[3]\d\s+2, \m[blue]\fB\fBdeliverquota\fR(8)\fR\m[]\&\s-2\u[4]\d\s+2\&. .SH "AUTHOR" .PP \fBSam Varshavchik\fR .RS 4 Author .RE .SH "NOTES" .IP " 1." 4 \fBmaildrop\fR(1) .RS 4 \%http://www.courier-mta.org/maildrop.html .RE .IP " 2." 4 \fBmaildirmake\fR(1) .RS 4 \%http://www.courier-mta.org/maildirmake.html .RE .IP " 3." 4 \fBmaildropfilter\fR(5) .RS 4 \%http://www.courier-mta.org/maildropfilter.html .RE .IP " 4." 4 \fBdeliverquota\fR(8) .RS 4 \%http://www.courier-mta.org/deliverquota.html .RE