123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- # Generated by Chef
- <% unless @conf['dict_sql']['connect'].nil? -%>
- connect = <%= Dovecot::Conf.value(@conf['dict_sql']['connect']) %>
- <% else -%>
- #connect = host=localhost dbname=mails user=testuser password=pass
- <% end -%>
- # CREATE TABLE quota (
- # username varchar(100) not null,
- # bytes bigint not null default 0,
- # messages integer not null default 0,
- # primary key (username)
- # );
- <% if @conf['dict_sql']['maps'].kind_of?(Array) -%>
- <% @conf['dict_sql']['maps'].each do |map| -%>
- <%= Dovecot::Conf.map(map) %>
- <% end -%>
- <% else -%>
- 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
- }
- }
- <% end -%>
|