deliverquota

Name

deliverquota -- deliver to a maildir with a quota

Synopsis

deliverquota [-c] [-w percent] {maildir} {quota}

DESCRIPTION

deliverquota delivers mail to a maildir with a software-imposed quota. The manually-enforced quota mechanism described in maildirquota(7). Instead of setting up your mail server to deliver the message to a maildir, set up 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. maildir may specify a path directly to a maildir folder, not the main maildir (as long as the folder was created by the maildirmake(1) command.

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 automatically creates the maildir, and all missing parent subdirectories (as 'mkdir -p'). This option should be used with caution.

The -w N option places a warning message into the maildir if the message was successfully delivered, but the maildir is now at least N percent full. The warning message is copied verbatim from /etc/quotawarnmsg with the addition of "Date:" and "Message-Id:" headers. The warning is repeated every 24 hours (at least), until the maildir drops below N percent full.

RETURN CODE

deliverquota delivers the message to the maildir and terminates with exit code 0 if the message can be delivered without going over quota.

If the maildir is over its specified quota, deliverquota terminates with exit code 77 (EX_NOPERM).

SEE ALSO

maildirquota(7), maildirmake(1), http://www.qmail.org/man/man5/maildir.html.