deliverquota [-c] [-w percent] maildir quota
deliverquota is a temporary hack to implement E-mail delivery to a maildir with a software-imposed quota. This refers to a manually-enforced quota mechanism described in maildirquota(8), NOT a filesystem-based quota. If your current mail server does not support the quota maildir extension you can use this temporary utility. Instead of instructing your mail server to deliver the message to a maildir, instruct the mail server to deliver the message to the deliverquota program, and specify the location of the maildir, and its corresponding quota, as the arguments.
deliverquota reads the message from standard input and delivers it to maildir, which can actually specify a maildir folder. quota is a list of comma separated quota specifications. A quota specification consists of a number followed by either 'S', indicating the maximum message size in bytes, or 'C', maximum number of messages. For example:
deliverquota ./Maildir 5000000S,1000C
This delivers to ./Maildir with the quota set to 5,000,000 bytes or 1000 messages, whichever comes first.
deliverquota ./Maildir 1000000S
This delivers to ./Maildir with the quota set to 1,000,000 bytes, without limiting number of messages.
The -c option causes the maildir, and all parent subdirectories, to be created if necessary (as 'mkdir -p'). This option should be used with caution.
The -w option causes a warning message to be delivered into the maildrop if
the message was successfully delivered but has left the user over
percent utilisation. The warning message is copied verbatim from
/etc/quotawarnmsg
with the addition of Date: and
Message-Id: headers. The warning is suppressed if one was delivered within the
last 24 hours.
If the maildir is over its specified quota, deliverquota terminates with exit code 77 (EX_NOPERM).