deliverquota 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 byes 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.
If the maildir is over its specified quota, deliverquota terminates with exit code 73.