[Dovecot] quota issues

PA razor at meganet.net
Mon Dec 20 20:35:29 EET 2010


Hi I seem to be getting an error when quotas are enabled.  Also I noticed
that the quota_ rule settings don't actually get used, the only settings
that are used are on the sql.conf file. Maybe I'm not understanding what the
quota_rule does but should I be specifying the storage/messages values on
there even though they are being read/used are on the sql.conf file only.



dict {
  quotadict = mysql:/usr/local/etc/dovecot/dovecot-dict-quota-sql.conf
}

plugin {
  quota = dict:::proxy::quotadict
  quota_rule = *:storage=1M:messages=5
  quota_exceeded_message = Quota exceed, please email support for further
assistance.
  trash = /usr/local/etc/dovecot/trash.conf.ext
  driver = sql
}

Sql.conf

user_query = SELECT concat('/var/vmail/%d/', maildir) as home,
concat('maildir:/var/vmail/%d/', maildir) as mail, 101 AS uid, 502 AS gid,
concat('*:messages=5:storage=', quota) AS quota_rule FROM mailbox WHERE
username = '%u' AND active = '1'





Below are the errors I'm seeing in the log.

If I'm overquota I get the following error


Dec 20 08:32:32 testip5 dovecot: dict: mysql: Connected to localhost
(dovecotquota)
Dec 20 08:32:32 testip5 dovecot: lda(user1 at virttest2.meganet.net): Panic:
stream doesn't support seeking backwards
Dec 20 08:32:32 testip5 dovecot: lda(user1 at virttest2.meganet.net): Error:
Raw backtrace: /usr/local/lib/dovecot/libdovecot.so.0 [0x7850c0] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_syslog_fatal_handler+0x34)
[0x785164] -> /usr/local/lib/dovecot/libdovecot.so.0 [0x784704] ->
/usr/local/lib/dovecot/libdovecot.so.0 [0x78e600] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_seek+0x68) [0x78bb68] ->
/usr/local/lib/dovecot/libdovecot.so.0 [0x78eda8] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read+0x7a) [0x78bc3a] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x2b) [0x78beab]
-> /usr/local/lib/dovecot/libdovecot.so.0(message_parse_header_next+0x87)
[0x76f4a7] -> /usr/local/lib/dovecot/libdovecot.so.0 [0x770d5e] ->
/usr/local/lib/dovecot/libdovecot.so.0(message_parser_parse_next_block+0x43)
[0x770543] ->
/usr/local/lib/dovecot/libdovecot.so.0(message_parser_parse_header+0x2f)
[0x77075f] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(index_mail_parse_headers+0x10
1) [0x598b51] -> /usr/local
Dec 20 08:32:32 testip5 postfix/pipe[7995]: E0FA4958156:
to=<user1 at virttest2.meganet.net>, relay=dovecot, delay=3900,
delays=3900/0/0/0.06, dsn=4.3.0, status=deferred (Command died with signal
6: "/usr/local/libexec/dovecot/deliver")

Or error message if I'm not over quota on certain messages. 

Dec 20 08:12:12 testip5 dovecot: auth: Debug: master out: USER  1
user2 at virttest1.meganet.net
home=/var/vmail/virttest1.meganet.net/user2 at virttest1.meganet.net/
mail=maildir:/var/vmail/virttest1.meganet.net/user2 at virttest1.meganet.net/
uid=101 gid=502quota_rule=*:messages=5:storage=0
Dec 20 08:12:12 testip5 dovecot: lda(user2 at virttest1.meganet.net): Panic:
stream doesn't support seeking backwards
Dec 20 08:12:12 testip5 dovecot: lda(user2 at virttest1.meganet.net): Error:
Raw backtrace: /usr/local/lib/dovecot/libdovecot.so.0 [0x63d0c0] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_syslog_fatal_handler+0x34)
[0x63d164] -> /usr/local/lib/dovecot/libdovecot.so.0 [0x63c704] ->
/usr/local/lib/dovecot/libdovecot.so.0 [0x646600] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_seek+0x68) [0x643b68] ->
/usr/local/lib/dovecot/libdovecot.so.0 [0x646da8] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read+0x7a) [0x643c3a] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x2b) [0x643eab]
-> /usr/local/lib/dovecot/libdovecot.so.0(message_parse_header_next+0x87)
[0x6274a7] -> /usr/local/lib/dovecot/libdovecot.so.0 [0x628d5e] ->
/usr/local/lib/dovecot/libdovecot.so.0(message_parser_parse_next_block+0x43)
[0x628543] ->
/usr/local/lib/dovecot/libdovecot.so.0(message_parser_parse_header+0x2f)
[0x62875f] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(index_mail_parse_headers+0x10
1) [0xb17b51] -> /usr/local
Dec 20 08:12:12 testip5 postfix/pipe[7557]: 2982A958151:
to=<user2 at virttest1.meganet.net>, relay=dovecot, delay=0.03,
delays=0.01/0/0/0.02, dsn=4.3.0, status=deferred (Command died with signal
6: "/usr/local/libexec/dovecot/deliver")



I look at http://www.mail-archive.com/dovecot@dovecot.org/msg35048.html and
it looks like the issue I'm having, if so what file to I apply the path to?

Dovecot -n

# OS: Linux 2.6.18-194.el5PAE i686 CentOS release 5.5 (Final) ext3
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
base_dir = /usr/local/var/run/dovecot/
dict {
  quotadict = mysql:/usr/local/etc/dovecot/dovecot-dict-quota-sql.conf
}
disable_plaintext_auth = no
first_valid_uid = 101
last_valid_uid = 101
login_greeting = Mail Server Ready.
mail_location = maildir:/var/vmail/%d/%u
passdb {
  args = /usr/local/etc/dovecot/sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/usr/local/etc/dovecot/acls
  driver = sql
  quota = dict:::proxy::quotadict
  quota_exceeded_message = Quota exceed, please email support for further
assistance.
  quota_rule = *:storage=0:messages=5
  trash = /usr/local/etc/dovecot/trash.conf.ext
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = vmail
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0660
    user = vmail
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl = no
userdb {
  args = /usr/local/etc/dovecot/sql.conf.ext
  driver = sql
}
userdb {
  driver = prefetch
}
protocol imap {
  mail_plugins = quota imap_quota trash
}
protocol pop3 {
  mail_plugins = quota trash
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
  mail_plugins = quota trash
  postmaster_address = xx at xx.com
}




More information about the dovecot mailing list