courier-imap - maildirmake

CMD: maildirmake

maildirmake -q 10000000S ./Maildir

./Maildir is an existing maildir, and this -q options sets a quota of about 10 megabytes.

File: maildirsize

e.g.

2097152000S
  2140029665         3298

maildirsize contains two or more lines terminated by newline characters.

The first line contains a copy of the quota definition as used by the system's mail server.

quota types
'S' - total size of all messages,
'C' - the maximum count of messages in the maildir.

For example, 10000000S,1000C
specifies a quota of 10,000,000 bytes or 1,000 messages, whichever comes first.

* All remaining lines all contain two whitespace-delimited integers.
The first integer is interpreted as a byte count. The second integer is interpreted as a file count.

Calculating maildirsize

* changes to maildirsize are recorded by appending an additional line.
* Read the contents of the new and cur subdirectories, except Trash.

If the filename of each message is of the form xxxxx,S=nnnnn or xxxxx,S=nnnnn:xxxxx
where "xxxxx" represents arbitrary text, then use nnnnn as the size of the file

Create a new maildirsize by:

creating the file in the tmp subdirectory, observing the conventions for writing to a Maildir.
Then rename the file as maildirsize

[root@mail tmp]# touch myfile
[root@mail tmp]# chown vmail. myfile
[root@mail tmp]# mv myfile maildirsize

Creative Commons license icon Creative Commons license icon