[Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the maildirsize

2009-03-16 Thread Thu NGUYEN
Dear all,

My problem is below:
- quota for user Demo is 3MB and Demo maildir is now 2.2MB
- then I sent an email with attachment (600KB) to demo@ 
- I relogin to account Demo but nothing changed (maildirsize in Maildir
still not changed)
- then I DELETE the maildirsize file and relogin, the maildirsize is now
updated.

--- however that's what not I expected as I should delete the maildirsize,
I wonder why the maildirsize file is not updated right after an incoming
email or after I relogin...?

Did I made something wrong?

Below is my dovecot config:

dovecot -n
# 1.1.11: /etc/dovecot.conf
# OS: Linux 2.6.18-92.el5 i686 CentOS release 5.2 (Final) ext3
log_path: /var/log/dovecot.log.quota.0313
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
mail_gid: 100
mail_location: maildir:/home/%u/Maildir
mail_debug: yes
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
imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh
tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh
tb-extra-mailbox-sep
imap_client_workarounds(pop3):
auth default:
  verbose: yes
  debug: yes
  passdb:
driver: ldap
args: /etc/dovecot-ldap.conf
  userdb:
driver: ldap
args: /etc/dovecot-ldap.conf
plugin:
  quota: maildir:User quota
  quota_rule: *:storage=5G
  quota_warning: storage=80%% /usr/local/bin/quota-warning.sh 80
  quota_warning2: storage=82%% /usr/local/bin/quota-warning.sh 82
  quota_warning3: storage=84%% /usr/local/bin/quota-warning.sh 84


[r...@smail Maildir]# grep -v '^ *\(#.*\)\?$' /etc/dovecot-ldap.conf
hosts = ldaphost.tma.com.vn
dn = cn=Administrator,dc=tma,dc=com,dc=vn
dnpass = secret
auth_bind = yes
auth_bind_userdn = uid=%u,ou=Users,dc=tma,dc=com,dc=vn
ldap_version = 3
base = ou=Users,dc=tma,dc=com,dc=vn
scope = subtree
user_attrs = homeDirectory=home,uid=uid,mailQuota=quota_rule=*:storage=%$M
user_filter = ((objectClass=posixAccount)(uid=%u))
pass_attrs = uid=user,userPassword=password
pass_filter = ((objectClass=posixAccount)(uid=%u))
default_pass_scheme = CRYPT


Manipulation in Maildir

// there is nochange when login after receiving an email
[r...@mail Maildir]# cat maildirsize
3145728S
2246642 149

//remove maildirsize
[r...@mail Maildir]# rm maildirsize
[r...@mail Maildir]# cat maildirsize
cat: maildirsize: No such file or directory

// relogin
[r...@mail Maildir]# cat maildirsize
3145728S
2897371 152


Thanks for your response.
Regards,
Thu NGUYEN.





Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the maildirsize

2009-03-16 Thread Timo Sirainen

On Mar 16, 2009, at 4:03 AM, Thu NGUYEN wrote:


My problem is below:
- quota for user Demo is 3MB and Demo maildir is now 2.2MB
- then I sent an email with attachment (600KB) to demo@


This is where the maildirsize should be updated. What do you use as  
your MDA? Not Dovecot's deliver I suppose? You need to be using an MDA  
that supports maildirsize updates, preferrably deliver.


BTW. Please don't post new mails by replying to an existing one. It  
messes up threading.




Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the maildirsize

2009-03-16 Thread Thu NGUYEN
I'm sorry! I didn't intend to merge in this message. 

I'm using sendmail and the MDA is procmail. Is that supported the
maildirsize update or I should set up the dovecot's deliver?



Regards,
Thu NGUYEN.


-Original Message-
From: Timo Sirainen [mailto:t...@iki.fi] 
Sent: Monday, March 16, 2009 11:53 PM
To: Thu NGUYEN
Cc: 'Dovecot Mailing List'
Subject: Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the
maildirsize

On Mar 16, 2009, at 4:03 AM, Thu NGUYEN wrote:

 My problem is below:
 - quota for user Demo is 3MB and Demo maildir is now 2.2MB
 - then I sent an email with attachment (600KB) to demo@

This is where the maildirsize should be updated. What do you use as  
your MDA? Not Dovecot's deliver I suppose? You need to be using an MDA  
that supports maildirsize updates, preferrably deliver.

BTW. Please don't post new mails by replying to an existing one. It  
messes up threading.




Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the maildirsize

2009-03-16 Thread Timo Sirainen
procmail doesn't support maildirsize updates, so that's the problem.  
Switching to deliver would solve it. Also even if you use some other  
MDA that supports maildirsize updates, they don't support the quota  
warnings you configured, only deliver will do that.


On Mar 16, 2009, at 12:57 PM, Thu NGUYEN wrote:


I'm sorry! I didn't intend to merge in this message.

I'm using sendmail and the MDA is procmail. Is that supported the
maildirsize update or I should set up the dovecot's deliver?



Regards,
Thu NGUYEN.


-Original Message-
From: Timo Sirainen [mailto:t...@iki.fi]
Sent: Monday, March 16, 2009 11:53 PM
To: Thu NGUYEN
Cc: 'Dovecot Mailing List'
Subject: Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the
maildirsize

On Mar 16, 2009, at 4:03 AM, Thu NGUYEN wrote:


My problem is below:
- quota for user Demo is 3MB and Demo maildir is now 2.2MB
- then I sent an email with attachment (600KB) to demo@


This is where the maildirsize should be updated. What do you use as
your MDA? Not Dovecot's deliver I suppose? You need to be using an MDA
that supports maildirsize updates, preferrably deliver.

BTW. Please don't post new mails by replying to an existing one. It
messes up threading.





Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the maildirsize

2009-03-16 Thread Thu NGUYEN
Thanks Timo, I will try switching to deliver.


Regards,
Thu NGUYEN.


-Original Message-
From: dovecot-bounces+ntathu=tma.com...@dovecot.org
[mailto:dovecot-bounces+ntathu=tma.com...@dovecot.org] On Behalf Of Timo
Sirainen
Sent: Tuesday, March 17, 2009 12:00 AM
To: Thu NGUYEN
Cc: 'Dovecot Mailing List'
Subject: Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the
maildirsize

procmail doesn't support maildirsize updates, so that's the problem.  
Switching to deliver would solve it. Also even if you use some other  
MDA that supports maildirsize updates, they don't support the quota  
warnings you configured, only deliver will do that.

On Mar 16, 2009, at 12:57 PM, Thu NGUYEN wrote:

 I'm sorry! I didn't intend to merge in this message.

 I'm using sendmail and the MDA is procmail. Is that supported the
 maildirsize update or I should set up the dovecot's deliver?



 Regards,
 Thu NGUYEN.


 -Original Message-
 From: Timo Sirainen [mailto:t...@iki.fi]
 Sent: Monday, March 16, 2009 11:53 PM
 To: Thu NGUYEN
 Cc: 'Dovecot Mailing List'
 Subject: Re: [Dovecot] [Dovecot 1.1.11] Dovecot cannot refresh the
 maildirsize

 On Mar 16, 2009, at 4:03 AM, Thu NGUYEN wrote:

 My problem is below:
 - quota for user Demo is 3MB and Demo maildir is now 2.2MB
 - then I sent an email with attachment (600KB) to demo@

 This is where the maildirsize should be updated. What do you use as
 your MDA? Not Dovecot's deliver I suppose? You need to be using an MDA
 that supports maildirsize updates, preferrably deliver.

 BTW. Please don't post new mails by replying to an existing one. It
 messes up threading.