On 10/07/07, Timo Sirainen <[EMAIL PROTECTED]> wrote:
On Mon, 2007-07-09 at 17:36 +0100, Frank Church wrote:
>   quota = maildir:storage=10240:messages=1000
..
> Looking at the above settings I assume that 10240 Kb or 1000 messages
> constitute the message limit.

Yes.

> Is there an override on a per mailbox setting in the mailbox folder?

By "mailbox" do you mean users or folders? It's a per-user setting, and
it's possible to override the global quota by having userdb return a
quota field. See the SQL examples in http://wiki.dovecot.org/Quota

> Do Postfix and PostfixAdmin also have their custom settings?
>
> The problem doesn't appear to apply at the delivery stage, so it
> appears to be something respected by dovecot alone.

If you want to enforce quota, use Dovecot's deliver or some other MDA
that supports Maildir++ quota. Postfix's internal MDA doesn't.




I think I got to the bottom of the problem, which probably is the
result of too much dependency on howtos and not enough RTFMing. I have
an empty blog named 'howtos considered harmful' , and this will
provide a good article.

It appears that I changed my dovecot/sql.conf from one with a separate
user_query and password_query to one with just the password_query in
conjunction with the prefetch scheme, which did not include the quota
setting. I will add " concat('dirsize:storage=', quota) AS
userdb_quota " to the password_query to see if it will fix the
problem.

I also have to remember to add a userdb entry to dovecot.conf and
user_query to dovecot/sql.conf just in case I opt to use dovecot's
deliver later.

The wiki states that in this case the userdb entry must come after the
prefetch entry in dovecot.conf. If this is the case I think the text
indicating the 'after' must be emphasized in the wiki. It is one of
the things that come back to bite you later.


Before
=====
driver = mysql
user_query = SELECT concat('/var/vmail/', maildir) as home,
concat('maildir:/var/vmail/', maildir) as mail, 601 AS uid, 12 AS gid,
concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username
= '%u' AND active = '1'

password_query = SELECT username as user, password,
concat('/var/vmail/', maildir) as userdb_home,
concat('maildir:/var/vmail/', maildir) as userdb_mail, 601 as
userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND
active = '1'

After
=====
default_pass_scheme = MD5-CRYPT

driver = mysql

password_query = SELECT username as user, password,
concat('/var/vmail/', maildir) as userdb_home,
concat('maildir:/var/vmail/', maildir) as userdb_mail, 601 as
userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND
active = '1'

Reply via email to