Portál AbcLinuxu, 12. listopadu 2025 15:04
dict {
quota = mysql:/etc/dovecot/dovecot-dict-sql.conf
expire = mysql:/etc/dovecot/dovecot-dict-sql.conf
}
# Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf
#dict_db_config =
##
## Plugin settings
##
plugin {
quota = dict:user::proxy::quota
quota_rule = *:storage=500M:messages=0
/etc/dovecot/dovecot-dict-sql.conf:
connect = host=192.168.1.21 dbname=mail user=vmailuser password=heslo
# CREATE TABLE quota (
# username varchar(100) not null,
# bytes bigint not null default 0,
# messages integer not null default 0,
# primary key (username)
# );
map {
pattern = priv/quota/storage
table = quota
username_field = username
value_field = bytes
}
map {
pattern = priv/quota/messages
table = quota
username_field = username
value_field = messages
}
# CREATE TABLE expires (
# username varchar(100) not null,
# mailbox varchar(255) not null,
# expire_stamp integer not null,
# primary key (username, mailbox)
# );
map {
pattern = shared/expire/$user/$mailbox
table = expires
value_field = expire_stamp
fields {
username = $user
mailbox = $mailbox
}
}
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.