# Quota for e-mails



## dennylin93 (Jul 24, 2009)

I've set up Postfix and Dovecot for a mail server, and now I'm going to define the quotas. There's message_size_limit and mailbox_size_limit for Postfix, as well as quota for IMAP and LDA in Dovecot.

Should I define the quota in both Postfix and Dovecot, or will any one of them work?


----------



## DutchDaemon (Jul 24, 2009)

I would set an incoming message size in Postfix (a 15 MB limit is pretty standard), and a mailbox limit in Dovecot. That way, a sender will be informed when a message is too big, and local users will be informed when they need to clean up their mailboxes. Setting everything in Postfix will also inform the sender when a user's mailbox is full (which is somewhat pointless) without informing the local user (_unless_ the Postfix quota manager has a way to inform the local user about the problem -- I'm sure Dovecot has, because it communicates directly with the local user).


----------



## hydra (Jul 24, 2009)

I would recommend you to use LDA with the Maildir quota.


----------



## dennylin93 (Jul 24, 2009)

Thanks, I'll try it out tomorrow. I think I'll stick to mboxes for backward compatibility though.


----------



## phoenix (Jul 24, 2009)

Don't!  mbox is dead, and should not be used for anything anymore.  There are just too many issues with mbox, and any MUA (mail app) that doesn't support at least Maildir should be avoided.

Just don't try to use mbox for anything that might store more than 5-10 messages in a single folder.  It just won't work, and will cause you all kinds of headaches.


----------



## hydra (Jul 24, 2009)

I second that...


----------



## dennylin93 (Jul 25, 2009)

phoenix said:
			
		

> Don't!  mbox is dead, and should not be used for anything anymore.



Any suggestions about which method I should use for the quota plugin in Dovecot? Dirsize definitely won't do, so there's only dict, maildir, and fs left.

The main problem with mboxes seems to be file-locking and NFS.


----------

