Current time: 06-30-2024, 04:53 PM Hello There, Guest! (LoginRegister)


Post Reply 
Mail Quota with Dovecot (User + Domain)
Author Message
TheCry Away
Member
***

Posts: 851
Joined: Oct 2008
Reputation: 21
Post: #6
RE: Mail Quota with Dovecot (User + Domain)
(01-25-2010 07:01 PM)kouga Wrote:  I hope this is what you're looking for....
Yes.. It's right

Code:
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');

In my opinion is this not correct, because %n ist the wrong variable.
%n means
Quote:user part in user@domain, same as %u if there's no domain
If you have different emailadresses eg "info@..." you will get more than one line in this query.

I use this query
Code:
user_query = SELECT concat('/var/mail/virtual/', domain.domain_name, '/',mail_acc) as home, '1000' as uid, '8' as gid, concat('*:bytes=', quota) AS quota_rule FROM mail_users inner join domain on mail_users.domain_id = domain.domain_id WHERE mail_addr='%u' and (mail_type='normal_mail' OR mail_type='normal_mail,normal_forward');

More info about dovecot variables: http://wiki.dovecot.org/Variables

Btw...
Code:
as home, '3001' as uid, '12'
Is this correct on your system?
This are the uid and gid of the user vmail!
Please check this in your passwd!
(This post was last modified: 01-25-2010 07:20 PM by TheCry.)
01-25-2010 07:13 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) - TheCry - 01-25-2010 07:13 PM

Forum Jump:


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