Re: [Dovecot] about quota in dovecot

2009-04-01 Thread Timo Sirainen
On Sun, 2009-03-29 at 13:03 +0800, guojinpeng(郭晋鹏) wrote:
> Sometimes dovecot only count in the size of  INBOX ,without other (I
> use imap to create some mailbox),while,sometimes it count in all.

Can you reproduce this? It shouldn't be doing that. Do you use Dovecot's
deliver or something else to write the mails to maildir? Could the
problem be related to that?



signature.asc
Description: This is a digitally signed message part


[Dovecot] about quota in dovecot

2009-03-28 Thread 郭晋鹏
Hi,

 

I’m currently try to use the dovecot quota plugin.

 

I use the maildir plugin ,and use mysql as to get the quota rule.

 

Question is:

 

Sometimes dovecot only count in the size of  INBOX ,without other (I use imap 
to create some mailbox),while,sometimes it count in all.

 

I don’t know if there’s anything wrong with my configure.

 

Here is the configure of my dovecot.

 

Thank u!

 

>dovecot setting-<<<

 

 

 

# 1.1.13: /etc/dovecot.conf

# OS: Linux 2.6.9-67.0.7.EL i686 CentOS release 4.6 (Final) ext3

base_dir: /var/run/dovecot/

log_path: /var/log/dovecot.log

protocols: imap pop3

login_dir: /var/run/dovecot/login

login_executable(default): /usr/libexec/dovecot/imap-login

login_executable(imap): /usr/libexec/dovecot/imap-login

login_executable(pop3): /usr/libexec/dovecot/pop3-login

login_greeting: Dovecot Ready

mail_location: maildir:/home/mail/%u/

mail_executable(default): /usr/libexec/dovecot/imap

mail_executable(imap): /usr/libexec/dovecot/imap

mail_executable(pop3): /usr/libexec/dovecot/pop3

mail_plugins(default): quota imap_quota

mail_plugins(imap): quota imap_quota

mail_plugins(pop3): quota

mail_plugin_dir(default): /usr/lib/dovecot/imap

mail_plugin_dir(imap): /usr/lib/dovecot/imap

mail_plugin_dir(pop3): /usr/lib/dovecot/pop3

auth default:

  passdb:

driver: sql

args: /etc/dovecot-mysql.conf

  userdb:

driver: sql

args: /etc/dovecot-mysql.conf

  socket:

type: listen

client:

  path: /var/run/dovecot/auth-client

  mode: 432

master:

  path: /var/run/dovecot/auth-master

  mode: 438

  user: dovecot

  group: dovecot

plugin:

  quota: maildir:User quota

  quota_warning: storage=80%% /home/guojinpeng/quota-warning.sh 80

dict:

  quota: mysql:/etc/dovecot-dict-quota.conf

 

>>end<<<

 

# cat /etc/dovecot-mysql.conf 

driver = mysql

 

connect = host=/var/lib/mysql/mysql.sock dbname=postfix user=postfix 
password=postfix

 

default_pass_scheme = CRYPT

 

#password_query = SELECT password FROM mailbox WHERE username = '%u'

 

#user_query = SELECT maildir, 506 AS uid, 508 AS gid FROM mailbox WHERE 
username = '%u'

 

user_query = select maildir,506 as uid, 508 as gid, \

  concat('*:storage=', quota ,'B') as quota_rule \

  from mailbox where username = '%u'

password_query = select username as user, password, \

  506 as userdb_uid, 508 as userdb_gid, \

  concat('*:storage=', quota ,'B') as userdb_quota_rule \

  from mailbox where username = '%u'