[Dovecot] current quota in mysql issue
stefan at webetc.de
stefan at webetc.de
Sat Mar 15 15:30:45 EET 2008
hi all,
i have a problem with storing the current quota in mysql. the
configuration of the dictionary quota mostly looks like the example from
the wiki.
the dirsize quota limit is read correctly from the user_query, but nothing
stored with quotadict in the quota table. i wonder that there is nothing
like a "dict" in the logfile. did i configured anything wrong?
regars
stefan
logfile from a imap login:
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): Effective uid=150, gid=8
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): Loading modules from
directory: /usr/lib/dovecot/modules/imap
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): Module loaded:
/usr/lib/dovecot/modules/imap/lib01_quota_plugin.so
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): Module loaded:
/usr/lib/dovecot/modules/imap/lib02_imap_quota_plugin.so
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): Namespace:
type=private, prefix=, sep=/, inbox=yes, hidden=no, subscriptions=no
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): maildir:
data=/var/vmail/mydomain.de/me/Maildir
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): maildir:
root=/var/vmail/mydomain.de/me/Maildir,
index=/var/vmail/mydomain.de/me/Maildir, control=, inbox=
Mar 15 14:12:18 mx01 dovecot: IMAP(me at mydomain.de): dirsize quota limit =
20000000kB
Mar 15 14:12:18 mx01 dovecot: imap-login: Login: user=<me at mydomain.de>,
method=PLAIN, rip=10.1.1.147, lip=10.1.1.146
here is my current config:
package from debian etch (1.0.rc15)
###
# file dovecot.conf
disable_plaintext_auth = no
base_dir = /var/run/dovecot/
protocols = imap imaps pop3 pop3s
protocol imap {
listen = mx01.int.example.net:143
ssl_listen = mx01.int.example.net:993
}
protocol pop3 {
listen = mx01.int.example.net:110
ssl_listen = mx01.int.example.net:995
}
log_timestamp = .%Y-%m-%d %H:%M:%S .
syslog_facility = mail
ssl_cert_file = /etc/ssl/example.net/mailserver/mail-cert.pem
ssl_key_file = /etc/ssl/example.net/mailserver/mail-key.pem
ssl_ca_file = /etc/ssl/example.net/mailserver/ca.pem
ssl_parameters_regenerate = 168
verbose_ssl = no
mail_extra_groups = mail
mail_debug = yes
auth_verbose = no
auth_debug = no
auth_debug_passwords = no
first_valid_uid = 150
last_valid_uid = 150
first_valid_gid = 8
last_valid_gid = 8
maildir_copy_with_hardlinks = yes
protocol imap {
login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap
imap_client_workarounds = outlook-idle
imap_max_line_length = 65536
mail_plugins = quota imap_quota
}
protocol pop3 {
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
mail_plugins = quota
}
protocol lda {
postmaster_address = postmaster at mydomain.com
sendmail_path = /usr/lib/sendmail
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = cmusieve quota
}
auth_username_translation = %Lu
auth default {
mechanisms = plain
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
}
}
}
namespace private {
separator = /
prefix =
inbox = yes
}
plugin {
quota = dict::: proxy::quotadict
}
dict {
quotadict = mysql:/etc/dovecot/dovecot-sql-quota-dict.conf
}
###
# file dovecot-sql.conf
driver = mysql
connect = host=mx01.int.example.net dbname=db_mail user=dovecot
password=********
default_pass_scheme = PLAIN
user_query = select concat('/var/vmail/%d/%n/Maildir') as home,
concat('maildir:/var/vmail/%d/%n/Maildir') as mail, 150 as uid, 8 as gid,
quota from qry_dovecot where user = '%u'
password_query = select user, password, concat('/var/vmail/%d/%n') as
userdb_home, concat('maildir:/var/vmail/%d/%n') as userdb_mail, 150 as
userdb_uid, 8 as userdb_gid from qry_dovecot where user = '%u'
###
# file dovecot-sql-quota-dict.conf
connect = host=db01.int.example.net dbname=db_mail user=quota
password==********
table = quota
select_field = current
where_field = path
username_field = username
(don't wonder about the different database hosts. mx01 is a readonly slave
from db01)
More information about the dovecot
mailing list