[Dovecot] Quota not showing properly in webmail

Eden edencaldas at gmail.com
Tue Apr 29 20:13:10 EEST 2008


Showing all My confg again this time including the sql config:

*################ dovecot.conf: ##############*

## Dovecot configuration file
#
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
#
# imap imaps pop3 pop3s (use imaps and pop3s if configured for SSL)
protocols = imap imaps pop3s pop3
#
# Uncomment the ssl_listen statements and comment out listen if using SSL
protocol imap {
listen = *:143
 ssl_listen = *:993
 mail_plugins = quota imap_quota
}
protocol pop3 {
listen = *:110
 ssl_listen = *:995
}
log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
#syslog_facility = mail
#
# Uncomment these if using SSL
#ssl_cert_file = /etc/ssl/mycompany/mailserver/mail-cert.pem
#ssl_key_file = /etc/ssl/mycompany/mailserver/mail-key.pem
#ssl_ca_file = /etc/ssl/mycompany/ca/mycompany.pem
#ssl_verify_client_cert = yes
#ssl_parameters_regenerate = 168
#verbose_ssl = no
#
# Where the mailboxes are located
#mail_location = maildir:/vmail/%d/%u
mail_location = maildir:/vmail/%n@%d
#
#mail_access_groups = mail vmail postfix
#mail_extra_groups = mail vmail postfix
mail_privileged_group = mail
mail_debug = no
first_valid_uid = 150
last_valid_uid = 150
maildir_copy_with_hardlinks = yes
#
protocol imap {
login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap
imap_max_line_length = 65536
}
protocol pop3 {
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv
}
#protocol lda {
#postmaster_address = postmaster at mydomain.com
#sendmail_path = /usr/lib/sendmail
#auth_socket_path = /var/run/dovecot/auth-master
#}
#
auth_verbose = yes
auth_debug = yes
auth_debug_passwords = no
#
auth default {
 mechanisms = login plain digest-md5 cram-md5
 passdb sql {
 args = /etc/dovecot/dovecot-sql.conf
 }
 userdb sql {
 args = /etc/dovecot/dovecot-sql.conf
 }
 user = nobody
 socket listen {
 master {
 path = /var/run/dovecot/auth-master
 mode = 0660
 user = vmail
 group = mail
 }
 client {
 path = /var/spool/postfix/private/auth
 mode = 0660
 user = postfix
 group = postfix
 }
 }
 #
 # If you want client certificates, use these lines
 # ssl_require_client_cert = yes
 # ssl_username_from_cert = yes
}

plugin {
  quota = maildir
   }

*#######################  dovecot-sql.conf
###################################*

driver = mysql
connect = host=127.0.0.1 dbname=SECRET-DB user=SECRET-USER password=SECRET-PASS
default_pass_scheme = MD5
user_query = SELECT '/vmail/%n@%d' AS home, 'maildir:/vmail/%n@%d' AS
mail, 150 AS uid, 8 AS gid, CONCAT('dirsize:storage=', quota) AS quota
FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username AS user, password, '/vmail/%n@%d' AS
userdb_home, 'maildir:/vmail/%n@%d' AS userdb_mail, 150 AS userdb_uid,
8 AS userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'





2008/4/28 Timo Sirainen <tss at iki.fi>:

> On Sun, 2008-04-27 at 22:49 -0300, Eden wrote:
> > I configured dovecot to read the maildirsize file as described here:
> > http://wiki.dovecot.org/Quota/Maildir
> >
> > This link shows de maildirsize file using bytes as well.
>
> Yes, it's bytes in the maildirsize file. But how do you return the
> "quota" setting? I guess you're returning it from sql userdb? Show me
> the user_query from dovecot-sql.conf?
>
> (I'm guessing it contains "quota=maildir:storage=n" where n is quota
> limit in bytes (instead of in kilobytes), which overrides limits from
> maildirsize file).
>
>


More information about the dovecot mailing list