Skip to content

Commit

Permalink
Merge branch 'COOK-1233'
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Nov 19, 2012
2 parents 02b9f24 + 16e2b58 commit 8f4c8a9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,29 @@ See `attributes/default.rb` for default values.
`smtpd_milters` option in `/etc/postfix/main.cf`.
* `node['postfix']['non_smtpd_milters']` - corresponds to the
`non_smtpd_milters` option in `/etc/postfix/main.cf`.
* `node['postfix']['inet_interfaces']` - interfaces to listen to, all or loopback-only
* `node['postfix']['inet_interfaces']` - interfaces to listen to, all
or loopback-only
* `node['postfix']['sender_canonical_classes']` - controls what
addresses are subject to `sender_canonical_maps` address mapping,
specify one or more of: `envelope_sender`, `header_sender` - defaults to
nil
* `node['postfix']['recipient_canonical_classes']` - controls what
addresses are subject to `recipient_canonical_maps` address mapping,
specify one or more of: `envelope_recipient`, `header_recipient` -
defaults to nil
* `node['postfix']['canonical_classes']` - controls what addresses are
subject to `canonical_maps` address mapping, specify one or more of:
`envelope_sender`, `envelope_recipient`, `header_sender`,
`header_recipient` - defaults to nil
* `node['postfix']['sender_canonical_maps']` - optional address
mapping lookup tables for envelope and header sender addresses, eg.
`hash:/etc/postfix/sender_canonical` - defaults to nil
* `node['postfix']['recipient_canonical_maps']` - optional address
mapping lookup tables for envelope and header recipient addresses,
eg. `hash:/etc/postfix/recipient_canonical` - defaults to nil
* `node['postfix']['canonical_maps']` - optional address mapping
lookup tables for message headers and envelopes, eg.
`hash:/etc/postfix/canonical` - defaults to nil

Recipes
=======
Expand Down
7 changes: 7 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@
default['postfix']['non_smtpd_milters'] = ""

default['postfix']['aliases'] = {}

default['postfix']['sender_canonical_classes'] = nil
default['postfix']['recipient_canonical_classes'] = nil
default['postfix']['canonical_classes'] = nil
default['postfix']['sender_canonical_maps'] = nil
default['postfix']['recipient_canonical_maps'] = nil
default['postfix']['canonical_maps'] = nil
19 changes: 19 additions & 0 deletions templates/default/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,22 @@ milter_default_action = <%= node['postfix']['milter_default_action'] %>
milter_protocol = <%= node['postfix']['milter_protocol'] %>
smtpd_milters = <%= node['postfix']['smtpd_milters'] %>
non_smtpd_milters = <%= node['postfix']['non_smtpd_milters'] %>
<% unless node['postfix']['sender_canonical_classes'].nil? -%>
sender_canonical_classes = <%= node['postfix']['sender_canonical_classes'] %>
<% end -%>
<% unless node['postfix']['recipient_canonical_classes'].nil? -%>
recipient_canonical_classes = <%= node['postfix']['recipient_canonical_classes'] %>
<% end -%>
<% unless node['postfix']['canonical_classes'].nil? -%>
canonical_classes = <%= node['postfix']['canonical_classes'] %>
<% end -%>
<% unless node['postfix']['sender_canonical_maps'].nil? -%>
sender_canonical_maps = <%= node['postfix']['sender_canonical_maps'] %>
<% end -%>
<% unless node['postfix']['recipient_canonical_maps'].nil? -%>
recipient_canonical_maps = <%= node['postfix']['recipient_canonical_maps'] %>
<% end -%>
<% unless node['postfix']['canonical_maps'].nil? -%>
canonical_maps = <%= node['postfix']['canonical_maps'] %>
<% end -%>

0 comments on commit 8f4c8a9

Please sign in to comment.