MAILDIRQUOTA(7)

๐Ÿ“ฆ
version 3.1.0 ยท 2 versions
, in epel 9, fedora 43, fedora 44, nixos 26.05

๐Ÿ’Œ MAILDIRQUOTA(7) ๐Ÿ’Œ

okay bestie, sit down, because we're talking about maildirquota โ€” voluntary Maildir quotas โ€” and it's from the iconic Double Precision, Inc. universe, page 7 of the manual, iykyk ๐Ÿ’…


โœจ NAME โœจ

maildirquota โ€” voluntary Maildir quotas ๐ŸŽ€


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

maildirmake {-q} {10000000S} {./Maildir}

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so like, maildrop has a manual quota enforcement implementation that does not use the quota facilities of the host operating system (you know, the filesystem-based quotas ๐Ÿ‘€). This is an option that gets set at configuration time, and it may be disabled.

Using filesystem quotas sometimes leads to problems, and not the cute kind ๐Ÿ˜ญ. 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. it's giving chaos, honestly.

With manual quotas, the only operations that fail are the ones that most mail clients expect to fail, when the mailbox is full. Periodt. 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 maildrop or deliverquota to whatever extent it's possible to do so. Quotas are enabled by the -q option to maildirmake. Both maildrop and deliverquota will observe any maildirmake-requested quota. ๐Ÿซถ


๐Ÿ˜ญ LIMITATIONS ๐Ÿ˜ญ

ngl, this quota mechanism will only work as long as maildrop (or deliverquota) 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. ๐Ÿ“„

Quota enforcement will still work, to some extent, if there are other applications that deliver or modify messages in the maildir. However โ€” and this is the important part โ€” 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 maildrop or deliverquota 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 ๐Ÿ’€

Also keep in mind that this quota mechanism is generally useless if mail recipients have direct access to their maildirs. like, what's the point bestie ๐Ÿ™ˆ

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. That's the tradeoff, and honestly? valid. ๐Ÿ’…

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. math is math ๐Ÿงฎ


๐ŸŽ€ FOLDERS ๐ŸŽ€

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 maildirmake command that comes with maildrop, and you MUST use the -f option to maildirmake, giving the name of the folder. Do NOT use maildirmake and specify the directory name of the maildir folder. Quota enforcement will not work if you do that. ๐Ÿšซ

bestie I am BEGGING you, use -f. do not do the other thing. it will not work. no cap. ๐Ÿ˜ค

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


๐ŸŒธ AUTHOR ๐ŸŒธ

Sam Varshavchik Author


๐Ÿฆ„ NOTES ๐Ÿฆ„

  1. maildrop(1) http://www.courier-mta.org/maildrop.html
  2. maildirmake(1) http://www.courier-mta.org/maildirmake.html
  3. maildropfilter(5) http://www.courier-mta.org/maildropfilter.html
  4. deliverquota(8) http://www.courier-mta.org/deliverquota.html

and that's the whole page, bestie โ€” brought to you by Courier Mail Server, version dated 11/04/2020. slay, go set some reasonable quotas, and remember: no locking, tiny race condition, we move. ๐Ÿ’–โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from