Frittella Laurento
2007-Jul-24 11:08 UTC
[Dovecot] quota: maildrop + dovecot. dovecot doesn't update maildirsize file
Hi all,
I'm trying to implement quota support in postfix using maildrop +
dovecot but I think dovecot doesn't update info stored in maildirsize file.
# 1.0.2: /etc/dovecot/dovecot.conf
base_dir: /var/run/dovecot/
listen: 127.0.0.1
ssl_listen: *
ssl_ca_file: ...
ssl_cert_file: ...
ssl_key_file: ...
ssl_cipher_list: ALL:!LOW:!SSLv2
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
valid_chroot_dirs: /home/vmail/domains
first_valid_uid: 1001
last_valid_uid: 1001
first_valid_gid: 1001
last_valid_gid: 1001
mail_location: maildir:/home/vmail/domains/%d/%n
auth default:
user: dovecot-auth
passdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
userdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
plugin:
quota: maildir:ignore=Trash
When a mail arrives maildrop delivers it and update info in the
maildirsize file, but when I delete messages through dovecot (using
thunderbird) the maildirsize remains the same and so users reach
overquota very soon.
What's wrong?
Thanks in advance,
Laurento
Tan Shao Yi
2007-Jul-24 14:24 UTC
[Dovecot] quota: maildrop + dovecot. dovecot doesn't update maildirsize file
Hi Laurento,
I think you missed out mail_plugins = quota for the appropriate
protocol(s)?
e.g.
protocol imap {
...
mail_plugins = quota
...
}
On Tue, 24 Jul 2007, Frittella Laurento wrote:
> Hi all,
> I'm trying to implement quota support in postfix using maildrop +
> dovecot but I think dovecot doesn't update info stored in maildirsize
file.
>
> # 1.0.2: /etc/dovecot/dovecot.conf
> base_dir: /var/run/dovecot/
> listen: 127.0.0.1
> ssl_listen: *
> ssl_ca_file: ...
> ssl_cert_file: ...
> ssl_key_file: ...
> ssl_cipher_list: ALL:!LOW:!SSLv2
> login_dir: /var/run/dovecot/login
> login_executable: /usr/libexec/dovecot/imap-login
> valid_chroot_dirs: /home/vmail/domains
> first_valid_uid: 1001
> last_valid_uid: 1001
> first_valid_gid: 1001
> last_valid_gid: 1001
> mail_location: maildir:/home/vmail/domains/%d/%n
> auth default:
> user: dovecot-auth
> passdb:
> driver: ldap
> args: /etc/dovecot/dovecot-ldap.conf
> userdb:
> driver: ldap
> args: /etc/dovecot/dovecot-ldap.conf
> plugin:
> quota: maildir:ignore=Trash
>
> When a mail arrives maildrop delivers it and update info in the
> maildirsize file, but when I delete messages through dovecot (using
> thunderbird) the maildirsize remains the same and so users reach
> overquota very soon.
>
> What's wrong?
>
> Thanks in advance,
> Laurento
>
Timo Sirainen
2007-Jul-25 03:21 UTC
[Dovecot] quota: maildrop + dovecot. dovecot doesn't update maildirsize file
On 24.7.2007, at 14.08, Frittella Laurento wrote:> plugin: > quota: maildir:ignore=TrashI'm not completely sure if this works (although it should). Try setting the limit here as well and see if it fixes it: quota = maildir:storage=102400:ignore=Trash -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070725/8d2144f4/attachment-0002.bin>
Frittella Laurento
2007-Jul-25 09:49 UTC
[Dovecot] quota: maildrop + dovecot. dovecot doesn't update maildirsize file
Now it seems to work using ldap backend to sync maildrop and dovecot info ;)
I followed wiki example and I'm using this simple convert script because
I'm storing quota info in ldap using the courier format <bytes>S to
use
it with maildrop (through authlib) too
-- quota_convert.sh
#!/bin/bash
if [[ -n "${QUOTA_COURIER}" ]] ; then
# strip the 'S' from the stored quota value (courier format)
export QUOTA=maildir:storage=`expr ${QUOTA_COURIER/S/} /
1024`:ignore=Trash
fi
exec /usr/libexec/dovecot/imap
PS: checking for non-zero length var avoid an expr error message when
dovecot starts
Many thanks for the help.
Cheers,
Laurento