[Dovecot] dovecot-2.0.3 - can not upload message, over quota
Hi!
I've upgraded to 2.0.3 from 1.2, and it is so far so good. I especially like the new doveadm tool. I have only one tiny problem:
Every time I try to upload a message to the server (eg. to a 'Sent' folder, while sending a message), it fails with an error saying I'm over my quota. I'm using mutt, and this is the exact message I get in mutt: [OVERQUOTA] Quota exceeded (mailbox for user is full)
Now this is not true, because dovecot-lda can save message to any of my folders, and doveadm says I have no quota (which is true):
# doveadm quota get -u <user> Quota name Type Value Limit % User quota STORAGE 1075010 - 0 User quota MESSAGE 26750 - 0
Dovecot logs say nothing about this. Why is that error message then? (I must admit that I didn't try with another mail client.)
I've tried to recalc the quota with doveadm but no luck.
doveconf -n:
# 2.0.3: /etc/dovecot/dovecot.conf
# OS: OpenBSD 4.7 i386
default_internal_user = _dovecot
default_login_user = _dovenull
dict {
expire = pgsql:/etc/dovecot/dovecot-sql.conf
}
info_log_path = /var/log/mail/dovecot.info
listen = 127.0.0.1
log_path = /var/log/mail/dovecot.log
mail_location = maildir:~/Maildir/
mail_plugins = quota expire
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
expire = sa.* 1
expire_dict = proxy::expire
quota = maildir:User quota
quota_rule = *:storage=100M
quota_rule2 = Trash:storage=+50M
}
protocols = pop3 imap
userdb {
driver = prefetch
}
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocol imap {
mail_plugins = $mail_plugins imap_quota
}
protocol pop3 {
mail_plugins = $mail_plugins
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
deliver_log_format = msgid=%m, from=%f, subject=%s: %$
mail_plugins = $mail_plugins sieve
sendmail_path = /usr/local/sbin/sendmail
}
TIA, Daniel
-- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
On Sun, Sep 19, 2010 at 18:43:25 +0200, LEVAI Daniel wrote:
Hi!
I've upgraded to 2.0.3 from 1.2, and it is so far so good. I especially like the new doveadm tool. I have only one tiny problem:
Every time I try to upload a message to the server (eg. to a 'Sent' folder, while sending a message), it fails with an error saying I'm over my quota. I'm using mutt, and this is the exact message I get in mutt: [OVERQUOTA] Quota exceeded (mailbox for user is full)
I've tried it with KMail too. It says: Cannot Write to Resource
This not only happens when I'm trying to upload a message, it happens also when I'm trying to copy a message from one folder to another.
Daniel
-- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
On Sun, 2010-09-19 at 18:43 +0200, LEVAI Daniel wrote:
Every time I try to upload a message to the server (eg. to a 'Sent' folder, while sending a message), it fails with an error saying I'm over my quota.
Now this is not true, because dovecot-lda can save message to any of my folders, and doveadm says I have no quota (which is true):
Well, that's strange, because it's using the exact same code.. Are you calling dovecot-lda with -d parameter?
# doveadm quota get -u <user> Quota name Type Value Limit % User quota STORAGE 1075010 - 0 User quota MESSAGE 26750 - 0
I guess it could be possible that Dovecot is treating "unlimited quota" as "0 bytes of quota", although that behavior should be consistent when using dovecot-lda too.
Dovecot logs say nothing about this. Why is that error message then?
Set mail_debug=yes and show what it logs when logging in?
On Mon, Sep 20, 2010 at 14:57:06 +0100, Timo Sirainen wrote:
On Sun, 2010-09-19 at 18:43 +0200, LEVAI Daniel wrote:
Every time I try to upload a message to the server (eg. to a 'Sent' folder, while sending a message), it fails with an error saying I'm over my quota.
Now this is not true, because dovecot-lda can save message to any of my folders, and doveadm says I have no quota (which is true):
Well, that's strange, because it's using the exact same code.. Are you calling dovecot-lda with -d parameter? I'm calling it from postfix like this: /usr/local/libexec/dovecot/dovecot-lda -e -d ${recipient}
# doveadm quota get -u <user> Quota name Type Value Limit % User quota STORAGE 1075010 - 0 User quota MESSAGE 26750 - 0
I guess it could be possible that Dovecot is treating "unlimited quota" as "0 bytes of quota", although that behavior should be consistent when using dovecot-lda too. [...] Set mail_debug=yes and show what it logs when logging in?
imap(username): Debug: Quota root: name=User quota backend=maildir args= imap(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 imap(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0
lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=0 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=0 messages=0 lda(username): Debug: maildir++: root=/homedir/Maildir, index=, control=, inbox=/homedir/Maildir lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0 lda(username): Debug: none: root=, index=, control=, inbox= lda(username): Debug: Namespace : Using permissions from /homedir/Maildir: mode=0700 gid=-1
I can see that lda and imap reports different quotas and even with lda there is two different quota values.
I'm using sql userdb, and I'm returning this userdb_import field: quota_rule=*:storage=0 quota_rule2=Trash:storage=+0
Daniel
-- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
On Mon, 2010-09-20 at 16:24 +0200, LEVAI Daniel wrote:
Set mail_debug=yes and show what it logs when logging in?
imap(username): Debug: Quota root: name=User quota backend=maildir args= imap(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 imap(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0
So those are the global defaults..
lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=0 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=0 messages=0
The above I guess are the overridden values from SQL.
lda(username): Debug: maildir++: root=/homedir/Maildir, index=, control=, inbox=/homedir/Maildir lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0
Why are these defaults again here?..
I can see that lda and imap reports different quotas and even with lda there is two different quota values.
Yeah, that's weird. It's as if you have two quota roots with LDA.
I'm using sql userdb, and I'm returning this userdb_import field: quota_rule=*:storage=0 quota_rule2=Trash:storage=+0
What does it then log with auth_debug=yes?
On h, szept 20, 2010 at 15:44:46 +0100, Timo Sirainen wrote:
On Mon, 2010-09-20 at 16:24 +0200, LEVAI Daniel wrote:
Set mail_debug=yes and show what it logs when logging in?
imap(username): Debug: Quota root: name=User quota backend=maildir args= imap(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 imap(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0
So those are the global defaults..
Yes, those are in the dovecot.conf.
lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=0 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=0 messages=0
The above I guess are the overridden values from SQL.
Yes those are in the SQL table. Anyway I've now remove the second quota rule, to simplify thing. Now there is just the * one.
lda(username): Debug: maildir++: root=/homedir/Maildir, index=, control=, inbox=/homedir/Maildir lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0
Why are these defaults again here?..
Beats me.
I can see that lda and imap reports different quotas and even with lda there is two different quota values.
Yeah, that's weird. It's as if you have two quota roots with LDA. If this is the quote root, then I have only this in my dovecot.conf: plugin { quota = maildir:User quota }
I'm using sql userdb, and I'm returning this userdb_import field: quota_rule=*:storage=0 quota_rule2=Trash:storage=+0
What does it then log with auth_debug=yes?
auth: Debug: auth client connected (pid=24648) auth: Debug: client in: AUTH 1 PLAIN service=imap secured lip=ip rip=ip lport=143 rport=33794 resp=<hidden> auth: Debug: sql(daniell,ip): query: SELECT password, home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, username AS user, userdb_import FROM userdb WHERE auth_username = 'daniell' auth: Debug: auth(daniell,ip): username changed daniell -> username auth: Debug: client out: OK 1 user=username auth: Debug: master in: REQUEST 1 24648 1 1..............................f auth: Debug: prefetch(username,ip): success auth: Debug: master out: USER 1 username home=/home/username uid=8001 gid=8000 import=quota_rule=*:storage=0 imap: Debug: Loading modules from directory: /usr/local/lib/dovecot imap: Debug: Module loaded: /usr/local/lib/dovecot/lib10_quota_plugin.so imap: Debug: Module loaded: /usr/local/lib/dovecot/lib11_imap_quota_plugin.so imap: Debug: Module loaded: /usr/local/lib/dovecot/lib20_expire_plugin.so imap: Debug: Added userdb setting: plugin/import=quota_rule=*:storage=0 imap(username): Debug: Effective uid=8001, gid=8000, home=/home/username imap(username): Debug: Quota root: name=User quota backend=maildir args= imap(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 imap(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0 imap(username): Debug: maildir++: root=/home/username/Maildir, index=, control=, inbox=/home/username/Maildir imap-login: Info: Login: user=<username>, method=PLAIN, rip=ip, lip=ip, mpid=13897, TLS
lda(username): Debug: Effective uid=8001, gid=8000, home=/home/username lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=0 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0 lda(username): Debug: maildir++: root=/home/username/Maildir, index=, control=, inbox=/home/username/Maildir lda(username): Debug: Quota root: name=User quota backend=maildir args= lda(username): Debug: Quota rule: root=User quota mailbox=* bytes=104857600 messages=0 lda(username): Debug: Quota rule: root=User quota mailbox=Trash bytes=+52428800 messages=0 lda(username): Debug: none: root=, index=, control=, inbox=
I've really got no ideas. :\
Thanks for any help, Daniel
-- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
On Mon, 2010-09-20 at 18:07 +0200, LEVAI Daniel wrote:
auth: Debug: sql(daniell,ip): query: SELECT password, home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, username AS user, userdb_import FROM userdb WHERE auth_username = 'daniell'
Oh, you're using userdb_import .. and using prefetch.. I'm not entirely sure why it made any difference with either lda or imap, but I think you need to call it userdb_userdb_import (the userdb extra field name is "userdb_import", but with prefetch you need to prefix everything with "userdb_").
On h, szept 20, 2010 at 17:19:50 +0100, Timo Sirainen wrote:
On Mon, 2010-09-20 at 18:07 +0200, LEVAI Daniel wrote:
auth: Debug: sql(daniell,ip): query: SELECT password, home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, username AS user, userdb_import FROM userdb WHERE auth_username = 'daniell'
Oh, you're using userdb_import .. and using prefetch.. I'm not entirely sure why it made any difference with either lda or imap, but I think you need to call it userdb_userdb_import (the userdb extra field name is "userdb_import", but with prefetch you need to prefix everything with "userdb_").
Ohhh. Yes. I remember I read that on the wikipage, but never occured to me to apply that this way :) Thanks! It is working now.
Daniel
-- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
participants (2)
-
LEVAI Daniel
-
Timo Sirainen