Merge branch 'recipient_canonical_maps'

Conflicts:
	manifests/server.pp
diff --git a/ChangeLog b/CHANGELOG.md
similarity index 79%
rename from ChangeLog
rename to CHANGELOG.md
index 36868a9..e2f4f0c 100644
--- a/ChangeLog
+++ b/CHANGELOG.md
@@ -1,48 +1,53 @@
 * Expanded TLS and client-TLS directives (#28, @adamcstephens).
 * Cosmetic cleanups to main.cf templates.
 * Fix ordering of postfix::file resources (#18).
+* Fix wrong smtps_content_filter parameter default (#32, @gwarf).
+* Add support for smtp_generic_maps (#53, @KlavsKlavsen).
+* Fix spampd options (#46, @chihoko).
+* Add mailbox_size_limit.
+* Allow mynetworks to also be an array.
 
-2014-05-12 - 0.3.3
+#### 2014-05-12 - 0.3.3
 * Add Debian support for spampd (#26, @timogoebel).
 * Content filter SMTPS, add more parameters (#27, @tjnicholas).
 
-2014-03-31 - 0.3.2
+#### 2014-03-31 - 0.3.2
 * Add FreeBSD support (#23, @fraenki).
 * Add transport_maps, canonical_maps & relocated_maps (#24, @fraenki).
 
-2014-03-18 - 0.3.1
+#### 2014-03-18 - 0.3.1
 * Add extension support for dovecot+virtual users (#19, @winks).
 * Add new TLS directives (#21, Steffen Zieger).
 
-2014-02-04 - 0.3.0
+#### 2014-02-04 - 0.3.0
 * Support a few more main.cf directives (#15, RedRampage).
 * Add extra_main_parameters to support any extra main.cf directives.
 
-2013-10-28 - 0.2.4
+#### 2013-10-28 - 0.2.4
 * Add smtp client sasl auth configuration (aellert).
 * Fix dovecot directory for Debian (Florian Anderiasch).
 * Fix first run errors on master.cf and main.cf's parent directory (#12).
 * Don't notify service when updating db files, it's useless (#14).
 
-2013-09-17 - 0.2.3
+#### 2013-09-17 - 0.2.3
 * Reverse the el5/el6 logic to have the RHEL6 templates be the default now.
 * Update fallback_relay= to smtp_fallback_relay= in el5 master template (#4).
 * Add support for changing the key/crt file location and names.
 
-2013-07-17 - 0.2.2
+#### 2013-07-17 - 0.2.2
 * Add setgid_group option in main.cf (Karsten Schöke).
 * Update templates where @ variable prefixes were still missing.
 
-2013-07-08 - 0.2.1
+#### 2013-07-08 - 0.2.1
 * Add Debian osfamily support (Vadim Lebedev).
 * Move service_restart to params to have only one osfamily conditional.
 
-2013-05-31 - 0.2.0
+#### 2013-05-31 - 0.2.0
 * Fix the leftover $title from where we had a definition.
 * Update README and use markdown.
 * Change to 2-space indent.
 
-2012-12-18 - 0.1.4
+#### 2012-12-18 - 0.1.4
 * Use el6 templates for CentOS too.
 * Improve postfix::dbfile documentation.
 * Fix postfix::dbfile absent by also removing the *.db file.
@@ -50,13 +55,13 @@
 * Clean up postfix::file.
 * Fix body_checks template generation.
 
-2012-04-04 - 0.1.3
+#### 2012-04-04 - 0.1.3
 * Add smtpd_sasl_auth support for dovecot auth.
 * Make spampd more configurable.
 * Add support for header_checks lines.
 * Enhance support for local dovecot delivery.
 * Fix scope of used facts.
 
-2012-04-03 - 0.1.2
+#### 2012-04-03 - 0.1.2
 * Clean up the postfix module to match current puppetlabs guidelines.
 
diff --git a/LICENSE b/LICENSE
index 49a6e5c..03f4360 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (C) 2011-2013 Matthias Saou
+Copyright (C) 2011-2015 Matthias Saou
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/manifests/server.pp b/manifests/server.pp
index 1bbff0d..3a7e9e5 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -36,6 +36,7 @@
   $mailbox_command = false,
   $smtpd_banner = '$myhostname ESMTP $mail_name',
   $setgid_group = $::postfix::params::setgid_group,
+  $mailbox_size_limit = undef,
   $message_size_limit = false,
   $mail_name = false,
   $virtual_alias_domains = false,
@@ -81,12 +82,13 @@
   $smtp_use_tls = false,
   $canonical_maps = false,
   $sender_canonical_maps = false,
+  $smtp_generic_maps = false,
   $recipient_canonical_maps = false,
   $relocated_maps = false,
   $extra_main_parameters = {},
   # master.cf
   $smtp_content_filter = [],
-  $smtps_content_filter = $smtp_content_filter,
+  $smtps_content_filter = [],
   $submission = false,
   # EL5
   $submission_smtpd_enforce_tls = 'yes',
diff --git a/templates/main.cf-el5.erb b/templates/main.cf-el5.erb
index 866db7b..95adb67 100644
--- a/templates/main.cf-el5.erb
+++ b/templates/main.cf-el5.erb
@@ -917,6 +917,10 @@
 sender_canonical_maps = <%= @sender_canonical_maps %>
 
 <% end -%>
+<% if @smtp_generic_maps -%>
+smtp_generic_maps = <%= @smtp_generic_maps %>
+
+<% end -%>
 <% if ! @extra_main_parameters.empty? -%>
 # Parameters set using 'extra_main_parameters'
 <% @extra_main_parameters.sort_by {|key,value| key}.each do |key,value| -%>
diff --git a/templates/main.cf.erb b/templates/main.cf.erb
index 428d69d..a1ed4f7 100644
--- a/templates/main.cf.erb
+++ b/templates/main.cf.erb
@@ -281,9 +281,12 @@
 #mynetworks = 168.100.189.0/28, 127.0.0.0/8
 #mynetworks = $config_directory/mynetworks
 #mynetworks = hash:/etc/postfix/network_table
-<% if @mynetworks -%>
+<% if @mynetworks and @mynetworks.is_a?(String) -%>
 mynetworks = <%= @mynetworks %>
 <% end -%>
+<% if @mynetworks and @mynetworks.is_a?(Array) -%>
+mynetworks = <%= @mynetworks.join(', ') %>
+<% end -%>
 
 # The relay_domains parameter restricts what destinations this system will
 # relay mail to.  See the smtpd_recipient_restrictions description in
@@ -806,6 +809,11 @@
 mail_name = <%= @mail_name %>
 
 <% end -%>
+<% if @mailbox_size_limit -%>
+# Mailbox size limit
+mailbox_size_limit = <%= @mailbox_size_limit %>
+
+<% end -%>
 <% if @message_size_limit -%>
 # Message size limit
 message_size_limit = <%= @message_size_limit %>
@@ -926,6 +934,15 @@
 sender_canonical_maps = <%= @sender_canonical_maps %>
 
 <% end -%>
+<% if @recipient_canonical_maps -%>
+recipient_canonical_maps = <%= @recipient_canonical_maps %>
+
+<% end -%>
+
+<% if @smtp_generic_maps -%>
+smtp_generic_maps = <%= @smtp_generic_maps %>
+
+<% end -%>
 <% if @postscreen -%>
 # Postscreen configuration
 postscreen_access_list =
diff --git a/templates/sysconfig-spampd.erb b/templates/sysconfig-spampd.erb
index 5760a7e..b473390 100644
--- a/templates/sysconfig-spampd.erb
+++ b/templates/sysconfig-spampd.erb
@@ -1,2 +1,2 @@
 # Options for spampd, since the default ports conflict with other filters...
-options="--port=<%= @spampd_port %> --relayport=<%= @spampd_relayport %> --user=spampd --group=spampd --children=<%= @spampd_children %> --maxsize=<%= @spampd_maxsize %> --tagall --log-rules-hit --local-only"
+OPTIONS="--port=<%= @spampd_port %> --relayport=<%= @spampd_relayport %> --user=spampd --group=spampd --children=<%= @spampd_children %> --maxsize=<%= @spampd_maxsize %> --tagall --log-rules-hit --local-only"