Jump to content

Enforcing Quotas on Dovecot


titan21

Recommended Posts

Hello,

 

I have been looking at enforcing quotas for users of my mail system (postfix and Dovecot v1.2). Have tried to follow a few tuts on the web but its not having the desired effect. Essentially I can still send and receive mail on an account that I believe has had its quota exceeded.

 

In my main.cf, I have:

 

userdb sql {
         args = /etc/dovecot/mysql/dovecot-mysql.conf
}
passdb sql {
         args = /etc/dovecot/mysql/dovecot-mysql.conf
}

 

and...

 

protocol lda {
        mail_plugins = quota
}

protocol imap {
        mail_plugins = quota imap_quota
}

plugin {
        quota_exceeded_message = You have exceeded the maximum quota for your mailbox
}

 

the dovecot sql (mysql) file has the following query for pulling out user ids and quotas etc:

 

user_query = SELECT maildir, mymailuser as uid, mymailgroup as gid,concat('maildir:storage=',quota) as quota FROM virtual_mailbox WHERE username = '%u'

 

I have set one of my users to have a quota of 1 (so one byte I believe) so it should be over the limit pretty much immediately.

 

Looking at the logs I can see that the system is picking up on the quota limit but doesn't seem to enforce it.

 

Apr 27 10:29:02 deliver(test@testdomain.com): Info: auth input: quota=maildir:storage=1
Apr 27 10:29:02 deliver(test@testdomain.com): Info: Quota root: name=storage=1 backend=maildir args=

 

Any ideas? Am i missing something?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.