Current time: 11-23-2024, 03:57 AM 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: #9
RE: Mail Quota with Dovecot (User + Domain)
(01-25-2010 07:13 PM)TheCry Wrote:  
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 see...I'll test this movement.

Quote: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 is my setting in master.cf for postfix(partial).
Code:
dovecot unix - n n - - pipe
  flags=DRhu user=vmail:mail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient} -s
Am I doing something weird here?
01-25-2010 07:30 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:30 PM

Forum Jump:


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