support multiple sasl_passwd entries

with tests

Signed-off-by: Felix Wong <gnowxilef@gmail.com>
This commit is contained in:
Felix Wong
2014-09-15 21:57:34 -07:00
parent 52d6b1b0f3
commit 1bb847e735
6 changed files with 126 additions and 15 deletions

View File

@@ -1,4 +1,8 @@
# Auto-generated by Chef.
# Local modifications will be overwritten.
#
<%= node['postfix']['main']['relayhost'] %> <%= @settings['smtp_sasl_user_name'] %>:<%= @settings['smtp_sasl_passwd'] %>
<% if !@settings.nil? && !@settings.empty? -%>
<% @settings.sort.map do |relayhost,value| -%>
<%= relayhost %> <%= value['username'] %>:<%= value['password'] %>
<% end -%>
<% end -%>