Browse Source

some attributes/templates have been cleaned to be like de originals

Xabier de Zuazo 11 years ago
parent
commit
e3f5568dee

+ 1 - 1
attributes/auth.rb

@@ -15,7 +15,7 @@ default['dovecot']['auth']['deny'] = nil
 default['dovecot']['auth']['ldap'] = nil
 default['dovecot']['auth']['master'] = nil
 default['dovecot']['auth']['passwdfile'] = nil
-default['dovecot']['auth']['sql']['drivers'] = []
+default['dovecot']['auth']['sql'] = nil
 default['dovecot']['auth']['system'] = {}
 # default['dovecot']['auth']['system']['passdb'] = [ # array
 #   {

+ 1 - 4
attributes/conf-10-ssl.rb

@@ -1,4 +1,5 @@
 
+default['dovecot']['conf']['ssl'] = nil
 case node['platform']
   when 'redhat','centos','scientific','fedora','suse','amazon' then
     default['dovecot']['conf']['ssl_cert'] = '</etc/pki/dovecot/certs/dovecot.pem'
@@ -8,10 +9,6 @@ case node['platform']
     default['dovecot']['conf']['ssl_cert'] = '</etc/ssl/certs/dovecot.pem'
     default['dovecot']['conf']['ssl_key'] = '</etc/ssl/private/dovecot.pem'
 end
-
-default['dovecot']['conf']['ssl'] = nil
-default['dovecot']['conf']['ssl_cert'] = nil
-default['dovecot']['conf']['ssl_key'] = nil
 default['dovecot']['conf']['ssl_key_password'] = nil
 default['dovecot']['conf']['ssl_ca'] = nil
 default['dovecot']['conf']['ssl_verify_client_cert'] = nil

+ 3 - 12
recipes/default.rb

@@ -79,10 +79,7 @@ when 'debian', 'ubuntu' then
 
   # sqlite
   package 'dovecot-sqlite' do
-    only_if do
-      node['dovecot']['auth']['sql']['drivers'].kind_of?(Array) and
-      node['dovecot']['auth']['sql']['drivers'].include?('sqlite')
-    end
+    only_if do node['dovecot']['conf']['sql']['driver'] == 'sqlite' end
   end
 
 else
@@ -91,17 +88,11 @@ else
 end
 
 package 'dovecot-mysql' do
-  only_if do
-    node['dovecot']['auth']['sql']['drivers'].kind_of?(Array) and
-    node['dovecot']['auth']['sql']['drivers'].include?('mysql')
-  end
+  only_if do node['dovecot']['conf']['sql']['driver'] == 'mysql' end
 end
 
 package 'dovecot-pgsql' do
-  only_if do
-    node['dovecot']['auth']['sql']['drivers'].kind_of?(Array) and
-    node['dovecot']['auth']['sql']['drivers'].include?('pgsql')
-  end
+  only_if do node['dovecot']['conf']['sql']['driver'] == 'pgsql' end
 end
 
 #

+ 1 - 1
templates/default/conf.d/10-logging.conf.erb

@@ -45,11 +45,11 @@
 # Show protocol level SSL errors.
 <%= Dovecot::Conf.attribute(@conf, 'verbose_ssl', false) %>
 
+# mail_log plugin provides more event logging for mail processes.
 <% if @plugins.has_key?('mail_log') and @plugins['mail_log'].kind_of?(Hash) -%>
 <%=  Dovecot::Conf.plugin('mail_log', @plugins['mail_log']) %>
 <% else -%>
 plugin {
-  # mail_log plugin provides more event logging for mail processes.
   # Events to log. Also available: flag_change append
   #mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
   # Available fields: uid, box, msgid, from, subject, size, vsize, flags