123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- #
- # Cookbook Name:: dovecot_test
- # Recipe:: attributes
- #
- # Copyright 2013, Onddo Labs, Sl.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- #
- # auth.rb
- node.default['dovecot']['auth']['checkpassword'] = { # hash
- 'passdb' => {
- 'driver' => 'checkpassword',
- 'args' => '/usr/bin/checkpassword',
- },
- 'userdb' => {
- 'driver' => 'prefetch',
- },
- }
- node.default['dovecot']['auth']['system']['passdb'] = [ # array
- {
- # without driver
- 'args' => 'dovecot',
- },
- {
- 'driver' => 'passwd',
- 'args' => '',
- },
- {
- 'driver' => 'shadow',
- 'args' => '',
- },
- {
- 'driver' => 'bsdauth',
- 'args' => '',
- },
- ]
- # conf-dovecot-dict-sql.rb
- node.default['dovecot']['conf']['dict_sql']['maps'] = [
- {
- 'pattern' => 'priv/quota/storage',
- 'table' => 'quota',
- 'username_field' => 'username',
- 'value_field' => 'bytes',
- },
- {
- 'pattern' => 'priv/quota/messages',
- 'table' => 'quota',
- 'username_field' => 'username',
- 'value_field' => 'messages',
- },
- {
- 'pattern' => 'shared/expire/$user/$mailbox',
- 'table' => 'expires',
- 'value_field' => 'expire_stamp',
- 'fields' => {
- 'username' => '$user',
- 'mailbox' => '$mailbox',
- },
- },
- ]
- # namespaces.rb
- node.default['dovecot']['namespaces'] = [
- {
- 'separator' => '/',
- 'prefix' => '"#mbox/"',
- 'location' => 'mbox:~/mail:INBOX=/var/mail/%u',
- 'inbox' => true,
- 'hidden' => true,
- 'list' => false,
- }, {
- 'separator' => '/',
- 'prefix' => '',
- 'location' => 'maildir:~/Maildir',
- },
- # mailboxes require dovecot >= 2.1
- # {
- # 'name' => 'inbox',
- # 'separator' => '/',
- # 'prefix' => '',
- # 'inbox' => 'yes',
- # 'inbox' => true,
- # 'mailboxes' => {
- # 'Drafts' => {
- # 'special_use' => '\Drafts',
- # },
- # 'Junk' => {
- # 'special_use' => '\Junk',
- # },
- # 'Trash' => {
- # 'special_use' => '\Trash',
- # },
- # 'Sent' => {
- # 'special_use' => '\Sent',
- # },
- # 'Sent Messages' => {
- # 'special_use' => '\Sent',
- # },
- # 'virtual/All' => {
- # 'special_use' => '\All',
- # },
- # 'virtual/Flagged' => {
- # 'special_use' => '\All',
- # },
- # },
- # },
- ]
- # plugins.rb
- node.default['dovecot']['plugins']['mail_log'] = {
- 'mail_log_events' => 'delete undelete expunge copy mailbox_delete mailbox_rename',
- 'mail_log_fields' => 'uid box msgid size'
- }
- node.default['dovecot']['plugins']['sieve'] = {
- 'sieve' => '~/.dovecot.sieve',
- 'sieve_dir' => '~/sieve',
- }
- # protocols.rb
- node.default['dovecot']['protocols']['lda'] = {
- 'mail_plugins' => [ '$mail_plugins' ],
- }
- # services.rb
- node.default['dovecot']['services']['director']['listeners'] = [
- { 'unix:login/director' => {
- 'mode' => '0666',
- } },
- { 'fifo:login/proxy-notify' => {
- 'mode' => '0666',
- } },
- { 'unix:director-userdb' => {
- 'mode' => '0666',
- } },
- { 'inet' => {
- 'port' => '5432',
- } },
- ]
- node.default['dovecot']['services']['imap-login'] = {
- 'listeners' => [
- { 'inet:imap' => {
- 'port' => 143,
- } },
- { 'inet:imaps' => {
- 'port' => 993,
- 'ssl' => true,
- } },
- ],
- 'service_count' => 1,
- 'process_min_avail' => 0,
- 'vsz_limit' => '64M',
- }
- include_recipe 'dovecot'
|