Current time: 09-29-2024, 08:14 PM Hello There, Guest! (LoginRegister)


Post Reply 
Mail Quota with Dovecot (User + Domain)
Author Message
kouga Offline
Junior Member
*

Posts: 22
Joined: May 2009
Reputation: 0
Post: #4
RE: Mail Quota with Dovecot (User + Domain)
(01-25-2010 06:35 PM)TheCry Wrote:  Please post the Line from Dovecot, which you are using to calculate the the quota...

I hope this is what you're looking for....

/etc/dovecot/dovecot-sql-domain.conf
Code:
driver = mysql
connect = host=localhost dbname=ispcp user=ispcp_dovecot password=MASKED
user_query = SELECT concat('/var/mail/virtual/', domain.domain_name, '/',mail_acc) as home, '3001' as uid, '12' as gid, concat('*:storage=', floor(quota/1024)) AS quota_rule FROM mail_users inner join domain on mail_users.domain_id = domain.domain_id WHERE mail_acc='%n' and (mail_type='normal_mail' OR mail_type='normal_mail,normal_forward');
I'm on CentOS 5.2 so the uid and gid for vmail might be different on your OS.


/etc/dovecot.conf
Code:
- partial -

}
userdb sql {
  args = /etc/dovecot/dovecot-sql-domain.conf
}
plugin {
quota = maildir:User quota
quota_rule = *:storage=10M
}
(This post was last modified: 01-25-2010 08:03 PM by kouga.)
01-25-2010 07:01 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Mail Quota with Dovecot (User + Domain) - kouga - 01-25-2010 07:01 PM

Forum Jump:


User(s) browsing this thread: 6 Guest(s)